You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using price discounts.
This works fine except that the discounts are not applied on OrderLineItems when stored in Order.
In PaymentService.CreateOrUpdateOrderFromShoppingCartAsync _shoppingCartHelpers.CreateOrderLineItemsAsync is called to get the items to store in the order. But within that method, product discounts are not applied.
Hence when displaying a completed order, you don't see the discounted prices (unit price and line price) paid but the original prices.
github-actionsbot
changed the title
CreateOrderLineItemsAsync does not take care of product discounts
CreateOrderLineItemsAsync does not take care of product discounts (OCC-214)
Jan 10, 2024
This could be fixed in Payment/Services/PaymentService.cs in methods CreatePendingOrderFromShoppingCartAsync and CreateOrUpdateOrderFromShoppingCartAsync:
Instead of _shoppingCartHelpers.CreateOrderLineItemsAsync(cart) call _shoppingCartHelpers.CreateOrderLineItemsAsyncEx(cartViewModel)
(created CreateOrderLineItemsAsyncEx similar to existing CreateOrderLineItemsAsync but accepting the view model of the cart instead of the cart itself).
This also fixes my issue that shipping costs added to the view model lines via IShoppingCartEvents:ViewModelCreatedAsync were not part of the order (#4 ).
Could the standard implementation get changed this way?
Hi,
I am using price discounts.
This works fine except that the discounts are not applied on OrderLineItems when stored in Order.
In PaymentService.CreateOrUpdateOrderFromShoppingCartAsync _shoppingCartHelpers.CreateOrderLineItemsAsync is called to get the items to store in the order. But within that method, product discounts are not applied.
Hence when displaying a completed order, you don't see the discounted prices (unit price and line price) paid but the original prices.
Jira issue
The text was updated successfully, but these errors were encountered: