wordpress - Woocommerce How to add "add to cart" button to the each of grouped products -


on page have table of grouped products , want make individual "add cart" button each product instead of 1 button @ bottom of table. i've made changing template file quantity field doesn't work.

this have https://lh6.googleusercontent.com/kj_qesc3jf74obqmhfljzjfdy3gptmt433esgldwri2-vs9fh3lxs5uvfz7zwjndqsvcy3shrmkqof0=w1440-h839

and code woocommerce/single-product/add-to-cart/grouped.php

<td class="group_table_quantity">     <?php     /**     * @since 2.1.0.     */     do_action( 'woocommerce_before_add_to_cart_button' );     /**     * @since 3.0.0.     */     do_action( 'woocommerce_before_add_to_cart_quantity' );      woocommerce_quantity_input( array(     'min_value'   => apply_filters( 'woocommerce_quantity_input_min', $grouped_product->get_min_purchase_quantity(), $grouped_product ),                             'max_value'   => apply_filters( 'woocommerce_quantity_input_max', $grouped_product->get_max_purchase_quantity(), $grouped_product ),                             'input_value' => isset( $_post['quantity'] ) ? wc_stock_amount( $_post['quantity'] ) : $grouped_product->get_min_purchase_quantity(),                         ) );                          /**                          * @since 3.0.0.                          */                         do_action( 'woocommerce_after_add_to_cart_quantity' );                     ?>                      </td>                     <td class="group_table_button">                         <button type="submit" name="add-to-cart" value="<?php echo esc_attr( $grouped_product->get_id() ); ?>" class="single_add_to_cart_button button alt"><?php echo esc_html( $grouped_product->single_add_to_cart_text() ); ?></button>                         <?php do_action( 'woocommerce_after_add_to_cart_button' );?>                     </td> 


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -