• Hi James,

    Great plugin and your optimizations have been great.

    We have gotten a few reports from people who lost their items in cart when logging in during checkout process.

    Confirmed the issue but can’t seem to find what is causing it. Any thoughts?

    Thanks,
    Phil

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

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author James Golovich

    (@jamesgol)

    Can you give me some steps to reproduce the issue?

    Plugin settings?

    What type of products?

    Caching?

    WooCommerce version?

    Other WooCommerce plugins?

    Thread Starter pduclo

    (@pduclo)

    https://otbdiscs.com/product/anode-r2/

    Add variation to cart, go to cart, checkout, login, error message about items in cart and cart emptied.

    Caching via wp-rocket
    WC 5.6

    Plugin Author James Golovich

    (@jamesgol)

    What’s the exact error message that is displayed?

    So it’s a variable product.

    How is the plugin configured? A screenshot of the settings works

    When I find time to dig into this I want to have all the information necessary to try to reproduce the issue.

    Thread Starter pduclo

    (@pduclo)

    Error after logging in on checkout page…
    Checkout
    Please checkout within 59 Minutes 34 Seconds to guarantee your item does not expire.
    There are some issues with the items in your cart. Please go back to the cart page and resolve these issues before checking out.

    I will get a screenshot of settings tomorrow morning but nothing special in CSR Settings.

    Thread Starter pduclo

    (@pduclo)

    Sorry for the delay on additional details. I was able to narrow it down to a conflict wtith Redis Object Cache plugin.

    With Redis and Redis Object Cache plugin enabled
    1) add product to cart
    2) login on checkout page
    3) checkout page shows “There are some issues with the items in your cart. Please go back to the cart page and resolve these issues before checking out.”
    4) cart page shows “Sorry, “product title” is not in stock. Please edit your cart and try again. We apologize for any inconvenience caused.

    I also notice that if I now log out and log back in, the items are in the cart and I can checkout.

    I tried flushing Redis cache and uninstalling/reinstalling Redis Plugin. No luck.

    Thanks for your help!
    Phil

    Plugin Author James Golovich

    (@jamesgol)

    Thanks for the followup and the steps to reproduce. When I have time to work on the plugin I’ll dig into this issue.

    Thread Starter pduclo

    (@pduclo)

    Thank you!

    Thread Starter pduclo

    (@pduclo)

    Oddly, I tried to exclude the CSR cache group name from Redis and it is still behaving the same way with Redis turned on.

    Plugin Author James Golovich

    (@jamesgol)

    It’s a complicated issue that I’ll need to reproduce the issue, look at the sessions table, and attach a debugger to some various spots. I haven’t had any available free time yet to get into it.

    Thread Starter pduclo

    (@pduclo)

    I did some additional testing on this in dev with only woo, csr and redis.
    1) simple products seem to work fine with CSR, Redis and user logging in during checkout
    2) variations with only a handful of attributes work fine
    3) variations with 6+ attributes have a cart problem when user logs in.
    Checkout page error: There are some issues with the items in your cart. Please go back to the cart page and resolve these issues before checking out.
    Cart page error: Sorry, “Product Name” is not in stock. Please edit your cart and try again. We apologize for any inconvenience caused.
    4) users who are logged in before adding products to cart are fine
    5) everything works fine with redis disabled

    So it seems that it is related to 6+ attributes on variable products.

    Hope that helps.

    Plugin Author James Golovich

    (@jamesgol)

    Thanks, that looks like some good data. I’ve got a bit of free time coming up so I’ll get into it soon.

    Do you have any other WooCommerce plugins active that do anything with variations?

    Thread Starter pduclo

    (@pduclo)

    I disabled all other plugins before that troubleshooting. Just had CSR, Woocommerce and Redis Object Cache active.

    Plugin Author James Golovich

    (@jamesgol)

    I was able to reproduce this issue and made a change that should resolve the issue. When a user is logged in their cart/session ID is their user id and their cart is copied over, but the plugin had already cached the items with the original session id.

    Can you test out the development version to see if it solved the issue for you before I push out a new release?

    https://github.com/jamesgol/woocommerce-cart-stock-reducer/archive/refs/heads/master.zip

    Thread Starter pduclo

    (@pduclo)

    Will test today

    Thread Starter pduclo

    (@pduclo)

    Confirmed working now. Thank you!

    Note: I didnt see the “Settings” link in the plugins page on this one.

    • This reply was modified 3 years ago by pduclo.
Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Cart emptied after logging in’ is closed to new replies.