Post by labeshops » Wed Dec 30, 2020 12:56 am

Okay, this is a very strange bug - first time, I thought it just a weird 1x glitch, but I have found at least 3 instances.

I am using 3.0.3.2 and the paypal commerce platform. I am getting most orders correctly, but at least 3 times now, an old opencart order id is suddenly assigned to the order when it is processed thru payments so the order never appears in opencart - not under missing orders or the order id. But the payment went thru paypal and shows the old order id in the paypal transaction details!!! I cannot figure out any reason for this glitch other than a possible bug in how the order ids are assigned??? I am currently in 24xxx order ids and one showed up as 21xxx, another as 20xxx and the third I have found so far as 22xxx number ranges - not even sequential!!! These were across different dates too, so not something glitching on a date.

Any idea how this could happen and how to correct it? I only found these when the customers called wondering where their order was - short of checking every single payment in paypal which I don't have time to do since I get a LOT of orders, not sure how to even find them!!

I have no mods that do anything with order ids or anything I can think of that might affect it. I looked at error logs from the dates of the last one and nada. I don't have logs from the dates of the first 2.

Running Opencart v3.0.3.2 with multi-stores from https://www.labeshops.com which has links to all my stores.

Image


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by IP_CAM » Fri Jan 01, 2021 12:23 am

Well, that's most likely not an OC3 Bug, but the result of trying to
make an older Version DB fully work with OC3.
Ernie

I am no longer active at the Forum. Please do NOT send me Personal Mails,
they will no longer be replied to.
My Github OC Site: https://github.com/IP-CAM
4'300 + FREE OC Extensions, on the World's largest Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by ADD Creative » Fri Jan 01, 2021 6:18 am

labeshops wrote:
Wed Dec 30, 2020 12:56 am
Okay, this is a very strange bug - first time, I thought it just a weird 1x glitch, but I have found at least 3 instances.

I am using 3.0.3.2 and the paypal commerce platform. I am getting most orders correctly, but at least 3 times now, an old opencart order id is suddenly assigned to the order when it is processed thru payments so the order never appears in opencart - not under missing orders or the order id. But the payment went thru paypal and shows the old order id in the paypal transaction details!!! I cannot figure out any reason for this glitch other than a possible bug in how the order ids are assigned??? I am currently in 24xxx order ids and one showed up as 21xxx, another as 20xxx and the third I have found so far as 22xxx number ranges - not even sequential!!! These were across different dates too, so not something glitching on a date.

Any idea how this could happen and how to correct it? I only found these when the customers called wondering where their order was - short of checking every single payment in paypal which I don't have time to do since I get a LOT of orders, not sure how to even find them!!

I have no mods that do anything with order ids or anything I can think of that might affect it. I looked at error logs from the dates of the last one and nada. I don't have logs from the dates of the first 2.
The order ID is assigned here by the database when an order is added.
https://github.com/opencart/opencart/bl ... .php#L4-L6

So for the order ID to be wrong it could be a problem with the database generating the next ID or the result of an extension, theme or payment module changing the way orders are added to the database.

www.add-creative.co.uk


Expert Member

Posts

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

Post by JNeuhoff » Fri Jan 01, 2021 11:42 pm

Perhaps multiple sessions, initiated by different customers, all trying to add an order at nearly the same time? Perhaps we need use MySQL locking for cooperating table accesses between sessions. I have seen something similar for other OpenCart MySQL tables when adding rows on rare occasions, and managed to verify the issue when looking at the access logs. In our case it mainly happened when our server was bombarded by high-volume traffic.

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Expert Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: No registered users and 6 guests