Skip to main content

Replacing previous item in cart with new one.

12 years 1 month ago #176745 by Phoblution
-- 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.

12 years 1 month ago #176748 by Xavier
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.044 seconds
Powered by Kunena Forum