Jump to content

Bug same cart id for different orders id


Recommended Posts

I experienced this situation yesterday.

 

The customer alleged he pressed the "order confirm" twice.

 

However, there are over 8 logs. I think customer is not telling the true or the details on what he did.

 

The strangest part is, 2 logs show the cart amount, the order id and cart id.

The others 6 are empty or zero.

 

Confusing to understand, right? I will try to illustrate below

id, cart id, order id, amount, date
1   10       XXX       1000    2015-07-14 10:00:00
2                      0       2015-07-14 10:04:51
3                      0       2015-07-14 10:04:51
4                      0       2015-07-14 10:04:51
5                      0       2015-07-14 10:04:51
6                      0       2015-07-14 10:04:51
7                      0       2015-07-14 10:04:51
8   10       YYY       1000    2015-07-14 10:05:00

*The log was generated by third part module.

1. Same cart id was used in 2 different orders id.

2. The second order was saved 5 minutes later
3. The empty logs was save in the same time, the same fraction of second.


One consideration about the discrepancy of 5 minutes is, the module perform connection with third party webservice before save the order.

So, i'm thinking the customer was unlucky at moment of order confirmation. Probably happened a delay on webservice and then, the customer, after wait long time tried to refresh the page or click the "order confirm" button many times.

My question is, 

PrestaShop permit create new orders with same cart id already used by another order id?

 

 

PS 1.6.0.14

 

 

Edited by omine (see edit history)
Link to comment
Share on other sites

My question is, 

PrestaShop permit create new orders with same cart id already used by another order id?

 

 

PS 1.6.0.14

yes it does, but not for this reason.  PS supports (or perhaps used to) the ability to deliver a single cart to multiple different addresses.  Or to support situations where some products are in stock, while others are back ordered.  For those reasons, PS would create multiple orders using the same cart id

  • Like 1
Link to comment
Share on other sites

  • 4 months later...

pixelwebmx,

for my case, the main problem was a faulty validation in some parameters received from $_GET and $_POST.

 

Another issue was a lack into the module codes where empty value was being accepted. But shouldn't.

 

To reduce the problem, i just added more consistent codes.

Edited by omine (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...