var initialOrder = _orderService.GetOrderById(processPaymentRequest.InitialOrderId); var discounts = initialOrder.DiscountUsageHistory.Select(o => o.Discount).ToList();
I am using nopCommerce 4.2. The order has not been inserted yet, so our tool cannot look up discounts using that code. Is there another way? Tried this code, but I see no discounts:
_orderTotalCalculationService.GetShoppingCartSubTotal(customer.ShoppingCartItems.ToList(), true, out _discountAmount, out _discounts, out _subTotalWithoutDiscount, out _subTotalWithDiscount, out _taxRates);
I see a subTotalWithDiscount and a subTotalWithoutDiscount field and they are correct.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.