• Resolved odyss31

    (@odyss31)


    Hello, i use litespeed cache plugin and i have enabled delay javascript. When i open the page in incognito mode what happens is that if i press add to cart instead of using ajax to add the product to cart and also open the minicart it reloads the page. This only happens the first time. If i do it again then it works properly, but i want it to work properly even the first time. I tried to exclude files such as
    cart-fragments.js
    cart-fragments.min.js
    cartWidget.js
    wc-mini-cart-block-frontend
    wc-add-to-cart
    but nothing worked. I finally found out that what works is excluding
    ajax
    wp
    the problem is that these are too general and affect files that have nothing to do with woocommerce and specifically the ajax add to cart. is there a way to exclude files containing the string ajax but only files inside woocommerce? unless you have a better solution to offer

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

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

    (@qtwrk)

    woo-ajax-add-to-cart

    maybe try this ?

    Thread Starter odyss31

    (@odyss31)

    Unfortunately it doesnt work

    Plugin Support qtwrk

    (@qtwrk)

    okay , if it works for

    ajax
    wp

    then you need to extract the JS files , and inline JS string , put them all into exclude filed, see if it works

    Thread Starter odyss31

    (@odyss31)

    I literally excluded all the js files i found in the network tab that hed to do with woocommerce, cart and minicart but again the same problem. I found that if i exclude wc-ajax what happens is add to cart adds the product to cart without reloading but the minicart doesnt work. it doesnt even open on click. I have to reload the page after i added a product to cart for it to work properly

    Plugin Support qtwrk

    (@qtwrk)

    you need to check the inline javasritp as well , not only external/individual js files

    Thread Starter odyss31

    (@odyss31)

    I excuded inline scripts that have to do with add to cart and still problem is not fixed

    Thread Starter odyss31

    (@odyss31)

    Along with external/individual js files of course

    Plugin Support qtwrk

    (@qtwrk)

    please provide the report number

    you can get it in toolbox -> report -> click “send to LiteSpeed”, let me verify the content you have excluded

    • This reply was modified 1 year ago by qtwrk.
Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Delay javascript ajax add to cart problem’ is closed to new replies.