Output Snipcart-specific HTML elements like a product button or the total number of items in the cart.
Buy Button
This tag creates a Snipcart product buy button with all the data-item-* attributes according to the product's content. This is arguably the most important tag as it does all the heavy lifting for you. Learn more about product attributes.
{{ snipcart:buy }}
The automatic generation of attributes only works inside a products collection loop. If you use the tag outside of the loop, you will have to manually define each attribute yourself.
Manually Defining Attributes
You can manually define any accepted attribute directly on the tag. You can also use this to override the values of automatically generated attributes.