• Resolved BJ

    (@kossahl)


    Hi there,

    somewhen with the last versions of either ‘Woocommerce’ or ‘WooCommerce Menu Cart’ I started to encounter a strange bug which I’m not able to find the source for.

    The problem is as follows:

    1. I visit my page (https://wamiki.de/shop). You can see the menu cart working in the top right corner. It is configured to only show the current value of the cart. When you have nothing in your cart it correctly shows 0,00 €.

    2. I add a product to my cart. The product is added correctly to the cart, BUT the menucart will still show 0,00 €

    Now in debugging I encountered all of the following Informations which might help find the source of this bug:

    a) when you have products in your cart and the page starts loading, the menu cart will show the correct amount in the menu, but at some point (after a few milliseconds) some javascript kicks in and resets the amount to 0,00 € and also changes the href for the menu cart from /cart to /shop.

    b) I disabled all other plugins (only Woocommerce and Woocommerce Menu Cart are running)

    c) I switched the theme to twentytwenty and others, still same bug.

    d) I can reproduce the problem in the latest versions of Firefox and Google Chrome

    e) If I open a new browser window! (not tab!) to browse to wamiki.de suddenly all tabs in all windows will show the correct amount in the menu cart.

    f) when doing e) there will be an xhr post to https://wamiki.de/?wc-ajax=get_refreshed_fragments on all tabs in all windows

    please help

    • This topic was modified 4 years, 4 months ago by BJ.

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

Viewing 5 replies - 16 through 20 (of 20 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    Hi @kossahl

    In the same environment where you have problems, changing only the theme to Storefront does any impact? Let me know.

    Thread Starter BJ

    (@kossahl)

    Yes I tested that before and the issue persisted.

    As I posted before I now also tested a fresh WordPress + Woocommerce (plus democontent plus setting the option to “Redirect to the cart page after successful addition”) + Storefront installation @ https://test.wamiki.de and the same issue comes up.

    So it seems the problem is dependent on the server in use (a shared hosting environment).

    • This reply was modified 4 years, 4 months ago by BJ. Reason: added woocommerce setting
    Plugin Contributor alexmigf

    (@alexmigf)

    Hi @kossahl

    That’s quite strange indeed. Do you have access to the hosting logs?

    Thread Starter BJ

    (@kossahl)

    It seems I can view all past accesslogs but not todays.
    The apache error log is not available to me.

    I added a php error logging but with no results so far.

    I will check tomorrow for todays log of the new test site on the server and see if it brings up something.
    Anything particular I should look for?

    Thread Starter BJ

    (@kossahl)

    This issues still persists for me.
    But for now I can rule out “Woocommerce Menu Cart” Plugin as source of the problem, as the behaviour also comes up with the woocommerce cart widget without the “Woocommerce Menu Cart” Plugin being installed.

    Hosting logs didn’t come up with anything.
    I will try posting this error in the woocommerce forums.

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Cart in menu resets to empty on pageload’ is closed to new replies.