• Sachin

    (@sachindev)


    I have variable products that have two attributes size and colour.Now,I have to select both colour and size to see variable product image. I want to size get selected automatically after i select colour.I want this on click not by defualt.

    Thank you, I am new in wordpress development please reply as soon as possible it’s urgent work for me.

Viewing 1 replies (of 1 total)
  • Thread Starter Sachin

    (@sachindev)

    solved,

    var clicked ;
    
    jQuery('.color-variable-item').on('click',()=>{
      if(!clicked){
       jQuery(".button-variable-item").each(function(){
         if(!jQuery(this).hasClass('disabled')){
          jQuery(this).trigger('click')
           clicked = true;
         }     
       });
      }   
    });
    • This reply was modified 4 years ago by Sachin.
Viewing 1 replies (of 1 total)
  • The topic ‘Want to select size on variation product if colour is selected only first time.’ is closed to new replies.