You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently you can define a custom function to generate order codes. One problem is that there is no check done to see if that code is unique, and there is no way to easily check this in the function itself because it is not injectable.
Describe the solution you'd like
Rather than the current function:
Closes#452
BREAKING CHANGE: The `orderOptions.generateOrderCode` config option has been replaced with `orderOptions.orderCodeStrategy`. This change allows order code generation to take advantage of the `InjectableStrategy` interface, i.e. to be able to inject Vendure services and other providers (e.g. the database connection). See the `OrderCodeStrategy` documentation for guidance on how to use the new API.
Is your feature request related to a problem? Please describe.
Currently you can define a custom function to generate order codes. One problem is that there is no check done to see if that code is unique, and there is no way to easily check this in the function itself because it is not injectable.
Describe the solution you'd like
Rather than the current function:
we should accept an object which implements the InjectableStrategy interface which will allows the function itself to check for uniqueness.
The text was updated successfully, but these errors were encountered: