Allow order reference number to be unique #4012
Replies: 1 comment 4 replies
-
Yes, @lukeholder — this would be a very welcome improvement! The expectation is that duplicate order reference numbers should not be allowed under any circumstances — whether they're created or modified via the Control Panel, programmatically in PHP, or through the Ajax APIs. I’d also suggest that the uniqueness enforcement should be stricter than how slugs are currently handled. Automatically appending something like -2 may not align with accounting or business rule systems that rely on strict reference formats. Ideally, the behavior for handling collisions should either be configurable or disabled entirely, allowing developers to define a format that suits their use case. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently the order reference is not validated as unique as the order number is used for most handling of the order. It also allows for orders to complete even if an order reference number format accidentally made a duplicate reference without breaking checkout.
We should possibly look to make an option to validate uniqueness, or treat them like slugs with a
-2
on the end.Beta Was this translation helpful? Give feedback.
All reactions