Having several instances of a same product in the cart

  • Posts: 634
  • Thank you received: 16
3 years 11 months ago #327745

-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.23

Hi,

We need to have several instances of the same product in the same cart, with some custom fields that will be processed by a custom plugin.

We have to know something about it?

For example:

1. If having multiple instances of the product in the same cart will have some problem like data being wiped in some context (or if there is a function that deletes duplicated entries in the cart)

2. If the data is being mixed in some point (I have checked the class cart and I haven't seen anything)

Thanks in advance.

--
Victor

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 10 months ago #327751

Hi,

Having several instances of the same product with different characteristics, options or custom item fields values in the same cart is no problem.
You can test it here:
demo.hikashop.com/index.php/en/hikashop/product-page/with-form
If you add the product to the cart with different values in the custom item fields, you'll have several times the same product in the cart with the different values you enter.
If you add to the cart the same product with the same custom item fields/characteristics/options then the quantity of the product already in the cart will be increased instead of creating a new entry.
So that's basically it.

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

Time to create page: 0.055 seconds
Powered by Kunena Forum