Home Forums WoodMart support forum Cart not refreshing after running woodmart_ajax_add_to_cart();

Cart not refreshing after running woodmart_ajax_add_to_cart();

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #311732

    skyescott
    Participant

    Hello. We’ve made a “frequently bought together” function that shows a button on every single product page, which sends woodmart_ajax_add_to_cart() calls that add items to the cart.

    This works successfully, BUT the cart does NOT refresh. How to refresh the cart?

    I’ll send a link in the private section

    #311746

    Artem Temos
    Keymaster

    Hello,

    Sorry, but we don’t know how your custom solution works and why it doesn’t update the cart widget. You can check our own implementation as a reference in the file woodmart/js/scripts/wc/addToCartAllTypes.js https://gyazo.com/4d17b4f13757b495a0fd515cf3d0df8c
    and woodmart/inc/integrations/woocommerce/functions.php https://gyazo.com/23852a26fb3fdf968fb14d61435d5221

    Kind Regards

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