Find a variant ID
Variant IDs are sometimes needed to make theme code customizations that target specific product variants. If you need to find a variant ID, you can do so from within your Shopify admin.
From your Shopify admin, go to Products.
Click a product that has a variant.
Do either of the following:
- If you have only one location for your store, then in the Variants section of the product detail page, click Edit beside the product variant.
- If you have more than one location for your store, then in the Variants section of the product detail page, click the product variant.
Examine the URL in your browser's address bar. Your URL should be similar to the following URL example:
The number after
/variants/ is the variant ID number. In this example, the variant ID is