wagnerwagner / merx

Merx is a plugin to create online shops with Kirby.
https://merx.wagnerwagner.de
104 stars 10 forks source link

How do you add different types of sizes for a product? #59

Closed Tazi0 closed 2 years ago

Tazi0 commented 2 years ago

I've gone so far as making a structure as a field, show the options on the front-end and add the chosen size to the order. But when trying with multiple sizes. The Cart object adds the different sizes together (while they should be separated) and thus merging the sizes and causing an issue. How do you separate the cart items?

tobiasfabian commented 2 years ago

You need to add an additional key to the $cart-add() method as described here https://merx.wagnerwagner.de/cookbooks/product-variants#add-to-cart.

Does this solve your issue?

Tazi0 commented 2 years ago

it does, thanks!