Post by fsgroup » Sat Sep 10, 2011 3:09 am

We are having an issue with the contents of the shopping cart not being cleared after checkout. Here is the scenario.

As a registered customer, I complete an order for a single product. When finished, the shopping cart displays an empty message. I then start to order a different product and when I arrived at the Confirmation page during Checkout, both the product I am trying to order AND the previously ordered product are listed on my order.

I've seen a few similar posts, but no real solution was offered. Have other OpenCart users experienced this?

Thanks!

Newbie

Posts

Joined
Sat Sep 10, 2011 3:03 am

Post by Qphoria » Sat Sep 10, 2011 4:45 am

If a cart isn't being cleared that means the order confirmation process has failed somewhere. The failure can be due, but not limited to:
- Bug in the payment gateway callback process (very likely)
- Bug in the order confirm function (less likely)
- Bug in the order update function (less likely)
- Failure in the mail step of the confirm or update function (likely)

The payment extension is the last stop before the order gets confirmed. If the confirm doesn't finish properly, or if the confirm finishes but something broke on the final step of the payment callback, this is the usual reason for cart's not clearing. The cart clear function is called on the checkout/success page so if that page isn't reached, the cart will not clear, even if the order has been processed in the database.

What payment extension are you using?
Do you have any known email issues?

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by fsgroup » Sat Sep 10, 2011 5:02 am

Thank you for the quick reply! We are using the Authorize.Net (AIM) payment method. We have not experienced any issues with email.

Newbie

Posts

Joined
Sat Sep 10, 2011 3:03 am

Post by fsgroup » Tue Sep 13, 2011 1:40 am

Hi Qphoria,

Do you have any thoughts knowing that we are using the Authorize.Net (AIM) payment module?

Thanks!

Newbie

Posts

Joined
Sat Sep 10, 2011 3:03 am

Post by fsgroup » Wed Sep 14, 2011 2:40 am

Does anyone else have experience with a problem like this? If it is indeed tied to the payment module what are the options for resolving it? Thanks!

Newbie

Posts

Joined
Sat Sep 10, 2011 3:03 am

Post by Qphoria » Wed Sep 14, 2011 2:48 am

fsgroup wrote:Hi Qphoria,

Do you have any thoughts knowing that we are using the Authorize.Net (AIM) payment module?

Thanks!
If its the AIM payment you should be getting some feedback from the page... the noted issue is typically that it just shows "Loading" and never finishes. Is that the case? I will add the improved error handling I added for 1.4.x to the 1.5.x payments that use curl... one popular cause for this was a curl error about ssl not being compiled with the curl extension.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by fsgroup » Wed Sep 14, 2011 3:29 am

We are not seeing anything like the order not finishing. Since we are also not having issue with receiving the email confirmations of orders does that mean that we are left with:
- Bug in the order confirm function (less likely)
- Bug in the order update function (less likely)
This is resulting in many clients cancelling their order, calling in after seeing the issue, or ordering more products than they intended so any further ideas would be great as we need to find a fix quickly.

Thanks!

Newbie

Posts

Joined
Sat Sep 10, 2011 3:03 am

Post by onlinephilately » Fri Oct 21, 2011 8:27 pm

Hi

I am having a similar problem (v1.5.1).

The order is sent to the database and the e-mail is sent to the customer.

But some times the cart is not cleared. This is not happening every time so it must be somewhere along the lines that the page is not fully loaded.

This also creates a problem the next time a customer logs in and the cart is not cleared. It then seems to hang the site.

Any hints or help is appreciated.

New member

Posts

Joined
Thu Jan 27, 2011 3:14 am

Post by webberley » Tue Jul 10, 2012 4:42 pm

OpenCart 1.5.2.1 with cash on delivery has this problem too. ALL my customers are set Cash on Delivery, and SOME people have the above issue where opencart decides to add last times cart to their order. So the bug has nothing to do with external payment providers, 100% in the OC coding. Anybody found a workaround for this? as it doen't look likes it's going to be fixed sadly.

Newbie

Posts

Joined
Tue Apr 17, 2012 8:37 pm

Post by onlinephilately » Tue Jul 17, 2012 1:40 pm

We also have COD as the main payment option and it seems to be happening when a customer places an order and leave the computer on checkout_success.

If the checkout_success is left (i.e. to home) the cart seems to clear.

This is annoying for us as most of our products are unique (only one).

New member

Posts

