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

#   Confirmation before address delete?

##

- **[Llarian](/forum/user/33731-llarian "View Llarian's Profile")**
- [![Llarian's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/33731-llarian "View Llarian's Profile") Topic Author
- [ Offline](/forum/user/33731-llarian)

Less More

- Posts: 48
- Thank you received: 1
-
-

11 years 10 months ago [\#188026](#188026) by [Llarian](/forum/user/33731-llarian "View Llarian's Profile")  *[Confirmation before address delete?](/forum/33-customers/874492-confirmation-before-address-delete#188026 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.4.36  I realize you can only do so much to protect your users from themselves, but I can see this causing problems.  In the address management (and shipping/billing address checkout workflow pages), there is a delete icon next to the address. If the user clicks that, their address is immediately deleted without any confirmation.  Is there any easy way to add a confirmation step to the address delete button?")* was created by *[Llarian](/forum/user/33731-llarian "View Llarian's Profile")*

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 2.5.28
-- PHP version -- : 5.4.36

I realize you can only do so much to protect your users from themselves, but I can see this causing problems.

In the address management (and shipping/billing address checkout workflow pages), there is a delete icon next to the address. If the user clicks that, their address is immediately deleted without any confirmation.

Is there any easy way to add a confirmation step to the address delete button?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NzQ0OTItY29uZmlybWF0aW9uLWJlZm9yZS1hZGRyZXNzLWRlbGV0ZT90bXBsPW1hcmtkb3du) 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: 86586
- Thank you received: 14325
-
-

11 years 10 months ago -  11 years 10 months ago [\#188057](#188057) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Confirmation before address delete?](/forum/33-customers/874492-confirmation-before-address-delete#188057 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.4.36  I realize you can only do so much to protect your users from themselves, but I can see this causing problems.  In the address management (and shipping/billing address checkout workflow pages), there is a delete icon next to the address. If the user clicks that, their address is immediately deleted without any confirmation.  Is there any easy way to add a confirmation step to the address delete button?")*

Hi,

Try to change the line: Code:

&lt;a title="&lt;?php echo JText::_('HIKA_DELETE'); ?&gt;" class="hikashop_checkout_&lt;?php echo $this-&gt;type;?&gt;_address_delete" href="&lt;?php echo hikashop_completeLink('checkout&amp;step='.$this-&gt;step.'&amp;redirect=checkout&amp;task=deleteaddress&amp;address_id='.$address-&gt;address_id.'&amp;'.hikashop_getFormToken().'=1'.$this-&gt;url_itemid);?&gt;"&gt;&lt;img alt="&lt;?php echo JText::_('HIKA_DELETE'); ?&gt;" src="&lt;?php echo HIKASHOP_IMAGES; ?&gt;delete.png" border="0" /&gt;&lt;/a&gt;

to: Code:

&lt;a onclick="if(!confirm('&lt;?php echo JText::_('HIKASHOP_CONFIRM_DELETE_ADDRESS', true); ?&gt;')){return false;}else{return true;}" title="&lt;?php echo JText::_('HIKA_DELETE'); ?&gt;" class="hikashop_checkout_&lt;?php echo $this-&gt;type;?&gt;_address_delete" href="&lt;?php echo hikashop_completeLink('checkout&amp;step='.$this-&gt;step.'&amp;redirect=checkout&amp;task=deleteaddress&amp;address_id='.$address-&gt;address_id.'&amp;'.hikashop_getFormToken().'=1'.$this-&gt;url_itemid);?&gt;"&gt;&lt;img alt="&lt;?php echo JText::_('HIKA_DELETE'); ?&gt;" src="&lt;?php echo HIKASHOP_IMAGES; ?&gt;delete.png" border="0" /&gt;&lt;/a&gt;

in the file "address_view" of the view "checkout" via the menu Display&gt;Views and that should add it on the checkout.
For the address manager area, change the code: Code:

&lt;a href="&lt;?php echo hikashop_completeLink('address&amp;task=delete&amp;address_id='.$address-&gt;address_id.'&amp;'.$token.'=1&amp;Itemid='.$Itemid);?&gt;" title="&lt;?php echo JText::_('HIKA_DELETE'); ?&gt;"&gt;&lt;img src="&lt;?php echo HIKASHOP_IMAGES; ?&gt;delete.png" alt="&lt;?php echo JText::_('HIKA_DELETE'); ?&gt;" /&gt;&lt;/a&gt;

to: Code:

&lt;a onclick="if(!confirm('&lt;?php echo JText::_('HIKASHOP_CONFIRM_DELETE_ADDRESS', true); ?&gt;')){return false;}else{return true;}" href="&lt;?php echo hikashop_completeLink('address&amp;task=delete&amp;address_id='.$address-&gt;address_id.'&amp;'.$token.'=1&amp;Itemid='.$Itemid);?&gt;" title="&lt;?php echo JText::_('HIKA_DELETE'); ?&gt;"&gt;&lt;img src="&lt;?php echo HIKASHOP_IMAGES; ?&gt;delete.png" alt="&lt;?php echo JText::_('HIKA_DELETE'); ?&gt;" /&gt;&lt;/a&gt;

in the file "listing" of the view "address" via the menu Display&gt;Views and that should do it.

Last edit: 11 years 10 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

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

- **[Llarian](/forum/user/33731-llarian "View Llarian's Profile")**
- [![Llarian's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/33731-llarian "View Llarian's Profile") Topic Author
- [ Offline](/forum/user/33731-llarian)

Less More

- Posts: 48
- Thank you received: 1
-
-

11 years 10 months ago [\#188059](#188059) by [Llarian](/forum/user/33731-llarian "View Llarian's Profile")  Replied by *[Llarian](/forum/user/33731-llarian "View Llarian's Profile")* on topic *[Confirmation before address delete?](/forum/33-customers/874492-confirmation-before-address-delete#188059 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.4.36  I realize you can only do so much to protect your users from themselves, but I can see this causing problems.  In the address management (and shipping/billing address checkout workflow pages), there is a delete icon next to the address. If the user clicks that, their address is immediately deleted without any confirmation.  Is there any easy way to add a confirmation step to the address delete button?")*

replace "eturn false;" with "return false;" and this works perfectly. ![:)](/media/kunena/emoticons/3.png ":)")

Thank you!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NzQ0OTItY29uZmlybWF0aW9uLWJlZm9yZS1hZGRyZXNzLWRlbGV0ZT90bXBsPW1hcmtkb3du) 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: 86586
- Thank you received: 14325
-
-

11 years 10 months ago [\#188065](#188065) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Confirmation before address delete?](/forum/33-customers/874492-confirmation-before-address-delete#188065 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.4.36  I realize you can only do so much to protect your users from themselves, but I can see this causing problems.  In the address management (and shipping/billing address checkout workflow pages), there is a delete icon next to the address. If the user clicks that, their address is immediately deleted without any confirmation.  Is there any easy way to add a confirmation step to the address delete button?")*

Thanks, I've updated the code ![;)](/media/kunena/emoticons/24.png ";)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NzQ0OTItY29uZmlybWF0aW9uLWJlZm9yZS1hZGRyZXNzLWRlbGV0ZT90bXBsPW1hcmtkb3du) 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.050 seconds

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