A
A
Alex666Devil2017-02-03 07:08:36
WordPress
Alex666Devil, 2017-02-03 07:08:36

How to change the functionality of the add to cart button?

Lord! I understand that I’m probably not the first to ask such a question, but I didn’t find something. The bottom line:
how, when you click Add to Cart in wokmmers, call a pop-up window, or rather a feedback form, contact form for example.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WP Panda, 2017-02-04
@Alex666Devil

# отключаете стандартные кнопки
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
# подключаете свои
remove_action( 'woocommerce_after_shop_loop_item', 'my_btn_to_cart');
remove_action( 'woocommerce_single_product_summary', 'my_btn_to_cart', 30 );

function my_btn_to_cart()connect your button, on which you hang what you want

L
Localhost, 2017-09-05
@selo

often met the implementation of such a slider and animation in Riveslider.
And I would do it myself on Owl Carousel, I would set the positions for the arrows and I would register the animation on click.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question