Ajax Woocommarce Add to cart button click append html content to a Div jquery -
in woocommarce there way add current products image, price etc, append div( ajax or jquery) ? note: added codes function.php not reload page after product added cart.
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 ); add_action( 'woocommerce_single_product_summary', 'woocommerce_template_loop_add_to_cart', 30 );
also place (div) want append current products attributes working slider mean want every time add item cart should display in slider full function slide show. have tried fragment , fragment contents adding slider div slider div not functional.
add_filter('add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment'); function woocommerce_header_add_to_cart_fragment( $fragments ) { global $woocommerce; ob_start(); <div class=” et_updater_ajx”> //codes bind slider content elements cart items </div> $fragments['div.et_updater_ajx'] = ob_get_clean(); return $fragments; }
please lead me right way accomplish trying to.
Comments
Post a Comment