Hi,
When i update the qunatity of a line item, the following error occurs on saving the cart. This product is provided with valid quantity and price but still this error occurs:
"Invalid order group total calculation"
The following code is used for updating the cart:
var lineItem = GetLineItem(cartDetail.Code);
if (lineItem != null)
{
status.Success = true;
if (cartDetail.Quantity > 0)
{
lineItem.Quantity = cartDetail.Quantity;
}
else
{
PurchaseOrderManager.RemoveLineItemFromOrder(Cart as OrderGroup, lineItem.LineItemId);
}
lineItem.SetCustomField(MetaFieldNames.LineComment, cartDetail.LineComment);
}
else
{
status.WarningMessage = "Can't find product with code " + cartDetail.Code;
updateActionStatus.Success = false;
}
updateActionStatus.CartActionStatuses.Add(status);
orderRepository.Save(cart);
Please help in resolving this issue.
Commerce Version Used : 13.7.1
Thanks in Advance.