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

#   The cart is empty after redirect to the cancel\_url

##

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

Less More

- Posts: 76
- Thank you received: 9
-
-

10 years 6 months ago [\#240775](#240775) by [IGrock](/forum/user/37695-igrock "View IGrock's Profile")  *[The cart is empty after redirect to the cancel\_url](/forum/35-orders-management/884644-the-cart-is-empty-after-redirect-to-the-cancel-url#240775 "-- url of the page with the problem -- : http://localhost/joomla/index.php?option=com&#95;hikashop&amp;ctrl=order&amp;task=cancel&#95;order&amp;order&#95;id=105&amp;Itemid=515 -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.6.14  Hi, My payment gateway doesn't send a notification request, but passes the information to the return URL. So I use notification URL as return URL and redirect the user to the HikaShop return URL at the end of the onPaymentNotification function. Same with the cancel URL. But in my case if the buyer cancels the payment on the payment gateway, the order status changes to &quot;cancelled&quot; but the user is not returned on the checkout, instead, the page opens with the list of products (http://xxx/index.php/product/listing) and message &quot;The cart is empty&quot;. Please help to understand what's wrong.  $cancel&#95;url = HIKASHOP&#95;LIVE . 'index.php?option=com&#95;hikashop&amp;ctrl=order&amp;task=cancel&#95;order&amp;order&#95;id=' . $order&#95;id . '&amp;lang='.$this-&gt;locale. $this-&gt;url&#95;itemid;")* was created by *[IGrock](/forum/user/37695-igrock "View IGrock's Profile")*

-- url of the page with the problem -- : http://localhost/joomla/index.php?option=com_hikashop&amp;ctrl=order&amp;task=cancel_order&amp;order_id=105&amp;Itemid=515
-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.6.14

Hi,
My payment gateway doesn't send a notification request, but passes the information to the return URL. So I use notification URL as return URL and redirect the user to the HikaShop return URL at the end of the onPaymentNotification function. Same with the cancel URL. But in my case if the buyer cancels the payment on the payment gateway, the order status changes to "cancelled" but the user is not returned on the checkout, instead, the page opens with the list of products (http://xxx/index.php/product/listing) and message "The cart is empty".
Please help to understand what's wrong.

$cancel_url = HIKASHOP_LIVE . 'index.php?option=com_hikashop&amp;ctrl=order&amp;task=cancel_order&amp;order_id=' . $order_id . '&amp;lang='.$this-&gt;locale. $this-&gt;url_itemid;

- [ ![2016-05-21&#95;17-31-33&#95;2222&#95;-.png](/forum/attachment/31584) ](/forum/attachment/31584 "...-33&#95;2222&#95;-.png") [ ](/forum/attachment/31584?download=1 "...-33&#95;2222&#95;-.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg4NDY0NC10aGUtY2FydC1pcy1lbXB0eS1hZnRlci1yZWRpcmVjdC10by10aGUtY2FuY2VsLXVybD90bXBsPW1hcmtkb3du) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

10 years 6 months ago [\#240801](#240801) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[The cart is empty after redirect to the cancel\_url](/forum/35-orders-management/884644-the-cart-is-empty-after-redirect-to-the-cancel-url#240801 "-- url of the page with the problem -- : http://localhost/joomla/index.php?option=com&#95;hikashop&amp;ctrl=order&amp;task=cancel&#95;order&amp;order&#95;id=105&amp;Itemid=515 -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.6.14  Hi, My payment gateway doesn't send a notification request, but passes the information to the return URL. So I use notification URL as return URL and redirect the user to the HikaShop return URL at the end of the onPaymentNotification function. Same with the cancel URL. But in my case if the buyer cancels the payment on the payment gateway, the order status changes to &quot;cancelled&quot; but the user is not returned on the checkout, instead, the page opens with the list of products (http://xxx/index.php/product/listing) and message &quot;The cart is empty&quot;. Please help to understand what's wrong.  $cancel&#95;url = HIKASHOP&#95;LIVE . 'index.php?option=com&#95;hikashop&amp;ctrl=order&amp;task=cancel&#95;order&amp;order&#95;id=' . $order&#95;id . '&amp;lang='.$this-&gt;locale. $this-&gt;url&#95;itemid;")*

Hi,

It's probably because the option "Clean cart when order is" of the HikaShop configuration is set to "created" and you want it set to "confirmed".

The following user(s) said Thank You: [IGrock](/forum/user/37695-igrock "View IGrock's Profile")

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

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

Less More

- Posts: 76
- Thank you received: 9
-
-

10 years 6 months ago [\#240810](#240810) by [IGrock](/forum/user/37695-igrock "View IGrock's Profile")  Replied by *[IGrock](/forum/user/37695-igrock "View IGrock's Profile")* on topic *[The cart is empty after redirect to the cancel\_url](/forum/35-orders-management/884644-the-cart-is-empty-after-redirect-to-the-cancel-url#240810 "-- url of the page with the problem -- : http://localhost/joomla/index.php?option=com&#95;hikashop&amp;ctrl=order&amp;task=cancel&#95;order&amp;order&#95;id=105&amp;Itemid=515 -- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.6.14  Hi, My payment gateway doesn't send a notification request, but passes the information to the return URL. So I use notification URL as return URL and redirect the user to the HikaShop return URL at the end of the onPaymentNotification function. Same with the cancel URL. But in my case if the buyer cancels the payment on the payment gateway, the order status changes to &quot;cancelled&quot; but the user is not returned on the checkout, instead, the page opens with the list of products (http://xxx/index.php/product/listing) and message &quot;The cart is empty&quot;. Please help to understand what's wrong.  $cancel&#95;url = HIKASHOP&#95;LIVE . 'index.php?option=com&#95;hikashop&amp;ctrl=order&amp;task=cancel&#95;order&amp;order&#95;id=' . $order&#95;id . '&amp;lang='.$this-&gt;locale. $this-&gt;url&#95;itemid;")*

Yes, you are right.
Thank you very much

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

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