Show SKU numbers on product pages
SKUs (stock keeping units) are numbers, typically alphanumeric, that are used to help identify products and track inventory. If a store uses SKUs, then a unique number is assigned to each individual product variant. You can show SKU numbers for variants on your product pages by editing your theme code:
Sectioned and non-sectioned themes
On this page
Steps for Sectioned themes
Show SKU numbers on product pages
- From your Shopify admin, go to Online Store > Themes.
- Find the theme you want to edit, click the … button to open the actions menu, and then click Edit code.
- In the Sections directory, click
product.liquid
orproduct-template.liquid
. - Find the following Liquid tag:
This is the code that renders your product titles on the product page.
- On a new line below the line of code that includes
{{ product.title }}
, paste the following code:
- Click Save.
Select your theme
The next steps for this customization vary depending on your theme. Click the button for your theme and follow the instructions.
Add SKU numbers to your product variants from the admin
To have SKUs appear on your product pages, you must add SKU numbers to your product variants from in Shopify admin.
From your Shopify admin, go to Products.
Click the product that you want to edit.
-
For products with multiple variants, in the Variants section, add your SKU numbers:
For products without variants, in the Inventory section, add your SKU number:
Click Save.
Steps for Non-sectioned themes
Show SKU numbers on product pages
Steps:
- From your Shopify admin, go to Online Store > Themes.
- Find the theme you want to edit, click the … button to open the actions menu, and then click Edit code.
- In the Templates directory, click
product.liquid
. - Find the following Liquid tag:
This is the code that renders your product titles on the product page.
- On a new line below the line of code that includes
{{ product.title }}
, paste the following:
- Click Save.
- If you're using a free Shopify theme that isn't Brooklyn or Venture, then find the following line of code:
If you cannot find the above line of code in product.liquid
, then you will find it in theme.liquid
, in the Layout directory.
-
Brooklyn and Venture: If you are using Brooklyn or Venture, then you will need to find and edit a different line of code. In the Assets directory, click
theme.js.liquid
, and find the following line of code:
- On a new line below, paste the following code:
Your code should look something like this:
- Click Save.
Add SKU numbers to your product variants from the admin
To have SKUs appear on your product pages, you must add SKU numbers to your product variants from in Shopify admin.
From your Shopify admin, go to Products.
Click the product that you want to edit.
For products with multiple variants, in the Variants section, add your SKU numbers:
For products without variants, in the Inventory section, add your SKU number:Click Save.