[FIX] Not working variations
-
I came up with the problem with this plugin that the JS file is not working correctly when it comes to finding the hidden select.
Could one of the developers check if this code solves the possible ongoing issue?
Issue :
I set up the variations with colours as intended. But whenever I click on the colour it gives me the popup that the product is not available.So it triggers this in frontend.js file
$form.trigger('tawcvs_no_matching_variations', [$el] );
Solution :
After some debugging I figured out that the $select variable has problems with finding the select element. Because it is looking for the value class$select = $el.closest( '.value' ).find( 'select' )
To fix it I replaced that variable into this.
$select = $form.find('select[name="'+$el.parent().attr('data-attribute_name')+'"]')
reason behind using .parent() is because .closest is not working as intended in my situation.
- The topic ‘[FIX] Not working variations’ is closed to new replies.