pberce Posted March 21, 2012 Share Posted March 21, 2012 Why is it Prestashop does not delete some addresses? Does this have to do with preserving address book entries for orders in the system? If so, is that the only reason? The reason I am asking is I found a bug in the system. If someone deletes an address from their address book and it's being used in the cart it will delete the address but won't remove the reference of the address in the cart. I want to fix this but I'm unsure of where to put this. I was going to put it in the address delete function, which is as follows: public function delete() { if (Validate::isUnsignedId($this->id_customer)) Customer::resetAddressCache($this->id_customer); if (!$this->isUsed()) return parent::delete(); else { $this->deleted = true; return $this->update(); } } I'm thinking I'll have to do it in both instances. If it's "isUsed" and not "isUsed". Yes, I've created a bug tracker entry for this. Link to comment Share on other sites More sharing options...
tdr170 Posted March 22, 2012 Share Posted March 22, 2012 Sorry but I do not see this as a bug, the program is preserving the address because it is in use just like trying to delete a file from your computer that is being used by a program. Why would you delete an address that is needed for a pending order. Link to comment Share on other sites More sharing options...
fransjaeger Posted February 7, 2015 Share Posted February 7, 2015 (edited) I see the bug its in resetAddressCache maybe this will help https://www.prestashop.com/forums/topic/404649-bug-in-resetaddresscache-address-related-issue/ Edited February 7, 2015 by michaelhjulskov (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now