OrchardCMS / OrchardCMS/OrchardCore.Commerce
CreateOrderLineItemsAsync does not take care of product discounts (OCC-214)
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 231
- Forks
- 94
- Avg merge
- 7d 7h
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in PaymentService.CreateOrUpdateOrderFromShoppingCartAsync and trace the _shoppingCartHelpers.CreateOrderLineItemsAsync call. Compare how product discounts are handled before OrderLineItems are stored, then verify that completed orders show the discounted unit and line prices rather than the original prices.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend, payments
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100