Solved

What's the method to display SKU in Shopify cart and checkout?

mbo
Visitor
2 0 0

Hi, I managed to display the SKU on the product page with this code:

{% assign current_variant = product.selected_or_first_available_variant %}
<span class="variant-sku">{{ current_variant.sku }}</span>

I can't do that in the shopping cart and check out.
Can someone help?

Theme: Warehouse


It should look like this:

-------------

Cart

Product 1
Price
SKU

Product 2
Price
SKU

--------------


Thanks in advice, MBO

Accepted Solution (1)

Developer-G
Shopify Partner
3033 593 846

This is an accepted solution.

Hello @mbo ,

Use same code in input hidden field as value and place it inside the form tag in product single page.

e.g. 

<input id="sku" type="hidden" value="{{ current_variant.sku }}"  name="properties[SKu]">

Thanks

- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on store Hire me.
- Email: guleriathakur43@gmail.com - Skype: navrocks1 ,
- Try GEMPAGES a great page builder
-Advance Search Filter

View solution in original post

Replies 3 (3)

Developer-G
Shopify Partner
3033 593 846

This is an accepted solution.

Hello @mbo ,

Use same code in input hidden field as value and place it inside the form tag in product single page.

e.g. 

<input id="sku" type="hidden" value="{{ current_variant.sku }}"  name="properties[SKu]">

Thanks

- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on store Hire me.
- Email: guleriathakur43@gmail.com - Skype: navrocks1 ,
- Try GEMPAGES a great page builder
-Advance Search Filter
mbo
Visitor
2 0 0

Hello @Developer-G,

that works great. Many Thanks!

 

Bowtastic
Visitor
1 0 0

Hi,

 

We are using the same theme, where in the cart liquid would you add this code?

 

We are trying to get SKU or even barcode visible on products pages, cart and checkout.

 

Thanks