- Posts: 135
- Thank you received: 0
clears the user's address when I delete all orders
15 years 11 months ago #486
by chaka
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
clears the user's address when I delete all orders was created by chaka
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.
15 years 11 months ago #487
by nicolas
Replied by nicolas on topic Re: clears the user's address when I delete all orders
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
to
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.
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
Code:
return parent::delete($elements);
Code:
$data = $this->get($elements);
if(!$order || !$data->address_published){
return parent::delete($elements);
}
Please Log in or Create an account to join the conversation.
15 years 11 months ago #514
by chaka
Replied by chaka on topic Re: clears the user's address when I delete all orders
worked
all right
thank you very much
all right
thank you very much
Please Log in or Create an account to join the conversation.
15 years 11 months ago #518
by nicolas
Replied by nicolas on topic Re: clears the user's address when I delete all orders
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.229 seconds