mercredi 20 septembre 2017

how to add duplicated woocommerce extra product options to each product of grouped products

I want to add a checkbox for the product to indicate if needs assemble or not,if yes, then more money will be charged. My products are shown as grouped style, like: enter image description here

I am using a plugin called woocommerce extra product options, which can add the checkbox before "add to cart" button. As:

enter image description here

But I want to add the checkbox to each line of the simple products under the grouped product instead of only one; like:

enter image description here

I checked the documentaion, it says use following to hook the extra item in the code/page you want.

function my_custom_function(){
    do_action("woocommerce_tm_epo");
}

add_action( 'woocommerce_before_add_to_cart_button','my_custom_function');

But I tried, it always shows only one before add to cart button. How can I achieve my goal? Thanks in advance.

I also tried do_action("woocommerce_tm_epo"); only, but it is not showing anything.




Aucun commentaire:

Enregistrer un commentaire