Add Text in front of Skew Display

BradSCJB
Explorer
63 0 104

I followed this tutorial with great success...

https://shopify.dev/tutorials/customize-theme-show-sku-numbers

but I would like to add some text in front of the skew.

Example:

Part Number:

So it would look like this....

Part Number: [skew number]

0 Likes
pvoulg
Shopify Partner
171 26 45

Hi @BradSCJB,

If you copied this line from the tutorial: 

<span class="variant-sku">{{ current_variant.sku }}</span>

 

You can change it to this: 

<span class="variant-sku">Part Number: {{ current_variant.sku }}</span>

 

Panos Voulgaris
Creative director / Partner @ MALVI
Founder @ function( )
0 Likes
BradSCJB
Explorer
63 0 104

I tried that, but it doesn't work.

If this makes any sense...... When I refresh the page I see Part Number: { current_variant.sku }} for a split second, then it just shows the actual sku for that product. Doesn't include the "Part Number:" pre-text

0 Likes
pvoulg
Shopify Partner
171 26 45

Hey @BradSCJB,

Not sure I can help you any further without visiting the page where that issue occurs. If you can share your store's URL, maybe I can spot why that happens.

Panos Voulgaris
Creative director / Partner @ MALVI
Founder @ function( )
0 Likes