We are migrating a site from an osCommerce installation, maintaining all of the old order numbers. This means that the order_id and order_number are out of sync, but both numeric. That's fine, and Commerce allows it.
However, on the new Commerce site, anytime a new order is created, we get an integrity constraint violation, because the order number already exists. That's because the next order_id to be inserted in the database already exists as an order_number. So it crashes.
Should commerce_order_commerce_order_insert first check if the order_number already exists before blindly setting the order_number to the order_id?
In our case, it stops the site from working. Should we implment hook_commerce_order_insert(). Would that be called INSTEAD of the default order module implementation? The quick, dirty solution is just to set the auto_increment higher, but I wanted to log this error.
Thanks.
Closed: outdated
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.