Need to auto refresh when variant is chosen

Highlighted
New Member
1 0 0

Running into an issue.

Whenever the customer chooses a variant (ex. size 1 or size 2. different price breaks for different sizes), theres a price break table that is displayed. The table stays on the price breaks for size 1, and will not change to the correct table until you manually refresh.

Is there any way to auto refresh the page when the customer changes the variant/size? I am using the Masonry theme and using Bold Custom Pricing- Wholesale.

0 Likes
Highlighted
Shopify Partner
1022 212 256

Hello,

  jQuery(function() {
    $('.single-option-selector').on('change', function(){
        setTimeout(function(){ 
          if($('[name="id"]').val() != "{{ product.selected_or_first_available_variant.id }}"){
            location.reload();
          }
        }, 1);
    });
  });

Use this script, it will reload page every-time when variant change.  but may be you have to make changes in it a/to your theme code.
You can use in theme.js or related file a/to theme you used.

Thanks

Want to modify or custom changes on store hire me.
My Email: guleriathakur43@gmail.com
Skype: navrocks1
If helpful then please Like and Accept Solution.
If you are happy and want to donate small Click here (Its my paypal)
0 Likes