Post by Zidane » Sun Apr 12, 2020 11:55 am

Thanks for all who add to this helpful forum.
I have been using OC for a number of years and have found solutions in the forum to all previous issues, except this one.

After upgrading to OC 3.0.2.0, every now and then, like 2-4% of the time, a customer's order will double without them realizing. The quantity doesn't double, their whole order will be duplicated.

I am collecting these orders to see if I can find the pattern but no luck so far.

I have not been able to find anyone on here experiencing the same issue.

I am using a few plugins and as yet I haven't turned any of them off.

At first I thought it was a cookie thing i.e. customers returning to the shop/website and ordering again, not realizing their previous order was stored in a cookie.
I don't think it is this, it seems to be happening on the checkout page, although I cannot recreate it.

Nothing of interest in the error logs.

If someone can point me in the right direction that would be greatly appreciated.

Thanks
Tom

Newbie

Posts

Joined
Sun Apr 12, 2020 11:46 am

Post by letxobnav » Sun Apr 12, 2020 3:37 pm


Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by Zidane » Tue Apr 14, 2020 5:05 am

Thanks letxobnav,
I was able to reproduce the issue, after registering at checkout. I might add that the posts you linked to mention large orders (15+ items). Although for me the issue happens even with one item in the cart.

I will try what is mentioned in the above link, however there appears to be 3 fixes, 1: simple, one line of code in cart.php, 2: two new functions in register.php and login.php, and 3: a third that doesn't have much of an explanation.
Not being that experienced with code I am tempted for the simple solution. Could you perhaps tell me which to go for/try?
Thanks
Tom

Newbie

Posts

Joined
Sun Apr 12, 2020 11:46 am

Post by straightlight » Tue Apr 14, 2020 5:58 am

1: simple, one line of code in cart.php, 2: two new functions in register.php and login.php, and 3: a third that doesn't have much of an explanation.
Where are those three solutions you are referring about?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Zidane » Tue Apr 14, 2020 6:16 am

straightlight wrote:
Tue Apr 14, 2020 5:58 am
1: simple, one line of code in cart.php, 2: two new functions in register.php and login.php, and 3: a third that doesn't have much of an explanation.
Where are those three solutions you are referring about?
Hey Straightlight,

They are in this post:
viewtopic.php?t=211273

Thanks
Tom

Newbie

Posts

Joined
Sun Apr 12, 2020 11:46 am

Post by straightlight » Tue Apr 14, 2020 6:30 am

What that post indicates is whenever the customer ID is 0, it has been tweaked about cart duplication with a user-defined method. However, it may not avoid cart duplication whenever the customer ID is above 0.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Zidane » Tue Apr 14, 2020 9:24 am

[SOLVED]
I can confirm the link to the previous post, following edits to a number of cart, checkout and register files, has seemed to have solved the problem.
Thanks to all involved.
Tom

Newbie

Posts

Joined
Sun Apr 12, 2020 11:46 am

Post by fredJ » Fri May 10, 2024 5:10 pm

I tried these fixes but still have this problem from time to time.
???
Main problem is that when it happens the item stock gets reduced twice. If it's a large order, I annull it so it only gets reduced once. If it's a smaller order I can manually update the stock for the item or items.

At least there should be some function to ensure that stock value doesn't go below 0.
It's weird how the order gets put in twice, since it only has one order number. How can the system allow the order to be placed twice? Shouldn't there be some function that makes it impossible?

New member

Posts

Joined
Fri Jan 18, 2019 11:10 pm

Post by ADD Creative » Sat May 11, 2024 12:02 am

fredJ wrote:
Fri May 10, 2024 5:10 pm
I tried these fixes but still have this problem from time to time.
???
Main problem is that when it happens the item stock gets reduced twice. If it's a large order, I annull it so it only gets reduced once. If it's a smaller order I can manually update the stock for the item or items.

At least there should be some function to ensure that stock value doesn't go below 0.
It's weird how the order gets put in twice, since it only has one order number. How can the system allow the order to be placed twice? Shouldn't there be some function that makes it impossible?
Are you seeing two seperate orders or just a single order with the products doubled?

www.add-creative.co.uk


Expert Member

Posts

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

Post by fredJ » Mon May 13, 2024 7:21 pm

ADD Creative wrote:
Sat May 11, 2024 12:02 am
fredJ wrote:
Fri May 10, 2024 5:10 pm
I tried these fixes but still have this problem from time to time.
???
Main problem is that when it happens the item stock gets reduced twice. If it's a large order, I annull it so it only gets reduced once. If it's a smaller order I can manually update the stock for the item or items.

At least there should be some function to ensure that stock value doesn't go below 0.
It's weird how the order gets put in twice, since it only has one order number. How can the system allow the order to be placed twice? Shouldn't there be some function that makes it impossible?
Are you seeing two seperate orders or just a single order with the products doubled?
Thanks for your response.
I get one order with one order number, but it registers twice somehow.

I get two order emails, and when I check order history, it has two lines in it both saying "waiting".
So it's like it registers the purchase two times, but only deducts money one time.

It only seems to happen when customers check out through card checkout. But still it doesn't happen every time they chose card checkout, only maybe 5% of the times. However, it is always the same customers who "double order".

Here some user agents they use:
* Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
* Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36
* Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Safari/605.1.15
* Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0

So, what can I do? Any suggestion?

New member

Posts

Joined
Fri Jan 18, 2019 11:10 pm

Post by ADD Creative » Mon May 13, 2024 11:27 pm

fredJ wrote:
Mon May 13, 2024 7:21 pm
Thanks for your response.
I get one order with one order number, but it registers twice somehow.

I get two order emails, and when I check order history, it has two lines in it both saying "waiting".
So it's like it registers the purchase two times, but only deducts money one time.

It only seems to happen when customers check out through card checkout. But still it doesn't happen every time they chose card checkout, only maybe 5% of the times. However, it is always the same customers who "double order".

Here some user agents they use:
* Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
* Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36
* Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Safari/605.1.15
* Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0

So, what can I do? Any suggestion?
It's could be an issue with your card payment extension. It looks like somehow the confirmation of payment is being received twice. Have you check both your OpenCart and PHP error logs? Does you payment extension have a debug log? Have you contacted the developer?

www.add-creative.co.uk


Expert Member

Posts

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

Post by fredJ » Thu May 16, 2024 9:56 pm

Okay thanks!
I will check into the error log.

New member

Posts

Joined
Fri Jan 18, 2019 11:10 pm
Who is online

Users browsing this forum: o3445, pprmkr and 20 guests