After moving the location of my sku, it does not update when selecting a new variant.

Brett_Main
New Member
4 0 0

I wanted to move the location of my sku lower in the same div. However, once I moved it, it simply stopped updating when selecting a new variant. When I place it back in its original position, it starts working again. Does anyone know as to why?

For example, I'm trying to move it below "<div class="product-page-tabsz">".

 

Here is the code below:

 

Liquid

{%- if settings.sku_enable -%}
<p id="Sku-{{ section_id }}" class="product-single__sku">
{%- if current_variant.sku -%}
{{ current_variant.sku }}
{%- endif -%}
</p>
{%- endif -%}

 

JS

_updateSKU: function(variant) {
if (variant.sku === this.currentVariant.sku) {
return;
}

this.$container.trigger({
type: 'variantSKUChange',
variant: variant
});
},

Screen Shot 2021-02-24 at 4.01.15 PM.png

0 Likes