Remove product variant URL ?variant=31044141645858 on homepage

Highlighted
New Member
1 0 0

Hi all,

 

With the other products I have disabled the variant URL, but on the homepage it still shows that variant URL. The first section of the homepage is a collection.

 

How can I delete that variant URL on the homepage?

 

Link to webshop

0 Likes
Shopify Expert
2577 41 602

Not sure about the exact location of the code, but there must be something similar to 

    new Shopify.OptionSelectors('product-selectors', {
      product: {{ product | json }},
      onVariantSelected: selectCallback, 
      enableHistoryState: true
    });   

in the snippet which outputs the featured product (do not change the actual product page!)

Change enableHistoryState: true to enableHistoryState: false

 

This should prevent the url modification.

Want to hire me to tweak a theme? Mail me at tairli@yahoo.com! My post solved your problem? This is my Paypal too :)
0 Likes