webdna / commerce-bundles

Other
3 stars 4 forks source link

Adding bundle to the shopping cart #1

Closed piotrpog closed 4 years ago

piotrpog commented 4 years ago

How can i add bundle to the shopping cart?

mcjackson18 commented 4 years ago

@piotrpog, on your bundle page you will have access to the bundle variable.

You can then use the standard Craft Commerce add to cart form (see example here https://craftcms.com/docs/commerce/2.x/adding-to-and-updating-the-cart.html) replacing <input type="hidden" name="purchasableId" value="{{ variant.id }}"> with <input type="hidden" name="purchasableId" value="{{ bundle.id }}">

piotrpog commented 4 years ago

@mcjackson18 Thanks!