Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("body").on("updated_cart_totals", function() {
- var data = {
- action: "get_cart_totals"
- };
- $.getJSON(AJAX_URL, data, function(res) {
- // zwróci ilość produktów w koszyku,
- // którą można wstawić na stronę
- console.log(res.cart_count);
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement