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

#   Clearing cart on logout

##

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

Less More

- Posts: 74
- Thank you received: 1
-
-

14 years 4 months ago [\#56289](#56289) by [Southcoaster](/forum/user/8042-southcoaster "View Southcoaster's Profile")  *[Clearing cart on logout](/forum/2-general-talk-about-hikashop/56289-clearing-cart-on-logout#56289 "Hi,  I have included the excellent QuickLogout component as a menu item on my main-menu, but I would like it to clear out any current cart contents as well, so that when the user logs in again it is empty. Any ideas how to achieve this please?  Thanks.")* was created by *[Southcoaster](/forum/user/8042-southcoaster "View Southcoaster's Profile")*

Hi,

I have included the excellent QuickLogout component as a menu item on my main-menu, but I would like it to clear out any current cart contents as well, so that when the user logs in again it is empty.
Any ideas how to achieve this please?

Thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU2Mjg5LWNsZWFyaW5nLWNhcnQtb24tbG9nb3V0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 74
- Thank you received: 1
-
-

14 years 4 months ago [\#56290](#56290) by [Southcoaster](/forum/user/8042-southcoaster "View Southcoaster's Profile")  Replied by *[Southcoaster](/forum/user/8042-southcoaster "View Southcoaster's Profile")* on topic *[Re: Clearing cart on logout](/forum/2-general-talk-about-hikashop/56289-clearing-cart-on-logout#56290 "Hi,  I have included the excellent QuickLogout component as a menu item on my main-menu, but I would like it to clear out any current cart contents as well, so that when the user logs in again it is empty. Any ideas how to achieve this please?  Thanks.")*

Apologies this should have been posted in 'How-to'.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU2Mjg5LWNsZWFyaW5nLWNhcnQtb24tbG9nb3V0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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: 86322
- Thank you received: 14281
-
-

14 years 3 months ago [\#56348](#56348) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Clearing cart on logout](/forum/2-general-talk-about-hikashop/56289-clearing-cart-on-logout#56348 "Hi,  I have included the excellent QuickLogout component as a menu item on my main-menu, but I would like it to clear out any current cart contents as well, so that when the user logs in again it is empty. Any ideas how to achieve this please?  Thanks.")*

There is no option for that.
Carts are not deleted on logout.

Try to install and publish that plugin and it should do that.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU2Mjg5LWNsZWFyaW5nLWNhcnQtb24tbG9nb3V0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 74
- Thank you received: 1
-
-

14 years 3 months ago [\#56440](#56440) by [Southcoaster](/forum/user/8042-southcoaster "View Southcoaster's Profile")  Replied by *[Southcoaster](/forum/user/8042-southcoaster "View Southcoaster's Profile")* on topic *[Re: Clearing cart on logout](/forum/2-general-talk-about-hikashop/56289-clearing-cart-on-logout#56440 "Hi,  I have included the excellent QuickLogout component as a menu item on my main-menu, but I would like it to clear out any current cart contents as well, so that when the user logs in again it is empty. Any ideas how to achieve this please?  Thanks.")*

Hi Nicolas,

I see the QuickLogout plug-in does actually clear the cart when the user specifically logs out on the site, so apologies I can't see why I asked the question now.
However perhaps I was asking if the cart could be emptied if the user leaves the website by pressing the Windows 'X' in the top right hand corner (left on the Mac I believe).

Many thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU2Mjg5LWNsZWFyaW5nLWNhcnQtb24tbG9nb3V0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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: 86322
- Thank you received: 14281
-
-

14 years 3 months ago [\#56482](#56482) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Clearing cart on logout](/forum/2-general-talk-about-hikashop/56289-clearing-cart-on-logout#56482 "Hi,  I have included the excellent QuickLogout component as a menu item on my main-menu, but I would like it to clear out any current cart contents as well, so that when the user logs in again it is empty. Any ideas how to achieve this please?  Thanks.")*

The cart are not deleted when the user logout. It's just that the cart is assigned to the user when he logs in. Then, when he logs out the cart is kept for the user and not his "anonymous" session. If he login later on, he will get back his cart, unless he started a new cart before logging in again and that's what that plugin prevents.

That's not possible to remove the cart when the user close the browser.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU2Mjg5LWNsZWFyaW5nLWNhcnQtb24tbG9nb3V0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 74
- Thank you received: 1
-
-

14 years 3 months ago [\#56522](#56522) by [Southcoaster](/forum/user/8042-southcoaster "View Southcoaster's Profile")  Replied by *[Southcoaster](/forum/user/8042-southcoaster "View Southcoaster's Profile")* on topic *[Re: Clearing cart on logout](/forum/2-general-talk-about-hikashop/56289-clearing-cart-on-logout#56522 "Hi,  I have included the excellent QuickLogout component as a menu item on my main-menu, but I would like it to clear out any current cart contents as well, so that when the user logs in again it is empty. Any ideas how to achieve this please?  Thanks.")*

Hi Nicolas,

Thanks for the explanation.

Regards.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU2Mjg5LWNsZWFyaW5nLWNhcnQtb24tbG9nb3V0P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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.061 seconds

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