Empty cart in show_default.php

  • Posts: 12
  • Thank you received: 1
2 weeks 1 day ago #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->removeCart = true;

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

Please Log in or Create an account to join the conversation.

  • Posts: 66619
  • Thank you received: 9806
  • MODERATOR
2 weeks 23 hours ago #309659

Hi,

You would have to do:

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

The following user(s) said Thank You: fernandoIncerco

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 1
2 weeks 17 hours ago #309681

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

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

You saved me again!!

Please Log in or Create an account to join the conversation.

Time to create page: 0.046 seconds
Powered by Kunena Forum