Page 3 of 4

Re: Cart items not clearing after checkout

Posted: Wed Aug 07, 2013 7:17 am
by mwd
OK, DNS changes seem to be all done.
My test Paypal orders are showing up properly now on the new server.

Just placed 2 orders.
First one waited for the redirect. Cart cleared properly.
Second one closed browser before auto-return. Item still in cart.

Sorry Q, didn't seem to work in my case.

Btw, IPN is On, PDT is now Off.

Re: Cart items not clearing after checkout

Posted: Wed Aug 07, 2013 9:38 pm
by Qphoria
mwd wrote: Second one closed browser before auto-return. Item still in cart.
But still completed in the admin side right?

Re: Cart items not clearing after checkout

Posted: Wed Aug 07, 2013 9:51 pm
by mwd
Yes, all orders are completing and showing up in admin now.
I think that issue was related to us changing servers and having DNS issues.
Some info may have been getting directed back at the old server.
intodns.com is still showing we have issues, but orders via PP are coming through.
Your First Data extension is throwing a 500 internal error since the move, but I'll ask you about that later if I can't get it working.

Getting back to the Paypal issue... cart is still full when a customer closes the browser before returning.
Maybe a possible workaround could be to have their cart session end after 24-48 hours?
It won't solve all the problem, but most customers probably won't be making another purchase within that timeframe.

Re: Cart items not clearing after checkout

Posted: Thu Aug 08, 2013 1:15 am
by Qphoria
Well my fix should do that already. When the IPN comes back, the order is completed. During this step I am deleting the saved cart data from the customer db record. The customer will still have it in their session tho... so to test this you must use another browser after closing the first browser to simulate the customer actually leaving your site... not leaving and coming right back.

Re: Cart items not clearing after checkout

Posted: Sat Sep 28, 2013 12:24 am
by chumbaz
Qphoria, thanks for putting this fix up. I tried it as well and it's not working for me either. If I close out during the countdown and close the window and open another in incognito mode the items are still in the cart.

This is so frustrating. Is there a way to attach your clearing code to the IPN callback so it forces the cart clear once the IPN hits?

Re: Cart items not clearing after checkout

Posted: Sat Sep 28, 2013 6:21 am
by butte
Essentially "if $this->cart->clear() wasn't being called" it could presumably be inserted, perhaps also with a customer-session killer, on the way into PayPal (or other), so that whatever customers imagine to do before or without returning to OC, and so that whatever happens to go awry with returning from PayPal under nominally normal circumstances to OC, the cart will be emptied or the session will end or both merely because the transaction is already landed in PayPal and for practical purposes the customer has left, leaving PayPal's confirmation to arrive back in OC with or without the customer's (more or less unpredictable) return. Possible confusion as things stand relates to unemptied cart and unkilled session, and seems more probable than possible inconvenience if reordering were necessitated such as by a network failure (connection, other). Neither an unerased order with unkilled session nor an erased order with or without unkilled session is good if timing is simply bad, but which is the lesser evil, and do perhaps even both have a simple solution in the handoff itself? There is a magic point in there when the transaction is no longer just visually reviewed (buttons return to merchant or cancel) but is actually begun (if customer chooses cancel, then customer can bloody well reorder). That point of decision might be necessary or prudent to accommodate. Dunno, maybe a dumb thought, but that critical step of contact made with portal shifting to decision to pay leaves portal's reply left to do, and it is reasonably assumed that customer will not abandon it or learn not to do that, again. From 1.5.0.0 through 1.5.5.1 with PayPal Standard, I actually have not experienced the problem.

Re: Cart items not clearing after checkout

Posted: Thu Nov 21, 2013 10:43 pm
by scanreg
any luck with this?

thanks

Re: Cart items not clearing after checkout

Posted: Fri Feb 07, 2014 8:39 pm
by mactabby
I'm also having this issue. I've asked around here and we all find this very odd and not normal behaviour for carts. Is it then the case that every single customer who is logged in when they order and left the site from the checkout/success page has their cart reloaded when they log back in in a later session?

Would using PayPal Pro solve the issue because the customer never leaves the site? Although if the success page doesn't clear down the database perhaps not?

I found this mod http://www.opencart.com/index.php?route ... ear%20cart which force clears the cart if it contains an order which was previously successful, but as far as I can tell it only works if the session is still live, so doesn't solve the issue.

