How to add optgroup in Select Dropdown on variation product?
-
Hi.
I am using woocommerce and one extension named Woocommerce product attribute.
I have already code to display optgroup in select dropdown. But the issue is in javascript named ‘add-to-cart-variation.js’. Due to this function in given js of woocommerce extension,$( '.variations_form .variations select' ).change();
all the value of select get reset (i am thinking so) and when i view the Select Dropdown, all the optgroup label are at the first and remaining option value procedd after all optgroup label are displayed.
For example:
Result should be like this->
A-Label
—A1
—A2
B-Label
—B1
—B2But the result displayed is like this->
A-Label
B-Label
A1
A2
B1
B2
how to solve this issue? please help.
- The topic ‘How to add optgroup in Select Dropdown on variation product?’ is closed to new replies.