Hikashop Users default address

  • Posts: 10
  • Thank you received: 0
11 years 10 months ago #83524

Hi,

I'm new here so if this wasn't the right place to post this question, please let me know.

I'm facing one little problem and don't know how or where to solve it (part of the code).

I've written a plugin to extend the order submission, after the creation of the order i do some processing. And for this I have one user to test the order creation with the 'address_user_id' nº 3 (see attachment).

And my assumption at first was that one user can have many addresses but theres one that is the default one, and i was assuming that only one published address can be 'default'.

In one test i made, i had to change one field in the billing address of the user, and hikashop added a new record.

But i got to the situation on the picture i sent you, where i have one address that was added by hikashop when i updated it, but it didn't updated the 'default' field to 1 (like i thought it would). So i get one unpublished address that is the default one, and the last address record not default. And my code expects that the default one must be published..

So, can you point me to a solution to this problem?

I hope i was clear on the explanation.

Thank you,
Pedro Carvalho

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 10 months ago #83657

Hi,

It should be require to modify one or two SQL request but I have to know which modification you did to have such result.
There are several cases where the default address is reset (when HikaShop does not see any published default address), so it is possible that, somewhere, it is possible to modify an address without calling these requests.

So with a little bit more information, we could fix this problem :)

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.053 seconds
Powered by Kunena Forum