-
Notifications
You must be signed in to change notification settings - Fork 811
Closed
Description
In Umbraco Commerce it's possible to replace the in build order number generator if people don't like the format of the order numbers we generate. This is done by implementing the IOrderNumberGenerator
public interface IOrderNumberGenerator
{
string GenerateCartNumber(Guid storeId);
string GenerateOrderNumber(Guid storeId);
}Once implemented, you replace the built in implementation by following the guide here for how to replace dependencies https://docs.umbraco.com/umbraco-commerce/key-concepts/dependency-injection#replacing-dependencies, using the code
builder.Services.AddUnique<IOrderNumberGenerator, MyOrderNumberGenerator>();In the docs we should probably copy a bunch of the note logged in this forum issue as there are some very important points people should be aware of