Ajax Cart Count?

in Download Manager Free

Viewing 6 posts - 1 through 6 (of 6 total)
Nov 28, 2017 at 6:38 am
#66060
Member
anupam paasan
OP

Hi guys, so i would like to count cart products in ajax.

I have gotten to a point where i have got a cart with count on it thanks to someone who helped on email and when i hover on it a cart items are displayed as drop down.

The problem however is that i can’t count it in ajax, if i remove a item in cart or add a item from store – it just doesnt update the count.

Thanks, any code help appreciated. ☺

Nov 29, 2017 at 5:40 pm
#66139

Hi there,

Can i see your site for details issue?

Can you provide login in private reply?

And send the code that you are using to count with the ajax to display the number on the cart .

Thanks

Nov 30, 2017 at 3:29 am
#66143
Member
anupam paasan
OP
This reply has been marked as private.
Dec 6, 2017 at 3:11 pm
#66398
Member
anupam paasan
OP

Hi @Hasibul Amin Heme , any suggestions please?

Thankyou, 🙂

Dec 7, 2017 at 9:11 pm
#66471

Hi,

Seems like you are not using a function with filter hook of “add to cart”. so the cart is updating after refreshing the browser. You can try to add filter or action for add to cart button.

add_filter('wpdmpp_add_to_cart', 'wpdmpp_product_cart_count', 10, 2);
function wpdmpp_product_cart_count($id){    
     {do staff here}
    return $id;
}

Thanks

Dec 16, 2017 at 8:02 pm
#66849
Member
anupam paasan
OP

Hi , really sorry but i can’t seem to do this . I tried to put in the functions.php using my custom functions plugin.

May i know what i should do in the ” {do staff here} ” to kind of update it.?

Thanks 🙂

Viewing 6 posts - 1 through 6 (of 6 total)

The topic "Ajax Cart Count?" is closed to new replies.