Ecommerce for Statamic

Add to cart tag

Place this single tag on a template to add products to your cart by visiting a URL.
You can add parameters to the tag, but it is more useful when passing parameters through the query string.


The URL of the product to add.
How many to add?
The index of the product modifier.
Extra data to make the cart item unique. Pipe delimited, colon separated values, eg. size:small|color:red
The URL to be shown after the item is added.
The URL to be shown if there is a problem adding the item.
The encrypted configuration for the item to be added.
This is only available as a query string parameter and can be generated using the add to cart link tag. If you use this, the other parameters can’t be used.


Place {{ bison:add_to_cart }} by itself on a template and visit /cart/add?product=/products/bowie-knife&quantity=2&option=2&return=/checkout to add 2 Bowie Knives with brown handles to your cart and redirect to the checkout page.

Problem with this page? Edit it on Github.