Joined
Thu Jan 27, 2011 3:14 am

Post by rph » Sat Aug 25, 2012 2:11 am

Did some digging. This is caused by the customer not hitting the continue button on the order success screen and could be considered a "bug" with OpenCart.

What's happening is the success controller is properly clearing out the cart data in the session. It's still in the customer database though in the cart column. OpenCart updates this info based on the current cart session but if the customer doesn't go to anther page on your website after completing the order (e.g. they close the browser) that database cart info won't be cleared out.

EDIT: Added a VQMod bug fix. This is only tested lightly on 1.5.4.1 and 1.5.1.3 so use with caution.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by nikythebest » Mon Oct 22, 2012 8:42 pm

Hello,

I have the same problem. I am using 1.5.1.2 Only Cash on delivery as a payment method. The cart is not clearing after the order is finished. Can anyone help us? I tried your VQMOD but still have the same problem.

Thank you

New member

Posts

Joined
Thu Sep 15, 2011 3:54 am

Post by aboss3 » Wed Oct 31, 2012 3:10 am

Was anyone ever able to fix it?

New member

Posts

Joined
Fri Sep 14, 2012 3:18 am

Post by rph » Wed Oct 31, 2012 9:09 pm

I released a VQMod to fix the bug I described. If you hit 'Continue' on the success page but the cart is still full after then you have some other issue.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by jty » Fri Nov 02, 2012 6:22 am

rph wrote:Did some digging. This is caused by the customer not hitting the continue button on the order success screen and could be considered a "bug" with OpenCart.

What's happening is the success controller is properly clearing out the cart data in the session. It's still in the customer database though in the cart column. OpenCart updates this info based on the current cart session but if the customer doesn't go to anther page on your website after completing the order (e.g. they close the browser) that database cart info won't be cleared out.
Bug confirmed. This bug has been annoying me for a very long time. I finally put the night aside last night to methodically hunt it down, only to come here later and find that rph had already found it.

I discovered the same as rph - when the buyer closes the browser after checkout/success without clicking on any other link on the site, the cart is not cleared "from the database".

checkout/success clears the cart from "the sesssion" but not the database. The buyer needs to press another link on the site to write the empty session cart to the database, thereby clearing the cart from the database.

My solution was similar to rph's ie. update the customer cart field, except I did it in the checkout/success file.

Thanks rph for posting your findings. Shame I didn't find your post before I wasted the night ::)

PS - if rph's solution doesn't help you, checkout Qphoria's post above.

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by madimar » Sun Nov 18, 2012 5:27 pm

Great! Thanks guys! You solved a long time issue I had.

M

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm


Post by pedro1993 » Wed Mar 13, 2013 8:50 am

Thanks for the fix! I was able to help a client of mine with this! Great job

For OpenCart & PHP/MySQL support feel free to PM me :)
Click here for my extentions
Did I help you? Donate here to show support


Active Member

Posts

Joined
Tue Oct 18, 2011 4:31 am
Location - Glasgow, Scotland

Post by storm-cloud » Tue Mar 19, 2013 1:34 pm

rph wrote:Added a VQMod bug fix. This is only tested lightly on 1.5.4.1 and 1.5.1.3 so use with caution.
Excellent work rph!

Is there ANY risk at all using this modification? You mentioned to use this with caution. Is there any possibility that this could cause any adverse effects such as clearing the cart in other (unwanted) circumstances?
jty wrote:My solution was similar to rph's ie. update the customer cart field, except I did it in the checkout/success file.
Is there any advantage in using this method as opposed to rph's? Could you elaborate on the exact changes required?

Active Member

Posts

Joined
Wed Feb 22, 2012 8:07 am

Post by rph » Wed Mar 20, 2013 3:23 am

storm-cloud wrote:Excellent work rph!

Is there ANY risk at all using this modification? You mentioned to use this with caution. Is there any possibility that this could cause any adverse effects such as clearing the cart in other (unwanted) circumstances?
Shouldn't but I haven't tested anything.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by choccybox » Fri Apr 19, 2013 11:13 am

Have the same problem of carts not clearing when customers return from paypal, so want to try the above vqmod, but has it been tested on V1.5.5.1? Or does anybody know whether it works on v1.5.5.1?

Thanks!

Newbie

Posts

Joined
Wed Oct 31, 2012 8:08 pm
Who is online

Users browsing this forum: No registered users and 58 guests