• Resolved moderncaliber

    (@moderncaliber)


    My cocart cart isn’t clearing when I order. Here are my steps.

    1. Adding products to cart with /wp-json/cocart/v2/cart/add-item
    2. Loading Cart from Session into the WooCommerce Cart
    3. Checking out

    And then when I go back to the front end after ordering, the cart is still full, even though it was populated by cocart. What did I do wrong?

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Sébastien Dumont

    (@sebd86)

    1. Classic checkout or new block checkout?
    2. If you rolled back a version of CoCart does it still not clear the cart?
    Thread Starter moderncaliber

    (@moderncaliber)

    1. Classic checkout I believe
    2. I was actually in an older version (4.1.0). I just upgraded to 4.2.0 and still had the same issue
    Plugin Author Sébastien Dumont

    (@sebd86)

    OK. What payment gateway did you make the order with and do you have others?

    Plugin Author Sébastien Dumont

    (@sebd86)

    FYI: I have tried ordering with bank, cash in person and Stripe using the new block checkout. Cart cleared every time after.

    Thread Starter moderncaliber

    (@moderncaliber)

    I use Authorize.net. That is the only one I’m able to use because it is the one my client uses.

    Plugin Author Sébastien Dumont

    (@sebd86)

    Could you disable CoCart and run the steps again to check it’s not an issue with WooCommerce or the gateway. I ask because once the cart has loaded, using the native checkout is handled via WooCommerce from then on. Clearing the cart is always handled by the payment gateway once it has confirmed the order is processing or completed.

    Thread Starter moderncaliber

    (@moderncaliber)

    Ok I see what you’re asking. So I just tried some things and here is what is happening. My custom build front end is at shirksllc.com. My wordpress backend is at shirksllc.net. My front end is using the cart key to populate the cart. When I load the cart session it takes me to the woocommerce checkout at shirksllc.net. When I check out, the cart at shirksllc.net clears, but the cart attached to the cart key on my front end doesn’t clear. So it cleared it on woocommerce, but it doesn’t clear the cart on my front end that uses cocart. Does that help?

    Plugin Author Sébastien Dumont

    (@sebd86)

    I just released a patch that may help you but as you said this was happening before 4.2 so I will have to look into this more in terms of support.

    You can try this experimental plugin I did some time ago to help sync guest carts but I have not looked at it in a while. Appreciate feedback.

    Plugin Author Sébastien Dumont

    (@sebd86)

    Did the experimental plugin help?

    Thread Starter moderncaliber

    (@moderncaliber)

    Ok so I figured out some things. So I actually wanted to authenticating my requests to cocart so the products are getting added to the user’s cart instead of a guest cart made with a cart key. But that brings up another problem. If I add products to the user’s cart from my front end (shirksllc.com) and then go to the woocommerce cart / checkout (shirksllc.net/cart or shirksllc.net/checkout), the user isn’t authenticated on the wordpress side so it says my cart is empty. Is there a way to authenticate the user on wordpress from cocart?

    Plugin Author Sébastien Dumont

    (@sebd86)

    No CoCart does not support auto login.

    Thread Starter moderncaliber

    (@moderncaliber)

    so what is the recommended way to get to checkout from cocart?

    Plugin Author Sébastien Dumont

    (@sebd86)

    For a registered customer they will have to login again.

    Thread Starter moderncaliber

    (@moderncaliber)

    Ok so the way I have it is the best way then? It currently sends them to the cart. If they aren’t logged in, they log in and it shows them their cart that they can checkout from.

    Plugin Author Sébastien Dumont

    (@sebd86)

    Correct.

Viewing 15 replies - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.