• Resolved hellwood

    (@hellwood)


    Hi all and thanks in advance for any assistance offered.
    I’ve been using wordpress and woocommerce to power my ecommerce site for a while and started running into problems with the site redirecting to the install page and error messages regarding a redirect loop. I did a little research (and contacted my host) and discovered that this was due to the number of MYSQL queries exceeding the hosts limit of 75,000 an hour. A little more research suggested that the problem might be solved by using a cache plugin so I tried that and while it reduced the frequency of the redirect error it also completely screwed up my shopping cart.
    I removed the caching plugin and investigated my plugins instead and discovered that a currency switcher plugin was probably the cause of the high number of queries so I deleted that as well (and lost a fairly important bit of site usability). Everything seemed fine briefly but my shopping cart is still not working unless I’m logged in. When not logged in I can add items to the cart and get the notification that an item has been added. The item appears in the cart in the header but when I go to the actual cart page it just says that the cart is empty. Been through the whole install with Filezilla and can’t find anything that is cache related still hanging around. Been fighting with this whole issue for what feels like ages and losing lord knows how many sales in the meantime. Does anybody have the faintest idea of…
    How to get the cart functionality working again.
    How to reduce the extremely high number of queries that lead to the redirect error, preferably while still using the plugins that make the site useful in the first place.
    Not sure what extra info could help diagnose but for what it is worth I’m using
    Wordpress 4.3
    Woocommerce 2.4.6
    Suave Theme 1.4.1 (a woocommerce supported theme)
    9 other Active plugins
    – Commercegurus Toolkit
    – Contact Form 7
    – Duplicator
    – LayerSlider WP
    – P3
    – Redux Framework
    – WooCommerce Predictive Search LITE
    – WPBakery Visual Composer
    – Yoast SEO

    and my website is
    http://www.hellwoodoutfitters.com/teeshop

    Any guidance much appreciated.

    https://wordpress.org/plugins/woocommerce/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hello,

    My I know which caching plugin did you use? I used W3 Total Cache and could not reproduce the issue. So the caching plugin did not cause you the problem.

    You may try doing the following-
    1. Disable all your plugins except WooCommerce and YOAST.
    2. Flash the permalinks by just clicking the save button once.
    3. Change the “Add to cart behaviour” from wp-admin → WooCommerce → Settings → Products → Display

    Check what happens next and let me know here.

    Thread Starter hellwood

    (@hellwood)

    Hi there…
    I was using the Zencache plugin.
    I tried disabling all the plugins as suggested but the problem persisted. Items were still listed as added to the cart but the cart was empty.
    Changed the add to cart behaviour and tried every possible combination but still no change.
    Not sure what you mean by ‘flash the permalinks’. Could you please explain.

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    With whatever caching solution you choose you need to exclude the dynamic pages. Cart, checkout, account.

    http://docs.woothemes.com/document/configuring-caching-plugins/

    I’ve not used Zencache, I usually use W3 total. Cache files are usually stored in the wp-content directory.

    With all that said, if the host is limiting requests on a store, and could possibly disrupt sales, thats probably not the best environment and you may want to look for a new one.

    Thread Starter hellwood

    (@hellwood)

    I’d already made the decision that I might be better off with a VPS but wanted to make sure that my installation isn’t irreparably broken before investing the cash.
    As far as I can tell I’ve removed every trace of the cache but still can’t get items to stay in the cart.

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    go to cart page, view source, look at the bottom. See cache info?

    Thread Starter hellwood

    (@hellwood)

    I’m not seeing any cache info at all.

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    Same. So its either hidden cache still being used, the caching plugin still installed, or your host has server side cache (memcache for example) breaking the cart page.

    Hi hellwood, did you ever find the solution to this? I’m experiencing the same issue with a client site…

    When I add a product (if logged in) it takes me to the basket page with the products displayed. But if I am not logged in, the basket says it is empty. However, if I go directly to checkout (by typing the checkout URL directly) it’s clear the product has been added (as it’s there for checkout).

    So the issue seems to be the Basket page — but why’s it working when logged in?

    Thread Starter hellwood

    (@hellwood)

    I did manage to finally get it sorted but only after switching hosting and getting rid of the caching plugin I’d been using.
    If you haven’t already it might be worth trying out the suggestions Mike Jolley made above.
    Best of luck

    Many thanks. I’m guessing the issue might be down to the host / wpengine. But I’m not sure I’m in a position to switch away from them… so if anyone is aware of another solution, I’d be grateful.

    OK – so I managed to fix this. In case anyone else is searching; the issue was down to caching. The functionality was fine on the staging server, but the live site runs on wpengine.

    I had to contact their tech support and ask them to switch off all caching on the basket and checkout pages. And this solved the problem.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Add to Cart but basket is empty.’ is closed to new replies.