Hello,
I got this variant Dimension and Cubage, I already display the variant on single product, but the problem when I select other variation, the page need to refresh before its change the information
here is my code
{% for variant in product.variants %}
Dimension:{{ variant.metafields.custom.variant_size }}
{% endif %} {% if variant.metafields.custom.variant_cubage %}Cubage:{{ variant.metafields.custom.variant_cubage }}
{% endif %}anyone can help how to update variant when I click for example I have 2ft, 3ft and 4ft. I just check theme.js
and found this in Unit price change, I’m just new and studying the Expanse Theme.
_updateUnitPrice: function(variant) {
if (this.currentVariant && variant.unit_price === this.currentVariant.unit_price) {
return;
}
this.container.dispatchEvent(new CustomEvent(‘variantUnitPriceChange’, {
detail: {
variant: variant
}
}));
},