Store Product.Ids in a list and put them all in cart at the same time

Christopher99
Excursionist
18 0 5

Hello everybody,

I am trying to build a configurator where i can select multiple products and put them in the drawer cart in brooklyn theme with a click on one single button.
The configurator will be on multiple pages so i dont know if any array has to be public or so (im new to js).

Im guessing:

  1. storing all product ids in an array with buttons under each product
  2. when the "finish-button" is pressed, loop through the array at the end and execute the ajaxCart script somehow

If anybody has an idea on how to implement such functionality i would greatly appreciate it.

Have a good one!

0 Likes