Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs for replacing the Umbraco Commerce order number generator #6904

Open
mattbrailsford opened this issue Feb 21, 2025 · 0 comments
Open

Comments

@mattbrailsford
Copy link
Contributor

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

https://our.umbraco.com/packages/website-utilities/vendr/vendr-support/102060-changing-order-number-format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants