Try our conversational search powered by Generative AI!

LineItemCaltulator returning 0



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);

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

Running on a Commerce 12.7.0

Any idea why this happens ?  

Edited, Sep 18, 2018 10:14

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?

Sep 18, 2018 10:39

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. 

Sep 18, 2018 12:57

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

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.