SKU on product page Pipeline Theme

LauraKincade
New Member
6 0 0

Hi everyone, could please anyone help me write a snippet liquid code to add onto our product page to showcase the sku number? Pipeline theme doesnt have this function. I tried with adding a liquid block with this: {{ product.sku }} but didnt work.

 

page: https://www.laurakincade.com/products/pair-of-mauro-large-table-lamps?variant=43560725020822

Replies 3 (3)

AnneLuo
Shopify Partner
414 84 79

Hello, @LauraKincade 

You should use the SKU attribute of the product variant instead of the product's.

 

If this is helpful, please Like and Accept the solution.
Want to modify or custom changes on store? Let me help.
- Feel free to Email Me   Buy Me A Coffee

swym
Excursionist
37 0 10

Hey @LauraKincade

 

To display the SKU of a product in your Shopify store, ensure that you're showcasing the SKU of the variant rather than that of the product itself. In Shopify, SKUs are associated with variants.

You can use the below liquid code to show the SKU:   

{% if product.selected_or_first_available_variant.sku != blank %}
  <p class="product-sku">SKU: {{ product.selected_or_first_available_variant.sku }}</p>
{% endif %}

For further understanding of variant objects and SKUs, you can refer to this link from Shopify's documentation: Shopify Variant Object and SKU documentation

 

Hope this helps! 

 

Regards, 

Abhishek from Swym 

Perennial
Shopify Expert
1455 114 233

Hello, @LauraKincade
You should use the SKU attribute of the product variant instead of the product's.
{{ product.selected_or_first_available_variant.sku }}

If you face any issue let me know

Thanks