G
G
graf452312020-05-16 02:48:19
WordPress
graf45231, 2020-05-16 02:48:19

How to update cart after adding item to cart?

Added custom add to cart buttons to the product page, when clicked, the desired product variant is added to the cart.

Here is the code:
5ebf29296ac2a212830672.png

But I don't understand how to display a default notification after that that the product has been added and, most importantly, how to update the mini cart.

http://denganindah.site/?product=%d0%bd%d0%b8%d0%b...

Custom buttons are in the table below the main button.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WP Panda, 2020-05-16
@graf45231

$( 'body' ).trigger( 'wc_fragments_refreshed' )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question