Replacing previous item in cart with new one.

  • Posts: 2
  • Thank you received: 0
10 years 7 months ago #176745

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.32
-- Browser(s) name and version -- : Chrome

I limited the number of items in the cart to 1, but it's not quite what I wanted. is there a way to replace the previous item with the new one every time you click "add to cart" on another item?

If not, is there a way to automatically clear out the cart when you leave the checkout and go back to exploring the site?

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

  • Posts: 13201
  • Thank you received: 2322
10 years 7 months ago #176748

Hi,

The easiest way will be to make a little plugin based on the function "onBeforeCartUpdate()" in order to reset the cart before adding a new product.
This way it will replace the item in cart with the new one.

Here is some documentation:
hikashop.com/support/support/documentati...r-documentation.html

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

Time to create page: 0.062 seconds
Powered by Kunena Forum