8manos / wc-variations-radio-buttons

Let your customers choose product variations using radio buttons instead of dropdowns.
https://wordpress.org/plugins/wc-variations-radio-buttons/
GNU General Public License v2.0
63 stars 34 forks source link

Added product ID to target single products #26

Closed NatachaMenjibar closed 7 years ago

NatachaMenjibar commented 7 years ago

I'm using your plugin for displaying variations in archive pages in conjunction with "Woocommerce Add to cart Ajax for variable products" plugin.

I've found a problem when selecting variable atributes in archive pages for different products with same atributes because inputs of different products has the same name in all products, and the javascript wasn't working well (was always targeting the input of the first product).

I solved it adding some customization in your variable.php, in print_attribute_radio function, adding product ids to inputs id names. That way, javascript can properly target the product imputs from every product. Maybe you can update your plugin with a similar modification.