WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Woocommerce Superstore Cache Navmenu Settings Plugin Configuration (8 posts)

  1. vitalvintage
    Blocked
    Posted 1 year ago #

    Dear woocommerce users,
    I have tried hyper cache (which has been the fastest), super cache, and w3tch plugins to cache my site. However, in my superstore theme, i have the cart in the navmenu that displays the number of products in the cart and the subtotal of the cart. So when i cache each page that has any total in the navmenu cart, that is what is presented as a cached page to any one in any browser even though there is nothing in the cart. only if someone has added an item to the cart does it display the correct totals. Ive tried all configurations and settings as advertised by woothemes or wc_sessions or late init and nothing has solved this issue. Please someone help and educate me on what is the best cache plugin to use and the best configuration of settings with that plugin to run with woocommerce and solve the cart in the navmenu issue. Thanks for any and all help.

    http://wordpress.org/plugins/woocommerce/

  2. bheadrick
    Member
    Posted 1 year ago #

    Unfortunately, changing your caching config isn't going to help - you need to change the theme so that the cart quantity is populated via ajax

    Here's a snippet on how to do that

    My caching plugin of choice is W3tc

  3. vitalvintage
    Blocked
    Posted 1 year ago #

    Unfortunately this is not right or not working for me.
    I have no problem what so ever adding products to the cart using any cache plugin.
    ....I am using w3tc now.
    ....I added the ajax cart code to my custom functions.php file in my theme directory.

    And the same problem persists. when i have an item count and price in my navmenu cart. And then bounce from fresh page to fresh page. It takes a picture of that page and it's cart quantity and price of that cart. So when a brannd new user comes along and clicks on any of those pages, he is served the cached image of that page displaying an item quantity & total for the cart. Though if you hover over the cart..the cart is empty. ONLY if a new visitor has added something to his cart, THEN the cart will be correct on CACHED pages. Hope i was able to explain that correctly. You see, adding products to the cart is not the issue. The issue is people with no cart contents being shown content that was cached from someone else visiting those pages who had an x amount of items and a total in the cart.
    The only other problem i could describe is a widget like "Recently Viewed Items" i have noticed that being copied to every cached page the original user had displayed so that is no longer dynamic and served the same to every new visitor as the original guy who had his list of recently viewed items displayed on his page.

    Sorry for rambling just trying to explaing my situation. Thanks for your patience and help.

  4. bheadrick
    Member
    Posted 1 year ago #

    just adding that code to your functions.php is not enough.
    There's two pieces to it.
    You have to edit the part of the theme where the cart info is being displayed and make it so that no cart info is displayed initially, so that the cart info only gets added by the ajax.

    You'll have the same issue with the recently viewed items - if you really want it to display items that the current user recently viewed, then you'd need to have that updated via ajax as well, although I don't know of any ready-made code out there specifically for that.

    It's not difficult to implement, although it's a bit more complicated than the cart info.

  5. vitalvintage
    Blocked
    Posted 12 months ago #

    Sorry, i just can't figure it out. Where to do each part. guess im not that educated in editing my files.

  6. vitalvintage
    Blocked
    Posted 12 months ago #

    i'd like to be able to use hyper cache. what are the cookies that woocommerce uses for the cart? hyper cache can block cookies. but i don't know if that will allow it to work with woo commerce

  7. vitalvintage
    Blocked
    Posted 12 months ago #

    Finnally a real answer to help everyone else from here on out. I was able to cache woocommerce using hyper cache. in settings for URI to reject I rejected all those recommended by woothemes for configuration. and then for cookies to reject i entered:
    wc_session_cookie
    and thats it. Finnally, got it to cache the way it should. i'm on f*cking ipage server. Slower than crap. but now with hyper cache it is somewhat faster. Way faster to say the least if i was to run with no cache and rely soley on ipage. Which i would not recommend to anyone trying to build a large woocommerce site on. ipage is of the worst quality in everything imaginable.

  8. vitalvintage
    Blocked
    Posted 12 months ago #

    This caches all basic pages just fine. but on product (shop) pages it is still taking 35 seconds on average to load each page. that is crazy! if anyone else can give more detailed instructions on how to fix this. im all ears.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic