Show SKU numbers (2024)

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:

Show SKU numbers (1)

Sectioned and non-sectioned themes

Steps for Sectioned themes

Show SKU numbers on product pages

  1. From your Shopify admin, go to Online Store > Themes.
  2. Find the theme you want to edit, click the button to open the actions menu, and then click Edit code.
  3. In the Sections directory, click product.liquid or product-template.liquid.
  4. Find the following Liquid tag:
{{ product.title }}

This is the code that renders your product titles on the product page.

  1. On a new line below the line of code that includes {{ product.title }}, paste the following code:
{% assign current_variant = product.selected_or_first_available_variant %}<span class="variant-sku">{{ current_variant.sku }}</span>
  1. 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.

  1. From your Shopify admin, go to Products.

  2. Click the product that you want to edit.

  3. For products with multiple variants, in the Variants section, add your SKU numbers:

    Show SKU numbers (2)

    For products without variants, in the Inventory section, add your SKU number:

    Show SKU numbers (3)
  4. Click Save.

Steps for Non-sectioned themes

Show SKU numbers on product pages

Steps:

  1. From your Shopify admin, go to Online Store > Themes.
  2. Find the theme you want to edit, click the button to open the actions menu, and then click Edit code.
  3. In the Templates directory, click product.liquid.
  4. Find the following Liquid tag:
{{ product.title }}

This is the code that renders your product titles on the product page.

  1. On a new line below the line of code that includes {{ product.title }}, paste the following:
{% assign current_variant = product.selected_or_first_available_variant %}<span class="variant-sku">{{ current_variant.sku }}</span>
  1. Click Save.
  2. If you're using a free Shopify theme that isn't Brooklyn or Venture, then find the following line of code:
var selectCallback = function(variant, selector) {

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:
theme.productVariantCallback = function (variant, selector) {
  1. On a new line below, paste the following code:
 if (variant) { document.querySelector('.variant-sku').innerText = variant.sku; } else { document.querySelector('.variant-sku').innerText = ''; }

Your code should look something like this:

 var selectCallback = function(variant, selector) { if (variant) { document.querySelector('.variant-sku').innerText = variant.sku; } else { document.querySelector('.variant-sku').innerText = ''; } self.productPage({ money_format: theme.moneyFormat, variant: variant, selector: selector, translations: { add_to_cart : theme.productStrings.addToCart, sold_out : theme.productStrings.soldOut, unavailable : theme.productStrings.unavailable } }); };
  1. 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.

  1. From your Shopify admin, go to Products.

  2. Click the product that you want to edit.

  3. For products with multiple variants, in the Variants section, add your SKU numbers:

    Show SKU numbers (4)
    For products without variants, in the Inventory section, add your SKU number:
    Show SKU numbers (5)
  4. Click Save.

Show SKU numbers (2024)
Top Articles
Pros and Cons of Homeschooling | Homeschool for High School - USCI
Is there a difference between a paid SSL Certificate and a free one? -
Uhauldealer.com Login Page
Odawa Hypixel
Cottonwood Vet Ottawa Ks
What spices do Germans cook with?
Botanist Workbench Rs3
Concacaf Wiki
You can put a price tag on the value of a personal finance education: $100,000
Matthew Rotuno Johnson
Culvers Tartar Sauce
George The Animal Steele Gif
Worcester On Craigslist
Snow Rider 3D Unblocked Wtf
Georgia Vehicle Registration Fees Calculator
Weather Rotterdam - Detailed bulletin - Free 15-day Marine forecasts - METEO CONSULT MARINE
Mission Impossible 7 Showtimes Near Marcus Parkwood Cinema
Little Caesars 92Nd And Pecos
Pickswise Review 2024: Is Pickswise a Trusted Tipster?
At&T Outage Today 2022 Map
Used Patio Furniture - Craigslist
Housing Intranet Unt
Smayperu
Springfield.craigslist
Lehpiht Shop
RFK Jr., in Glendale, says he's under investigation for 'collecting a whale specimen'
Pickle Juiced 1234
The Legacy 3: The Tree of Might – Walkthrough
Truckers Report Forums
Pill 44615 Orange
About Us | SEIL
Why Holly Gibney Is One of TV's Best Protagonists
Pokemon Reborn Locations
Flipper Zero Delivery Time
O'reilly's El Dorado Kansas
Acts 16 Nkjv
Locate phone number
Arcane Bloodline Pathfinder
Rs3 Nature Spirit Quick Guide
Patricia And Aaron Toro
Big Reactors Best Coolant
The Nikki Catsouras death - HERE the incredible photos | Horror Galore
Holzer Athena Portal
Graduation Requirements
Identogo Manahawkin
Missed Connections Dayton Ohio
Mytmoclaim Tracking
Myhrkohls.con
Deviantart Rwby
Lsreg Att
Adams County 911 Live Incident
Southern Blotting: Principle, Steps, Applications | Microbe Online
Latest Posts
Article information

Author: Wyatt Volkman LLD

Last Updated:

Views: 5746

Rating: 4.6 / 5 (66 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Wyatt Volkman LLD

Birthday: 1992-02-16

Address: Suite 851 78549 Lubowitz Well, Wardside, TX 98080-8615

Phone: +67618977178100

Job: Manufacturing Director

Hobby: Running, Mountaineering, Inline skating, Writing, Baton twirling, Computer programming, Stone skipping

Introduction: My name is Wyatt Volkman LLD, I am a handsome, rich, comfortable, lively, zealous, graceful, gifted person who loves writing and wants to share my knowledge and understanding with you.