Post by rocketfoot » Thu Apr 10, 2025 9:41 pm

I am having a problem with customers accidentally ordering duplicate items and I think this is what is happening:
Customer creates and account, logs in and browses the store adding some items to their cart. Not ready to buy yet so they close browser and eventually get logged out so a day or two later, they visit the store and see the items are not in their cart so they add them to the GUEST CART and then when they are ready to check out, they have to log in and don't realize that the store adds the items in their guest cart to the items in their actual cart! Customers being customers fail to review cart and check out with duplicate items in their cart and then we have extra work to confirm that they did or didn't want duplicate items!

Is there anyway to avoid this? Maybe keep customers logged in for days or longer? I need to find a solution for this!! Thanks!

It's a 3.0.3.8 shop install

OpenCart 3.0.3.8
www.wattstruckcenter.com/shop


User avatar
Active Member

Posts

Joined
Fri Nov 15, 2013 10:47 pm

Post by ADD Creative » Thu Apr 10, 2025 10:01 pm

You might want to check that it is not this bug. The number of items that trigger it will depend on the server.
viewtopic.php?t=211273
https://github.com/opencart/opencart/issues/7375

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by rocketfoot » Thu Apr 10, 2025 10:14 pm

I tested it several times and it will duplicate items no matter what the item count is! It can be 1 item or dozens of items...it only seems to duplicate the items that I added to my guest cart before I logged in to checkout.

OpenCart 3.0.3.8
www.wattstruckcenter.com/shop


User avatar
Active Member

Posts

Joined
Fri Nov 15, 2013 10:47 pm

Post by ADD Creative » Thu Apr 10, 2025 11:26 pm

The issue only happens when you register at checkout, so if you are logging in at checkout then that would just be the saved cart and the guest cart being added together.

There are a few suggestions on this forum that may help. There are also some extensions in the marketplace that may also help.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by calderwood » Fri Apr 11, 2025 10:06 am

I've been having the same issue with multiple double orders in the cart. Running v3.4

David C.
I wonder if the sun is shining outside? :laugh:


User avatar
New member

Posts

Joined
Tue Jan 03, 2012 7:59 am
Location - Somerville, NJ

Post by JNeuhoff » Fri Apr 11, 2025 4:58 pm

calderwood wrote:
Fri Apr 11, 2025 10:06 am
I've been having the same issue with multiple double orders in the cart. Running v3.4
There is no OC 3.4, to start with. Please provide exact details if you want help here and think there is a bug beyond the fact that OpenCart remembers the shopping cart of a customer.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by paulfeakins » Fri Apr 11, 2025 5:49 pm

rocketfoot wrote:
Thu Apr 10, 2025 9:41 pm
Is there anyway to avoid this? Maybe keep customers logged in for days or longer? I need to find a solution for this!! Thanks!
Yes I think there are extensions and forum posts about this. Did you search first before posting?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by rocketfoot » Fri Apr 11, 2025 5:53 pm

I have added an extension that keeps the customer logged in for a longer period to hopefully prevent some of this...but now a customer just emailed me saying that he clicked on our store site and when he checked his account, he noticed that it was completely someone else's account! He logged out and back in and all seems fine! I hope this new extension isn't going to be problematic! This is what I added:
https://www.opencart.com/index.php?rout ... n_id=46062

OpenCart 3.0.3.8
www.wattstruckcenter.com/shop


User avatar
Active Member

Posts

Joined
Fri Nov 15, 2013 10:47 pm

Post by nonnedelectari » Fri Apr 11, 2025 7:44 pm

rocketfoot wrote:
Fri Apr 11, 2025 5:53 pm
I have added an extension that keeps the customer logged in for a longer period to hopefully prevent some of this...but now a customer just emailed me saying that he clicked on our store site and when he checked his account, he noticed that it was completely someone else's account! He logged out and back in and all seems fine! I hope this new extension isn't going to be problematic! This is what I added:
https://www.opencart.com/index.php?rout ... n_id=46062
Its not about being logged in for a longer period of time, it is about that the merging of saved and current cart content for a user is done in the construct of the cart class by default. That is construct is executed on every request, where the cart class is instantiated, including every ajax call. That causes problems. So the solution is to get that merging out of that construct and only execute it when required, registration (and subsequent login) and regular login.

Active Member
Online

Posts

Joined
Thu Mar 04, 2021 6:34 pm

Post by rocketfoot » Tue Apr 15, 2025 4:25 am

It was a rough weekend! The extension I listed above to keep customers logged in appears to have mixed customer names and shipping addresses on orders! I had 3 orders come through that had a different customer name on the invoice but the correct shipping and credit card details for the ordering customer! Luckily we caught it right away and uninstalled the extension!

I'm just going to have to try and train customers to double check their orders before the submit them!

OpenCart 3.0.3.8
www.wattstruckcenter.com/shop


User avatar
Active Member

Posts

Joined
Fri Nov 15, 2013 10:47 pm
Who is online

Users browsing this forum: nonnedelectari and 96 guests