The following calculation services are available to calculate order totals in different levels.
Beginning with Commerce 12, Episerver has improved how calculators work when calculating orders.
Previously, calculators recalculated prices and taxes even if an order had no changes or if the changes did not affect results. This practice is inefficient, especially when using an external tax service. It also creates problems with old orders, deleted products, expired promotions, new promotions, etc. In Commerce 12, if an order has no changes that affect results, no recalculations take place. Instead, the previously-calculated values are returned.
A new property, TaxCategoryId for LineItem, is available to store TaxCategoryId. So, even if a product is deleted, Commerce retains tax information for processing the order later.
In Commerce 12, if calculators process many calculations, such as using an external tax service or reading from a database, the results are stored in relevant objects. As examples, if any of the below properties changes, results are re-calculated and stored with the relevant object.
When you create an order (cart, purchase order, or payment plan) through the IOrderRepository, a shipment is created. Order calculators calculate only line items that belong to a shipment. This is a changed behavior from the way it worked with workflow activities.
Last updated: Apr 16, 2018