Add product SKU under products in collections

Add product SKU under products in collections

milkymotorsport
Explorer
97 0 15

Can anyone give advice on how to add product SKUs under products in collections?

 

Example collection on my site: https://milkymotorsports.com/collections/fox-offroad-shocks

Replies 3 (3)

KetanKumar
Shopify Partner
37634 3670 12166

@milkymotorsport 

yes you can add this code card product snippet file this 

<div class="product-sku">{{ product.first_available_variant.sku }}</div>
If helpful then please Like and Accept Solution. Partnership of your ️ Coffee Tips and my code can bring miracles.
Want to modify or custom changes on store Hire Me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
milkymotorsport
Explorer
97 0 15

@KetanKumar I'm not sure which line to add it in?

PaulNewton
Shopify Partner
7746 679 1617

For an OS2.0 theme see if there are custom-liquid blocks/sections for the template type the area in  you want to display the additional information.

 

If a custom-liquid setting is present,

For the first variant of products used in a collection product-grid:

 

{{ product.first_available_variant.sku }}

 

On product pages , for the currently selected variant theme shows a ?variant= parameter in the url:

{{ product.selected_variant.sku }}

https://shopify.dev/api/liquid/objects/product#product-first_available_variant 

https://shopify.dev/api/liquid/objects/product#product-selected_variant 

https://shopify.dev/api/liquid/objects/variant#variant-sku 

 

If there is no appropriate custom-liquid setting the template itself will have to be modified to use one of the above liquid outputs.

 

Search similar - { theme name } { issue }

https://community.shopify.com/c/forums/searchpage/tab/message?q=debut%20theme%20collection%20sku&noS... 

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org