• Hello amazing team,

    When i add a product to whishlist, the whislist icon (on top right of my page) turns +1 but when i go back to home page the icon turns 0 again. When i purge all my cache on backend and refresh my home page than it become +1 again.

    Could you please advise.

    Regards
    Oguz

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Antonio La Rocca

    (@therock130)

    Hi Oguz

    I’m afraid the counter on the top right of your site is added by your theme
    In order to avoid cache problem, you should load it via ajax, as we do for ATW butons and other wishlist components

    If you’re willing to do some coding, I could suggest you a resource of our knowledgebase
    This describes how to create a wishlist counter updated via ajax
    Besides, I could help you to tweak this code to force counter update on page load

    Thread Starter ardeth

    (@ardeth)

    Hello Antonio,

    Thank you for your promt reply. I have added to code in resource link you have shared to my child theme functions.php. Unfortunately nothing has happened.

    I’d be appreciate if you could help me for further steps.

    Thank you.

    Plugin Support Antonio La Rocca

    (@therock130)

    Hi again

    the code by itself isn’t enough
    it defines a new shortcode, that you’ll need to place in your header

    So the next step is to override default header template of your theme, and replace current counter with <?php echo do_shortcode( '[yith_wcwl_items_count]' ); ?>
    (I’m afraid I have no more specific indications on this step, as it would vary from theme to theme)

    Then we can move to next steps:
    1. customize template to make it look like your previous counter
    2. make it automatically refreshed in ajax on page load

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Cache Issue’ is closed to new replies.