clears the user's address when I delete all orders

  • Posts: 135
  • Thank you received: 0
14 years 1 week ago #486


clears the user's address when I delete all orders associated with this user .


the user have a address later i delete all orders associated with this user and the address gone!!


sorry my english

i have Starter edition stable version : 1.1.1

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

  • Posts: 82683
  • Thank you received: 13337
  • MODERATOR
14 years 1 week ago #487

Hi,

That's indeed the case.
We will change the behavior to delete the address only if it's not used in another order and the address was already deleted by the user himself (when a user deletes an address which he used in an order, the address is kept unpublished so that it's still attached to the order even though it's not in the user addresses list).

If you change the line

return parent::delete($elements);
to
$data = $this->get($elements);
			if(!$order || !$data->address_published){
				return parent::delete($elements);
			}
in the function delete near the line 150 of the file administrator/components/com_hikashop/classes/address.php that should fix the problem. Please let us know if it works now. If so, we will include the correction in the next release.

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

  • Posts: 135
  • Thank you received: 0
14 years 1 week ago #514

worked

all right

thank you very much B)

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

  • Posts: 82683
  • Thank you received: 13337
  • MODERATOR
14 years 1 week ago #518

Thank you for getting back to us on this !

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

Time to create page: 0.055 seconds
Powered by Kunena Forum