d
Topic
Rebeca Member
Posts:
1
3 months ago

Venture Theme - How do I hide variants on the product page for an option with only one variant?

I'm using the theme Venture. Does anyone know how I hide variants on the product page for an option with only one variant?

i
Replies
Posts:
4
17 days ago

im curious to find this out to im trying to remove color codes for shirts with multiple sizes but only one color

Posts:
1099
Last edited 17 days ago

Hi guys,  

this can be done with some javascript, like this:

/* hide selectors with only one choice */
$( $('.selector-wrapper').filter( function() { 
     return $(this).find('option').size() < 2;
  }).hide() )

May try putting it at the bottom of the theme.js.liquid  Asset

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