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

#   Shopping cart after order is not empty

##

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

Less More

- Posts: 127
- Thank you received: 2
- [](https://montaza-namjestaja.com.hr/)
-

6 years 10 months ago [\#314578](#314578) by [komir](/forum/user/2810-komir "View komir's Profile")  *[Shopping cart after order is not empty](/forum/35-orders-management/898975-shopping-cart-after-order-is-not-empty#314578 "Hello, need help. After the user makes an order, in their shopping cart all ordered items are still inside the shopping cart. How to make, after ordering users shopping cart to be emptied? Thank you")* was created by *[komir](/forum/user/2810-komir "View komir's Profile")*

Hello, need help.
After the user makes an order, in their shopping cart all ordered items are still inside the shopping cart. How to make, after ordering users shopping cart to be emptied?
Thank you

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

6 years 10 months ago [\#314603](#314603) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Shopping cart after order is not empty](/forum/35-orders-management/898975-shopping-cart-after-order-is-not-empty#314603 "Hello, need help. After the user makes an order, in their shopping cart all ordered items are still inside the shopping cart. How to make, after ordering users shopping cart to be emptied? Thank you")*

Hi,

Check the setting "clean cart after order is" in the HikaShop configuration. If it's set to "created" then the cart will be emptied directly after the order is created.

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

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

Less More

- Posts: 127
- Thank you received: 2
- [](https://montaza-namjestaja.com.hr/)
-

6 years 10 months ago [\#314625](#314625) by [komir](/forum/user/2810-komir "View komir's Profile")  Replied by *[komir](/forum/user/2810-komir "View komir's Profile")* on topic *[Shopping cart after order is not empty](/forum/35-orders-management/898975-shopping-cart-after-order-is-not-empty#314625 "Hello, need help. After the user makes an order, in their shopping cart all ordered items are still inside the shopping cart. How to make, after ordering users shopping cart to be emptied? Thank you")*

Hello it is set up to "created". After my test order items are still in a shopping card.
Thank you

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

6 years 10 months ago [\#314631](#314631) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Shopping cart after order is not empty](/forum/35-orders-management/898975-shopping-cart-after-order-is-not-empty#314631 "Hello, need help. After the user makes an order, in their shopping cart all ordered items are still inside the shopping cart. How to make, after ordering users shopping cart to be emptied? Thank you")*

Hi,

Then the issue is probably that you have several carts assigned to your user account and when you finished the checkout the next cart got loaded.
To do your test, please first delete all the carts of your user account via the Customers&gt;Carts menu. Then, do a checkout of a cart on your website and it should work fine.

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

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

Less More

- Posts: 221
- Thank you received: 8
-

4 years 10 months ago -  4 years 10 months ago [\#338634](#338634) by [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")  Replied by *[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")* on topic *[Shopping cart after order is not empty](/forum/35-orders-management/898975-shopping-cart-after-order-is-not-empty#338634 "Hello, need help. After the user makes an order, in their shopping cart all ordered items are still inside the shopping cart. How to make, after ordering users shopping cart to be emptied? Thank you")*

hi.
I have similar problem but for me , i use mass action for on after order confirmed redirect to some joomla menu. i use this code in Run PHP code box: Code:

$url="index.php?Itemid=337"; JFactory::getApplication()-&gt;redirect( JRoute::_($url, false) );

and when i disable that , the cart empty successfully.
i can set return url in payment method but if user use 100% coupon it is not work.
even i use that code in the plugin but the problem is still and cart not empty.
i write my redirect code at the end of checkout/after_end.php and it is work without problem

Last edit: 4 years 10 months ago by [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile").

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

4 years 10 months ago [\#338644](#338644) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Shopping cart after order is not empty](/forum/35-orders-management/898975-shopping-cart-after-order-is-not-empty#338644 "Hello, need help. After the user makes an order, in their shopping cart all ordered items are still inside the shopping cart. How to make, after ordering users shopping cart to be emptied? Thank you")*

Hi,

The cart is normally cleared in the controller of the after_end view file. So if you use a mass action to redirect the user somewhere after the order is created/confirmed, you'll skip the after_end controller.
So yes, the solution is indeed to add instead the redirect in the after_end view file, which is displayed just after the after_end controller so that the cart will be cleared before your redirect.

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

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

Less More

- Posts: 221
- Thank you received: 8
-

4 years 10 months ago [\#338901](#338901) by [sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")  Replied by *[sadaf3d](/forum/user/46256-sadaf3d "View sadaf3d's Profile")* on topic *[Shopping cart after order is not empty](/forum/35-orders-management/898975-shopping-cart-after-order-is-not-empty#338901 "Hello, need help. After the user makes an order, in their shopping cart all ordered items are still inside the shopping cart. How to make, after ordering users shopping cart to be emptied? Thank you")*

excuse me nicolas.
it seems i have mistake. my code not work in after_end.php . i must use my redirect code at the end of end.php. i don't understand their different.

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

4 years 10 months ago [\#338916](#338916) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Shopping cart after order is not empty](/forum/35-orders-management/898975-shopping-cart-after-order-is-not-empty#338916 "Hello, need help. After the user makes an order, in their shopping cart all ordered items are still inside the shopping cart. How to make, after ordering users shopping cart to be emptied? Thank you")*

Hi,

Normally, the checkout workflow goes like this:

click on "finish" -&gt; order is created -&gt; "end" view file is displayed with the redirect code of the payment plugin to go to the payment page of the payment gateway -&gt; user enter his credit card information and validates -&gt; the user is redirected back to the "after_end" view file -&gt; the cart is cleared in the controller -&gt; the "after_end" view file is displayed with the thank you message.

However, some payment plugins work differently:

click on "finish" -&gt; the payment is processed directly with the credit card information already filled in during the checkout -&gt; order is created -&gt; the cart is cleared in the controller -&gt; the "end" view file is displayed with the thank you message.

And some other payment plugins might have a different behavior, these are just the main ones.

I don't know which payment plugin you're using so I'm not sure what is the situation.

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

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

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