Re: display sku on collections page dawn template

Solved

display sku on collections page dawn template

dbwebb56
Visitor
2 0 0

I've searched and cannot find how to display the sku on a collections page using Dawn 5.0. I see a lot of code examples that work for themes before 2.0, but I can't make any of them work on Dawn. Nothing shows up.

 

I've identified that the code should go on card-product.liquid. I can put dummy text and it shows up where I want the sku to appear.

 

Strangely, I can make it work on the product page. Apparently, the product page calls some function that then supports the sku. I need to discover that function so I can incorporate it into card-product.liquid.

 

Any help would be appreciated. Thanks.

Accepted Solution (1)

Jigar_Rathod
Shopify Partner
18 7 10

This is an accepted solution.

Hello @dbwebb56 ,

You need to put this code in the card-product.liquid file for the product sku.
Code :-  {{ card_product.selected_or_first_available_variant.sku }}

Hopefully that helps.

Jigar Rathod | Shopify Developer
If my reply helpful then please Like to let me know!
If my answered is right according to your question, Mark it as an Accepted Solution.

View solution in original post

Replies 2 (2)

Jigar_Rathod
Shopify Partner
18 7 10

This is an accepted solution.

Hello @dbwebb56 ,

You need to put this code in the card-product.liquid file for the product sku.
Code :-  {{ card_product.selected_or_first_available_variant.sku }}

Hopefully that helps.

Jigar Rathod | Shopify Developer
If my reply helpful then please Like to let me know!
If my answered is right according to your question, Mark it as an Accepted Solution.
dbwebb56
Visitor
2 0 0

That worked, thanks.