Posted: July 17, 2019 at 6:03 AM Quote #242592
nopCommerce version: 4.2

Steps to reproduce the problem:

Place an order with a single item
visit the admin order management page for that order.
Delete the single line item

An exception is thrown in OrderTotalCalculationService.UpdateOrderTotals because the customer is null. This is because in the OrderProcessingService.UpdateOrderTotals method, the restored cart has no items in it, so there is no way to get a customer record

This can be simply fixed. Instead of trying to get the customer from restored cart, in OrderTotalCalculationService.UpdateOrderTotals, get it from the order:

customer = updateOrderParameters.UpdatedOrder.Customer;
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)