• Resolved rt98506

    (@rt98506)


    Hi,

    When I add a product to my basket, the amount appears in the cart on the top right of the page e.g. $19.99. When I go to another page, such as the homepage, the cart amount changes to $0.00. The issue is definitely caused by Litespeed Cache. The issue is fixed when I deactivate the plugin, and it returns when I enable the plugin. I had this issue previously, but I fixed it by adding the following to Cache > Excludes > Do Not Cache Cookies: woocommerce_cart_hash

    However, woocommerce_cart_hash no longer fixes it. I recently signed up to QUIC.cloud CDN. Is this why the cart issue has returned and woocommerce_cart_hash no longer fixes it?

    Please advise the cause of the cart issue and how to fix it?

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support qtwrk

    (@qtwrk)

    please provide the report number

    you can get it in toolbox -> report -> click “send to LiteSpeed”

    Thread Starter rt98506

    (@rt98506)

    Hi,

    I disabled Quic.cloud CDN and the cart issue was fixed. So, the issue is definitely Quic.cloud CDN.

    Quic.cloud CDN ignores the ‘woocommerce_cart_hash’ instruction in the Litespeed Cache plugin (Cache > Excludes > Do Not Cache Cookies).

    How can this be fixed, so Quic.cloud CDN acknowledges the Cache > Excludes instructions?

    Regards

    Plugin Support qtwrk

    (@qtwrk)

    please provide the report number

    it will provide the basic plugin configuration so I can review it first.

    Thread Starter rt98506

    (@rt98506)

    Hi,

    Report number: WYBWIZUS

    Regards

    Plugin Support qtwrk

    (@qtwrk)

    the issue is browser cached your page, and if you do a hard refresh , the correct amount will show up

    assuming all of your pages has URL that ends with / , then please add this to your .htaccess

    SetEnvIf Request_URI "/$" change_header
    Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" env=change_header

    this send a cache-control header over pages and instruct browser do not cache the page but always fetch from server.

    Thread Starter rt98506

    (@rt98506)

    Hi,

    1. The cart amount issue also happens in a Chrome incognito page that has an empty cache. So, I don’t understand ‘if you do a hard refresh, the correct amount will show up’?

    2. Yes, all the website pages have a url that ends with /, apart from the homepage. The homepage doesn’t end with a /. Please advise?

    3. Quic.cloud has a CDN setting, ‘Auto Browser Cache’, which can be enabled ON or OFF. It says ‘When ON, QUIC.cloud will auto-add a cache-control header based on LSCWP’s Browser Cache settings. When OFF, it will only use the backend forwarded headers.’ Please advise?

    Regards

    Plugin Support qtwrk

    (@qtwrk)

    1. the browser may cache the page when you don’t give that header I provided , so when you go back to other page, it directly loads from local cache, instead of fetching from server
    2. please add the directives I provided
    3. ON/OFF doesn’t really matter in this case , when OFF you can control it , when ON, you can only use the preset from QC CDN.
    Thread Starter rt98506

    (@rt98506)

    Hi, I added the code to the bottom of the .htaccess file, but the cart issue still remains. Please advise how to fix the cart issue?

    Regards

    Plugin Support qtwrk

    (@qtwrk)

    interesting issue

    please create a ticket by mail to support at litespeedtech.com with reference link to this topic , we will investigate further.

    I am using Diza theme. and facing the same issue. when clicked on Home page all the cart value reset to 0 and price become 0.00. when clicked on some other page the cart is reflecting correct value. it is happening on home page only. cart is not retaining its value on home page only.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Cart Amount Resets to 0.00 When Another Pages is Loaded’ is closed to new replies.