Home Forums WoodMart support forum Cart/checkout auto refresh

Cart/checkout auto refresh

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #673716

    goran.freshmaker
    Participant

    I am using Woodmart theme for shop that updates product prices every few minutes (regarding prices from other market). This works ok – product prices get updated live and in admin. But I have problems updating cart and checkout page if prices of the items change while on cart/checkout page (items need to get new prices, sum must change as well). I need this done whitout refreshing/reloading entire page. Tried multiple functions but do not seem to work because your theme seems to be using some “special ajax” code. Can you help me provide the solution? I already have “a trigger” that would call the update. Maybe even some force update of cart div on cart page and “cart box” on checkout page would do. Thanks in advance for your answer.

    #673943

    Hung Pham
    Keymaster

    Hi goran.freshmaker,

    Thanks for reaching to us.

    Unfortunately, providing custom code is not included in the standard support package. However, we can offer a general recommendation.

    If you want the cart prices to update without a full page reload, you will need to implement a custom JavaScript solution that is triggered by your existing trigger and simulates clicking the default Update cart button https://monosnap.com/file/Sd6qwFW4ya04HsHrDOBmKuGvqPASka on the cart page.

    WooCommerce uses this button to recalculate the cart via Ajax, so this approach will allow prices, totals, and other cart data to refresh without reloading the entire page.

    Regards,
    Hung PD

    • This reply was modified 4 hours, 40 minutes ago by Hung Pham.
    #673957

    goran.freshmaker
    Participant

    Hi.
    Thanks for a quick reply and a general recommendation.
    I actually tried the update cart simulation, but it does not work since the cart is set using woocommerce cart block set I assume? So not having the button at all.
    Is there a way to call it anyway or a way to set the cart without this block – so that its a regular cart (like the one in the screen you provided).

    Thanks in advance.

    #673967

    goran.freshmaker
    Participant

    Since I am using Retail demo, why do I see the cart different than your demo (images attached)? Yours uses form (woocommerce-cart-form), but mine does not. Can you provide steps how to get cart (and checkout) like yours?

    Attachments:
    You must be logged in to view attached files.
    #673987

    goran.freshmaker
    Participant

    Edit: Seems I had some code from other (basic) theme still set in my site. Will try fresh cart/checkout and get back to you (support) if/when needed.

    #674225

    Hung Pham
    Keymaster

    Hi goran.freshmaker,

    Keep us in mind for future questions and concerns, we’re always here to help!

    Regards,
    Hung PD

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