How to Add the data-product-id and/or data-variant-id Attribute to an Element
If a price on your website that is included in your test is not updating in preview mode, or is highlighted in blue, use this guide to resolve it.
Background
Step 1: Inspect the price that is not working
Step 2: Find a unique combination of classes, IDs, and/or attributes

Step 3: Download the 'Shopify Theme File Search by EZFY' Chrome extension
Step 4: Open the code editor in Shopify
Step 5: Search the files


Step 6: Search each .liquid file to find the text
Step 7: Find the closest HTML open tag to the text.
Step 8: Insert a data-product-id and/or data-variant-id snippet.
Last updated