Cart Widget in Header - by Castro - on WordPress WooCommerce support

This topic has 10 replies, 4 voices, and was last updated 10 years, 6 months ago ago by Robert Hall

  • Avatar: Castro
    Castro
    Participant
    June 2, 2015 at 15:23

    Hello,

    I am wondering if there is any possibility to enforce the Header Cart Widget to update after page load (like adding a product into the cart that only reloads the cart but not the whole page). I would like to cache the site because of performance reasons and that would be really helpful.

    Thanks in advance
    Nelly

    9 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    June 2, 2015 at 17:00

    Hello,

    Can you please provide us with the link to your site and describe how to replicate this issue?
    Also give us wp-admin credentials in private content.

    Thank you.
    Best regards,
    Jack Richardson.

    Avatar: Castro
    Castro
    Participant
    June 3, 2015 at 06:25

    Hello Jack,

    Thanks for answering. For performance reasons I use W3total Cache and would like to switch on page caching as well. Then, the cart icon and the pop-up cart are “hard coded” into the HTML and delivered the way the information was cached.

    I have seen that the cart is updated after pressing “Add to cart” in the shop page for instance without reloading the whole page. Therefore, my idea is to trigger the cart-update unce the HTML is completely loaded.

    I am sure that is possible, just don’t know how and hope you can help.

    Please, contact administrator
    for this information.
    Avatar: Eva
    Eva Kemp
    Participant
    June 3, 2015 at 11:44

    Hello,

    I’ve disabled “Object Cache” in Performance > General Settings.
    Please clear your browser cache and check cart after that.

    Regards,
    Eva Kemp.

    Avatar: Castro
    Castro
    Participant
    June 3, 2015 at 13:58

    Hi Eva,

    my question was concerning how to update the cart automatically after the HTML of a page is loaded completely. I want to use the page caching but that conflicts with the way the widget is loaded initially.

    Avatar: Eva
    Eva Kemp
    Participant
    June 3, 2015 at 14:38

    Hello,

    Unfortunately we don’t have such feature in the theme.
    Sorry.

    Regards,
    Eva Kemp.

    Avatar: Castro
    Castro
    Participant
    June 4, 2015 at 08:22

    Hi Eva,

    Could you tell me the name of the function that reloads the cart widget at least? Then I could find someone to write me a snippet.

    Thanks

    Avatar: Eva
    Eva Kemp
    Participant
    June 4, 2015 at 09:26

    Hello,

    You can find the code in wp-content/themes/legenda/js/etheme.js (lines 1366-1377).

    Regards,
    Eva Kemp.

    Avatar: Castro
    Castro
    Participant
    June 5, 2015 at 04:12

    Hi Eva,

    many thanks!

    Avatar: Robert Hall
    Robert Hall
    Participant
    June 5, 2015 at 07:07

    Hello,

    You’re welcome!

    Regards,
    Robert Hall.

  • Viewing 10 results - 1 through 10 (of 10 total)

The issue related to '‘Cart Widget in Header’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.