Try our conversational search powered by Generative AI!

LineItemCaltulator returning 0

Vote:
 

Hey, 

Sitting with an issue on a new commerce integration where we cant calculate LineItem/OrderGroup totals. 

Following lines always returns Zero: 
var _orderGroupCalculator = ServiceLocator.Current.GetInstance();
var _lineItemCalculator = ServiceLocator.Current.GetInstance();
_lineItemCalculator.GetLineItemPrices(lineItem, iCart.Currency);
iCart.GetOrderGroupTotals(_orderGroupCalculator)

While the following call successfully gets the price of the same product: 
var priceDetailService = ServiceLocator.Current.GetInstance();
priceDetailService.List(variantReference).ContentLink);

Running on a Commerce 12.7.0

Any idea why this happens ?  

#196950
Edited, Sep 18, 2018 10:14
Vote:
 

ILineItemCalculator returns a LineItemPrices which contains extended price and discounted price. It is possible to return 0 when you are giving more discount than the cost of the line item. for example, if you are buying 2 items with price per unit = 4.5, and you have a promotion of "buying 2 get $10 discount". Is that the case?

#196951
Sep 18, 2018 10:39
Vote:
 

Tricky thing is that we have no discounts set up - just a straight price for the product. 

So my guess is that we are missing some configuration, or found a bug - i just cant figure out what it is. 

#196961
Sep 18, 2018 12:57
Vote:
 

You are always welcome to contact developer support service for further assistance :)

#196962
Sep 18, 2018 12:58
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.