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

VP-1382: Sequential unique number generator #158

Closed
wants to merge 8 commits into from

Conversation

yecli
Copy link
Contributor

@yecli yecli commented Jun 16, 2020

Functional requirements:
We want to have a flexible and customizable template creation mechanism that gives us the following functionality:

Unique increasing number sequence for orders on all platform instances. It means different platform instances connected to the same db should genereate increasing order numbers;
In template, besides constant values, we need to have an ability to use: {0} - next number in the sequence, {1} - current UTC date;
Optionally - {2} - store code;
Formatting is applied using regular c# number and date formatting, like {0:d5};
Ability to set up incrementing step and sequence start;
Ability to setup reset rule for the sequence - None, every day, every week, etc;
Ability to reset sequence manually;
This extension could be used as a functional example:
https://bsscommerce.com/blog/complete-tutorial-guide-change-order-number-magento-2/#Tip_2_Use_Magento_2_Custom_Order_Number_extension
Technical details:
As a possible solution, we could add custom template number generator to the core module, with an ability to change its settings and enable it for the orders, payments, and shipping. Thus custom generator will replace the current one.
We need to add an abstraction for this purpose. Implementation could use MSSQL sequence objects under the hood to guarantee a unique and increasing sequence.

Make sure these boxes are checked:

@OlegoO
Copy link
Contributor

OlegoO commented Jan 26, 2024

New Implemenation in this PR #223

@OlegoO OlegoO closed this Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants