Jump to content

Change order id to a new order id


Miguel86
 Share

Recommended Posts

Hi:
I have a problem in my website regarding the orders due to an integration with an external system that i have. The problem is that external system only allows to integrate order ids higher than the last integrated order id so when i create in prestashop an order that remains in a order status that is not integrated to the system (because of a credit system that need to validate if the  bank gives the credit) later that order is not integrated because another order (of other user) has been generated.

For example:
I enter to the website i create the and order and i select as the payment method the credit system, when i return from the payment gateway creates the order id 5 in the status "Pending authorization", this status is not sent to the external system.  Maeby this takes hours and in the meanwhile another user enters and selects instant payment and is generated the order id 6. As this order is reported to the external system, later then the credit system authorized that transaction is not processed by the external system. So my idea was in this point to "reset" the order id to the new one, for example 7. I don't mind leave jumps in order ids. 

To reset the order id is there any way through code or should i update directly database? ps_order*** tables? Any other table i should update?

I know this is not directly a problem of prestashop, i'm just trying to find the way to solve this situation as the external system is not open source and i can't edit code there.
Thanks in advance.

Share this post


Link to post
Share on other sites

I don't think is possible as the external system directly expects and reads the order id. Needs to be an auto incremental number. I asked them about this situation and told that they think the only possibility is to regenerate order id number in this cases.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More