1

Consider I have two items in my cart 50 USD each , I also have a coupon '20 USD off 100'. when I apply this my cart will look like below (for simplicity and focus I am eliminating tax and shipping)


Item 1 50 X1 = 50
Item 2 50 X1 = 50
subtotal =100
discount (-)20
**Total 80

now I have multiple cases where I have to split this 20 USD to items so that returns at third party are easy , also in situations where the two items will be fulfilled by two independent vendors.

I understand that ATG's ReturnManager class provide wealth of methods to calculate returns and does consider all item shipping order discounts and taxes.

but is there a way I can split the order discount to items Out of the Box based on weighted average algorithm.

Thanks

2 Answers2

1

The simplest way to do this would be, to do the splitting algorithm in a Order Pipeline Processor (custom processor) store the split Item Level Discount Shares in a ApportionmentInfo repository item. Whenever, a return occurs you need to access this repository item through the order and display it to the user.

Regards, Gaurav E

GauravEdekar
  • 145
  • 9
-1

You Can't

Basically OrderPricingEngine will set adjusment against OrderPriceInfo. you cant do apportionment that to item level because the trigger is on order.

Best practice is expose a reprice Order as service to thirdparty. Re run the calculation

and identify the return value. If you customize per promotion level it will open up pandora box of reprice order issue.