SKU on product page Pipeline Theme

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
1255 223 258

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
Trailblazer
172 36 77

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 

- Appreciate the assistance. Show your approval with a Like! And when your question finds its answer, seal the deal by marking it as an Accepted Solution!
- Our Solutions: Wishlist Plus | Swym Back in Stock Alerts | Swym Gift Lists and Registries

Perennial
Shopify Partner
1474 115 234

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