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

#   Empty cart in show\_default.php

##

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

Less More

- Posts: 26
- Thank you received: 1
-
-

7 years 3 months ago [\#309656](#309656) by [fernandoIncerco](/forum/user/58147-fernandoincerco "View fernandoIncerco's Profile")  *[Empty cart in show\_default.php](/forum/26-product-category-display/898057-empty-cart-in-show-default-php#309656 "-- HikaShop version -- : 4.1 -- Joomla version -- : 3.9  Hello, I need to clean the cart every time the user enter into the product page, I did it in the past but I can't remembre how I did it :(((  I think that I added a comand like this : $this-&gt;removeCart = true;  But it doesn't works... Can you help me?")* was created by *[fernandoIncerco](/forum/user/58147-fernandoincerco "View fernandoIncerco's Profile")*

-- HikaShop version -- : 4.1
-- Joomla version -- : 3.9

Hello,
I need to clean the cart every time the user enter into the product page, I did it in the past but I can't remembre how I did it ![:(](/media/kunena/emoticons/22.png ":(")((

I think that I added a comand like this :
$this-&gt;removeCart = true;

But it doesn't works... Can you help me?

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

7 years 3 months ago [\#309659](#309659) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Empty cart in show\_default.php](/forum/26-product-category-display/898057-empty-cart-in-show-default-php#309659 "-- HikaShop version -- : 4.1 -- Joomla version -- : 3.9  Hello, I need to clean the cart every time the user enter into the product page, I did it in the past but I can't remembre how I did it :(((  I think that I added a comand like this : $this-&gt;removeCart = true;  But it doesn't works... Can you help me?")*

Hi,

You would have to do: Code:

$class = hikashop_get('class.cart'); $class-&gt;resetCart();

The following user(s) said Thank You: [fernandoIncerco](/forum/user/58147-fernandoincerco "View fernandoIncerco's Profile")

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

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

Less More

- Posts: 26
- Thank you received: 1
-
-

7 years 3 months ago [\#309681](#309681) by [fernandoIncerco](/forum/user/58147-fernandoincerco "View fernandoIncerco's Profile")  Replied by *[fernandoIncerco](/forum/user/58147-fernandoincerco "View fernandoIncerco's Profile")* on topic *[Empty cart in show\_default.php](/forum/26-product-category-display/898057-empty-cart-in-show-default-php#309681 "-- HikaShop version -- : 4.1 -- Joomla version -- : 3.9  Hello, I need to clean the cart every time the user enter into the product page, I did it in the past but I can't remembre how I did it :(((  I think that I added a comand like this : $this-&gt;removeCart = true;  But it doesn't works... Can you help me?")*

Thanks Nicolas,
Finally I add this code and it works:
Code:

$cart = hikashop_get('class.cart'); $cart-&gt;resetCart(false);

You saved me again!!

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

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