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

#   "Are you sure?" popup to order cancel

##

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

Less More

- Posts: 171
- Thank you received: 9
-
-

11 years 4 months ago [\#206721](#206721) by [pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")  *["Are you sure?" popup to order cancel](/forum/35-orders-management/877860-are-you-sure-popup-to-order-cancel#206721 "Hi!  Is there a way to add an &quot;Are you sure?&quot; onclick confirmation before executing the 'cancel&#95;order' function in order/list view? I think I should modify this line to achieve that, but I can not get it how to do that exactly:  Thanks in advance, PePe")* was created by *[pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")*

Hi!

Is there a way to add an "Are you sure?" onclick confirmation before executing the 'cancel_order' function in order/list view?
I think I should modify this line to achieve that, but I can not get it how to do that exactly: Code:

echo $this-&gt;cart-&gt;displayButton($text,'cancel_order',$this-&gt;params,hikashop_completeLink('order&amp;task=cancel_order&amp;email=1&amp;order_id='.$row-&gt;order_id.$url_itemid),'document.adminForm_'.$row-&gt;order_id.'_cancel.submit();return false;','class="hikashop_order_cancel_button"');

Thanks in advance,
PePe

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 4 months ago [\#206751](#206751) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *["Are you sure?" popup to order cancel](/forum/35-orders-management/877860-are-you-sure-popup-to-order-cancel#206751 "Hi!  Is there a way to add an &quot;Are you sure?&quot; onclick confirmation before executing the 'cancel&#95;order' function in order/list view? I think I should modify this line to achieve that, but I can not get it how to do that exactly:  Thanks in advance, PePe")*

Hi,

You can use that code: Code:

echo $this-&gt;cart-&gt;displayButton($text,'cancel_order',$this-&gt;params,hikashop_completeLink('order&amp;task=cancel_order&amp;email=1&amp;order_id='.$row-&gt;order_id.$url_itemid),'if(confirm(\'Cancel the order ?\')){document.adminForm_'.$row-&gt;order_id.'_cancel.submit();}else{self.close();}return false;','class="hikashop_order_cancel_button"');

The following user(s) said Thank You: [pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")

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

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

Less More

- Posts: 171
- Thank you received: 9
-
-

11 years 4 months ago [\#206877](#206877) by [pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")  Replied by *[pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")* on topic *["Are you sure?" popup to order cancel](/forum/35-orders-management/877860-are-you-sure-popup-to-order-cancel#206877 "Hi!  Is there a way to add an &quot;Are you sure?&quot; onclick confirmation before executing the 'cancel&#95;order' function in order/list view? I think I should modify this line to achieve that, but I can not get it how to do that exactly:  Thanks in advance, PePe")*

> Xavier wrote: Hi,
>
> You can use that code:
>
> Code:
>
> echo $this-&gt;cart-&gt;displayButton($text,'cancel_order',$this-&gt;params,hikashop_completeLink('order&amp;task=cancel_order&amp;email=1&amp;order_id='.$row-&gt;order_id.$url_itemid),'if(confirm(\'Cancel the order ?\')){document.adminForm_'.$row-&gt;order_id.'_cancel.submit();}else{self.close();}return false;','class="hikashop_order_cancel_button"');

Works like a charm!
Thanks Xavier!

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

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