-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Feature Request - Custom Totals Database Schema Improvement #1247
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
Comments
+1 Current totals implementation y near to impossible to get right, and there Also, there is too much code duplication as most custom totals work more or
|
The service contracts on the order, invoice, creditmemo should remain the same I guess, ie
|
Created JIRA story - MAGETWO-37216 to backlog. |
Thank you for your submission. We recently made some changes to the way we process GitHub submissions to more quickly identify and respond to core code issues. Feature Requests and Improvements should now be submitted to the new Magento 2 Feature Requests and Improvements forum (see details here). We are closing this GitHub ticket and have moved your request to the new forum. |
[performance] MAGETWO-69130: Non effective query for catalog search & layered navigation
Custom Totals are a great feature of Magento. I do believe we can improve their implementation and reduce overall complexity by keeping custom totals in separate dedicated database tables similar to how we store line items.
With the current structure to add a new custom total to cover base and order currency plus tax, at my last count, one has to add:
1.) 13 columns to table sales/order
2.) 4 columns to sales/invoice
3.) 4 columns to sales/creditmemo
Not everyone gets this right including for example Enterprise custom totals:
vs.
I believe if we had the following tables
sales/order_totals
sales/order_invoice_totals
sales/order_creditmemo_totals
with the following columns:
and additionally for the
sales/order_totals
tablethis would help a lot with the aim to
a.) remove duplication of efforts (every custom total shouldn't need to add all these columns)
b.) take away complexity of having to set up the database to reduce chances for errors
Additionally to keep track of tax I think these should be linked through to the same table that we use to keep track of taxed items to allow for multiple taxes on the totals (and be able to reconstruct this later). If we don't link to the tax table we should at least add
tax_percentage
.The text was updated successfully, but these errors were encountered: