• Resolved alexqbox

    (@alexqbox)


    Hello,

    if litespeed cache and plugin is active, the woocommerce cart is randomly empty. After adding products to the cart like 20 times, 21x the cart is empty. Same products or product variations tested.

    If litespeed is deactivated, all good and the cart always shows the products even after 50x testing.

    I already added the cart and checkout beside belonging cookies to the exclusing list in caching but it doesn’t help.

    Any ideas about it? Is it already a known issue?

    Thanks

    • This topic was modified 12 months ago by alexqbox.
Viewing 6 replies - 1 through 6 (of 6 total)
  • supervisior

    (@supervisior)

    Did you enable ESI?

    Thread Starter alexqbox

    (@alexqbox)

    no

    supervisior

    (@supervisior)

    Enable it and try again.

    Plugin Support qtwrk

    (@qtwrk)

    does your theme use ajax to update the cart ?

    you can also try disable object cache , and enable Cache -> WooCommerce -> cache vary on mini cart

    Thread Starter alexqbox

    (@alexqbox)

    Hello and thanks for the input guys, here some more informations.

    Hoster: Hostinger
    Theme: Avada (updated), all Performance settings are Off, Ajax disabled
    Litespeed: On
    Object-Cache: Off
    ESI: On (now on for test, before off)
    Cache Vary for Mini Cart: On (now on for test, before off)
    Page Optimization: JS Minify, JS Combine and Load JS Deferred all OFF

    Cache Excludes: /cart, /checkout, /my-account and the following Cookies:
    woocommerce_.*
    woocommerce_items_in_cart
    woocommerce_cart_hash
    wp_woocommerce_session_*
    wp-.*
    wordpress.*
    comment_.*
    yith_wcwl_session_.*
    yith_wrvp_.*
    xf_.*

    Randomly after adding a product to the cart, the cart page is empty althougth the mini cart shows the correct value and even the product in the mini cart dropdown. Also the notice shows up “Product … added to the cart”. But if open the cart page, the cart page itself is empty.

    When i close the page and open it again and add the same product to the cart, also the cart page is showing the correct products added.

    If i disable Litespeed all is working normal and products get added directly to the cart on first try.

    I am using Avada with Woo and Litespeed for a long time and never had these kind of issues. I can’t tell exactly when it starts but it’s weird.

    I will check for another 1-2 days if the ESI and/or Cache Vary for the Mini Cart enabled makes a difference.

    Cheers

    • This reply was modified 12 months ago by alexqbox.
    Thread Starter alexqbox

    (@alexqbox)

    Update

    I probably found the reason…

    Is there any known issue/bug in connection with the PixelYourSite Plugin and it’s Woocommerce Tracking?

    I changed the “When to fire the add to cart event” from “On Add To Cart button clicks” to “On the Cart Page”.

    Now i can’t reproduce the empty cart on the last like 40-50 times i tried it. Maybe just a coincidence but it seems to be working now and the products are in the cart directly.

    Will keep you updated the next days.

    • This reply was modified 12 months ago by alexqbox.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Woocommerce cart is randomly empty if litespeed installed’ is closed to new replies.