How can I add a SKU to my collection page?

How can I add a SKU to my collection page?

CheekyChimp
Visitor
3 0 0

Need to add a SKU to my collection page but I can't find the right place. I can't list the theme as it's not allowing me to.

Replies 5 (5)

suyash1
Shopify Partner
10862 1343 1718

@CheekyChimp - you can edit the theme code to put sku in collection page

To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
CheekyChimp
Visitor
3 0 0

I looked in there and I can't see where to insert it. I'm using a theme that Shopify won't let me mention for some reason. It has the word warehouse in it. Every theme and section file I found in the help doesn't exist in my files.

suyash1
Shopify Partner
10862 1343 1718

@CheekyChimp - warehouse is the theme name, you can click on 3 dots ... and you will have an option to edit theme code, where you can find collection.liquid file and add sku code at the place you want

To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
CheekyChimp
Visitor
3 0 0

That's the part I'm looking for help with. I'm not a coder, I'm basic on that. I can't see where to add the code and I don't have the code to add.

suyash1
Shopify Partner
10862 1343 1718

@CheekyChimp - try this code for sku, put it in collection page at place where you want sku to show up

 

{%- assign current_variant = product.selected_or_first_available_variant -%}
<span>{{ current_variant.sku }}</span>
To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.