Hi,
First time user here
I’ve got a basic add to cart
button working. It adds products to the cart and I’ve added custom pricing as outlined in the docs
The button part of the template looks like this:
<button class="buy-button snipcart-add-item"
data-item-id="{{ id }}"
data-item-price="{{ price }}"
data-item-url="{{ current_url }}"
data-item-description="why does this not work?"
data-item-image="{{ thumbnail }}{{ glide:url preset='w320_h320' }}{{ /thumbnail }}"
data-item-name="{{ title }}"
data-item-custom1-name="Strap Colour"
data-item-custom1-options="Black|Brown|Gold +50.00[+50.00]">
Add to cart £{{ price }}
</button>
But I can’t get the data-item-description
to work? I’m running the site via ngrok as described in the docs… and I’ve updated the domain in https://app.snipcart.com/dashboard/account/domains
I’m running my site locally via valet
, as mentioned everything else works, price and thumbnail show up in the cart
The HTML of the button looks like this:
<button class="buy-button snipcart-add-item" data-item-id="e03b4d5a-0e7e-4d42-a7ad-48d9e2b6a2f6" data-item-price="499" data-item-url="http://xxxxxxxxx.ngrok.io/watches" data-item-description="The first G-SHOCK model DW-5000C was born in 1983. Its symbolic square design is reinvented with a full-metal shock-resistant structure and the latest advanced functions, including Smartphone Link. design of the first model is faithfully reproduced using full metal, latest construction and functions." data-item-image="/img/containers/assets/watches/GMW-B5000GD-4ER-5.jpg/a61b60ae54d0b3d7ada29918ccf2af93.jpg" data-item-name="Casio Watch GMW-B5000GD-4ER" data-item-custom1-name="Strap Colour" data-item-custom1-options="Black|Brown|Gold +50.00[+50.00]">
Add to cart £499
</button>
What am I doing wrong?
Here’s a screenshot of the the account/domains
page