I’m using the Shopify Theme Taste and I would like to find out where I can find the code of the add to card button at my product pages. I would like to add something to the code. I can’t find it in main.product.liquid or theme.liquid. The code starts with <button type=submit
The code should be in product.liquid, product-template.liquid, or product-form.liquid, but I can’t find the code.
We also need to add a code after the ending of the script in the same snippets to make the changes work, but we can only find at the end of the code but we don’t think it’s the right .
Could you help us out? We want to work with Pinterest and want Pinterest to track the add to card data for us.
This is the information I got:
Add to Cart Event
Look for the code files named product.liquid, product-template.liquid,
or product-form.liquid and open them. Where you can find the ‘add-to-cart code’ depends
depends on the theme you have installed.
If you have a ‘sticky add-to-cart’, also search for this file.
Search within the files for ‘addtocart’. Sometimes you have multiple ‘add-to-cart’
buttons’ or even a ‘sticky-add-to-cart’.
Found it? Add the following code within all or elements
(just before the closing caret):
onclick=“atcPin()”
At the bottom of the product-template.liquid file (or whatever the section is called), paste the
following code:
I’m sorry the code is not working, the add to card button is showing a liquid error line 103 and it says it could not find asset snippets/loading-spinner.liquid