[Skip to main content](#vessel-content)

#   clears the user's address when I delete all orders

##

- **[chaka](/forum/user/158-chaka "View chaka's Profile")**
- [![chaka's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar158.jpg)](/forum/user/158-chaka "View chaka's Profile") Topic Author
- [ Offline](/forum/user/158-chaka)

Less More

- Posts: 135
- Thank you received: 0
-
-

16 years 3 weeks ago [\#486](#486) by [chaka](/forum/user/158-chaka "View chaka's Profile")  *[clears the user's address when I delete all orders](/forum/3-bug-report/486-clears-the-users-address-when-i-delete-all-orders#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")* was created by *[chaka](/forum/user/158-chaka "View chaka's Profile")*

**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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC80ODYtY2xlYXJzLXRoZS11c2Vycy1hZGRyZXNzLXdoZW4taS1kZWxldGUtYWxsLW9yZGVycz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

16 years 3 weeks ago [\#487](#487) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: clears the user's address when I delete all orders](/forum/3-bug-report/486-clears-the-users-address-when-i-delete-all-orders#487 " 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")*

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 Code:

return parent::delete($elements);

to Code:

$data = $this-&gt;get($elements); if(!$order &#124;&#124; !$data-&gt;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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC80ODYtY2xlYXJzLXRoZS11c2Vycy1hZGRyZXNzLXdoZW4taS1kZWxldGUtYWxsLW9yZGVycz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[chaka](/forum/user/158-chaka "View chaka's Profile")**
- [![chaka's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar158.jpg)](/forum/user/158-chaka "View chaka's Profile") Topic Author
- [ Offline](/forum/user/158-chaka)

Less More

- Posts: 135
- Thank you received: 0
-
-

16 years 3 weeks ago [\#514](#514) by [chaka](/forum/user/158-chaka "View chaka's Profile")  Replied by *[chaka](/forum/user/158-chaka "View chaka's Profile")* on topic *[Re: clears the user's address when I delete all orders](/forum/3-bug-report/486-clears-the-users-address-when-i-delete-all-orders#514 " 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")*

worked

all right

thank you very much ![B)](/media/kunena/emoticons/9.png "B)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC80ODYtY2xlYXJzLXRoZS11c2Vycy1hZGRyZXNzLXdoZW4taS1kZWxldGUtYWxsLW9yZGVycz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

16 years 3 weeks ago [\#518](#518) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: clears the user's address when I delete all orders](/forum/3-bug-report/486-clears-the-users-address-when-i-delete-all-orders#518 " 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")*

Thank you for getting back to us on this !

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC80ODYtY2xlYXJzLXRoZS11c2Vycy1hZGRyZXNzLXdoZW4taS1kZWxldGUtYWxsLW9yZGVycz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.089 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
