on 2018 Nov 14 4:40 PM
Hi experts.. we have an option in hmc and backoffice to recalculate totals in cart.. What is the method name for this in business layer? is that the calculateTotals(cartModel) in the DefaultCalculationService? I need to call the exact same method in my business logic to calculate totals.. my webservice call isnt picking product level discounts, so i had to insert the discountvalues list in the cart entry.. The prices have to be refreshed after this list insertion in entry..
Request clarification before answering.
Hello
I’ve confirmed that when you use “Recalculate order totals” button you’re calling for
public void calculateTotals(final AbstractOrderModel order, final boolean recalculate)
method.
This method call another method:
calculateTotals(final AbstractOrderModel order, final boolean recalculate,
final Map<TaxValue, Map<Set<TaxValue>, Double>> taxValueMap)
This method calculates all totals. This does not trigger price, tax and discount calculation but takes all currently set price, tax and discount values as a base. For more information refer to de.hybris.platform.order.impl.DefaultCalculationService
I confirmed that’s product level discounts are used in calculating and that total price field is changing.
This might help you as well:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.