A
A
Alexey Verkhovtsev2018-04-12 20:52:51
JavaScript
Alexey Verkhovtsev, 2018-04-12 20:52:51

Ajax WooCommerce item count update for icon?

Hello.
Added this block

<a href="/cart" class="cart-icon">
    <span class="cart-badge"><?php echo WC()->cart->get_cart_contents_count() ?></span>
</a>

When the page is reloaded, of course, everything is cool, but when updating the quantity in the cart, how can I make sure that the quantity of the badge is also updated?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Sklyarov, 2018-04-12
@seftomsk

It is enough just to know English and get used to google in this language: https://iconicwp.com/blog/update-custom-cart-count...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question