Snipcart
Output Snipcart-specific HTML elements like a product button or the total number of items in the cart.
Last updated
Was this helpful?
Output Snipcart-specific HTML elements like a product button or the total number of items in the cart.
Last updated
Was this helpful?
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 .
You can manually define any accepted attribute directly on the tag. You can also use this to override the values of automatically generated attributes.
You can also fully customize your buy buttons with your own markup. Use this tag to get the product's data attributes:
A Snipcart cart button.
A Snipcart sign-in button.
The total number of items in the cart.
The total price of items in the cart.
There are a couple of parameters you may use on the tags.
Parameter
Description
Supported By
class
Add classes to the HTML element
buy
cart
signin
items
price
text
Override the default text
buy
cart
signin
Example: Add some classes to the cart button and override the default text.