WooCommerce Variable SKU Display

Hello,
On the default Woo templates there is an area at the bottom that displays tags, categories and Variations SKU. On that version the SKU updates with the variation that is selected. When using the SKU: {{dc:woocommerce:product_sku}} I get the original base SKU but no changes when the variation is selected.

Could you provide information on how I may go about having that display like the base woo files do when not using a template?

Thank you

Hello @tso,

Thanks for writing in! You will have to make sure that the SKU has its containers to make it work with the Add to Cart Form element. Please insert this code instead:

<div class="product_meta"><span class="sku_wrapper">SKU: <span class="sku" data-o_content="{{dc:woocommerce:product_sku}}"> {{dc:woocommerce:product_sku}}</span></span></div>

Kindly let us know how it goes.

1 Like

Hi!
Before your reply I dug down and found the solution below from the forums and got things working…BUT the solution you have provided is much cleaner and saved some fussing on the display of the original SKU.

So, for anyone looking for the cleanest and best way to do this, @ruenel nailed it.

Thank you for the efficient and very prompt reply!

JS method

You are most welcome, @tso.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.