Add the same item multiple time at the same time, but showing it separately in the cart

Hi!

I’m trying to add the same item multiple times at the same time in the cart, but then showing it separately (so unstacked and without using the quantity) to my user. For example, if they select 2 participations, I want the cart to show two separates items when they click on add to cart.

I can achieve a similar result using data-item-stackable=“never” & data-item-max-quantity=“1”, but then my user would need to click twice on the button.

What’s the best way to do this ?

Hi there,

The best way to achieve this would be to rely on the Javascript SDK to add both items at once, with these same attributes set.

Note that you can provide and array to the add method.

2 Likes