Given that the cart won't know whether an order is placed if the customer doesn't return, it seems like the only options are to link clearing the cart to the IPN callback, or to run a check on subsequent login (like the mod above). In this latter case, I think a check to see whether the customer's saved cart value matches their most recent order would solve the problem in most cases, although it would cause a small problem for the small minority of my customers who always order the same stuff.

Re: Cart items not clearing after checkout

Posted: Sat Feb 08, 2014 1:12 pm
by butte
There's also the further wrinkle that IPN callbacks can be delayed or blocked by intervening servers en route (among the circuitous hops that prevent felling the web by attacking one node, unlike what would happen to shipping or to airliners in Omaha, for example), and while IPNs are even resent till there's an acknowledgment received back, the lag would scarcely square with immediate necessities of cart clearing.

Re: Cart items not clearing after checkout

Posted: Tue Mar 11, 2014 3:26 pm
by werepair
i am also having issues using paypal standard OC 1.5.5.1, has any body managed to fix this yet, i would be willing to pay for a fix, not a problem if someone can sort it out.

Re: Cart items not clearing after checkout

Posted: Fri Mar 14, 2014 8:55 pm
by scanreg
does this happen in 1.5.6.1 ?

not sure but would be interested in upgrading

thanks

Re: Cart items not clearing after checkout

Posted: Mon Mar 17, 2014 3:55 pm
by butte
Short answer, yes. However, for a practical approach see http://www.simonbattersby.com/blog/2013 ... -purchase/ with "This code works with minor adjustments in OC1.5.x. Here’s a vQmod, tested in OC1.5.6.1:" and codebox. (That's on 2nd page of datadump for 1.5.6.1 + paypal + clear cart, at https://www.google.com/search?q=1.5.6.1 ... clear+cart.

Re: Cart items not clearing after checkout

Posted: Mon Mar 17, 2014 8:12 pm
by scanreg
thanks :)

Re: Cart items not clearing after checkout

Posted: Tue Mar 18, 2014 6:40 pm
by mactabby
Thanks butte - I'd previously found that blog post but until the recent update it was a little inconclusive. I think this nails it for me, when used in combination with the 'Force Clear Cart' extension I mentioned above. The two together will clear both the section cart and the account cart. Result!

Re: Cart items not clearing after checkout

Posted: Tue Mar 18, 2014 8:14 pm
by scanreg
mactabby wrote:Thanks butte - I'd previously found that blog post but until the recent update it was a little inconclusive. I think this nails it for me, when used in combination with the 'Force Clear Cart' extension I mentioned above. The two together will clear both the section cart and the account cart. Result!
were your questions about Force Clear Cart answered? i noticed in the extenstion comments that you asked, "...if the user has closed their browser in the meantime, or been away for a while, they get a new session, and so the check will fail, and their old cart will be reloaded as it has persisted in the database. That correct? If so this mod doesn't really solve the problem of reloaded carts??"

thanks

Re: Cart items not clearing after checkout

Posted: Wed Mar 19, 2014 6:01 pm
by mactabby
scanreg wrote:were your questions about Force Clear Cart answered? i noticed in the extenstion comments that you asked, "...if the user has closed their browser in the meantime, or been away for a while, they get a new session, and so the check will fail, and their old cart will be reloaded as it has persisted in the database. That correct? If so this mod doesn't really solve the problem of reloaded carts??"thanks
Yes - the VQMod in Simon Battersby's blog solves this issue, which is why the two together get the job done. Force Clear Cart deals with session data, and Simon's mod deals with the database for users who are logged in when they order.

It should also be pointed out though that this is a PayPal-specific fix. I have customers who pay on account (using the COD payment option), and Simon's mod doesn't fix this. I think a modification of Force Clear Cart to compare the saved cart with the most recent order would probably do the job. I'll do this at some point.

Re: Cart items not clearing after checkout

Posted: Wed Mar 19, 2014 7:49 pm
by scanreg
great, thanks :)

Re: Cart items not clearing after checkout

Posted: Tue Oct 06, 2015 10:05 pm
by ESS1
I have this issue also on 2.0.1.1 and 1.5.6.4

Has there been any fix?

Re: Cart items not clearing after checkout

Posted: Tue Nov 10, 2015 9:26 am
by alber99
Same problem here in 2.0.3.1. Any OCMOD to fix it ?

Re: Cart items not clearing after checkout

Posted: Wed Dec 16, 2015 5:34 am
by bkpie
I am having this issue as well. Be great if fixed 2.0.1.3 I added a clear cart button so the customer could clear it but they still would rather it clear after checkout.