You are viewing an older version of the Snipcart documentation (2.x).
View the latest version (3.x) →
Template Guides
Template Tags
Cart JavaScript
{{ craft.snipcart.cartJs() }}You can also pass in any options defined in the Snipcart docs (opens new window).
{{ craft.snipcart.cartJs({
loadStrategy: 'manual',
}) }}Cart Button
{{ craft.snipcart.cartLink() }}textcan be used to change the button's inner text, which defaults to “Shopping Cart”.showCountistrueby default and includes a<span>element classed withsnipcart-items-countwhich Snipcart will populate with the number of items in the shopping cart.showPriceistrueby default and includes a<span>element classed withsnipcart-total-pricewhich Snipcart will populate with the price of the shopping cart.
{{ craft.snipcart.cartLink('Shopping Cart', true, true) }}
Last updated: May 2, 2026, 3:24:31 PM