Home Forums Themes Support Claue-Shopify SKU does not change when different variants are selected

Topic Resolution: Resolved


Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #28537

    Hey guys, I am now realizing months later that the SKU does not change when different variants are selected (like the product price changes) unless you physically reload the page in the browser.  I just now did a fresh install of the last claue update that you provided months ago and I also looked at your live online demo and the problem is identifiable there as well.  Please see attachments showing that the variant URL changes as I select different Letters ‘A’ ‘B’ and ‘F’ (and the price changes as appropriate) yet the SKU remains static.

    Further, I looked at the ‘.js and min.js’ files and ‘sku’  or ‘variant-sku’ etc. does not appear anywhere in either file which naturally it would have to be written somewhere into the js to function properly, right?

    Can you please correct this or tell me what I need to add to the .js files so that the SKU will indeed change as different variants are selected?  Thanks!


    You must be logged in to view attached files.

    if anyone else wants to make the SKU variant switcher actually function properly, simply search for and replace the “claue.MultipleVariants…” section in your claue.min.js.liquid file with:

    claue.MultipleVariants=function(i){var a=i.money_format,r=i.variant,t=$(“.product-single__content .product__price”),e=””,p=$(“.product-single__sku”),c=””;r&&(r.sku&&(c+='<span class=”product-single__sku”>’+r.sku+”</span>”),p.html(c),r.featured_image&&setTimeout(function(){$(‘.product-single__thumbnail-variant[data-variant-id=”‘+r.id+'”]’).trigger(“click”)},0),r.compare_at_price>r.price?(e+='<span class=”product__price–sale”>’+Shopify.formatMoney(r.price,a)+”</span>”,e+='<s class=”product__price–original” itemprop=”price” content=”‘+Shopify.formatMoney(r.price,a)+'”>’+Shopify.formatMoney(r.compare_at_price,a)+”</s>”):e+='<span class=”product__price–original”>’+Shopify.formatMoney(r.price,a)+”</span>”,t.html(e))};


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.