How to get the Shopify product ID?

Tweet LinkedIn
#36445904240532

You can extract the Shopify product ID in 2 ways:

  1. Get the Shopify product ID via the admin section of your store
  2. Get the Shopify product ID via liquid code

1. Get the Shopify product ID via the admin section of your store

First you need to login inside your Shopify dashboard. If you do not know how please follow the tutorial: “How to login into your shopify store?

Once you are logged inside go to the products page:

Shopify admin dashboard.
Shopify admin dashboard.

On the products page select a product (marked with 1 in the image below):

Shopify products listing page.
Shopify products listing page.

On the product page examine the URL in your browser’s address bar and you’ll see the product ID:

Shopify product ID in the admin dashboard on the product edit page.
Shopify product ID in the admin dashboard on the product edit page.

Your browser URL should be similar to the one in the image above and should look similar to this one:

https://shop-name.myshopify.com/admin/products/32472250349095

The number after “/products/” is the product product ID number. In this example, the product ID is 32472250349095 but yours will be different.

2. Get the Shopify product ID via liquid code

You can print on the screen the Shopify product ID from inside the theme files via liquid code.

{{ product.id }}

Conclusion

Whichever method you choose it should not take you more than one minute to find out your Shopify product ID. All methods worked correctly at the time this article was written. Soon as I find more I’ll add them here.