Problem/Motivation
While moving through the cart for a bundle purchase, adjustment values show properly, but once placed the values are incorrect. See screenshots.
Steps to reproduce
In my case, I set up a bundle with three products, each $25, set the bundle price to $50 (a 1/3 discount) and percentage to "0" (still trying to figure out how these interact). I set the bundle to itemize the products when the order is placed. As shown in the cart view the total balance is $50 as expected, but on the placed order view the first two items are discounted partially but the last has the whole discount applied.
I would expect the discount to be applied evenly over the items.
Looking at the code there. seems to be a bug in VariationBundleSplitter: line #82 applies the remaining adjustment to the last item but instead of using the calculated adjustment it uses the original full bundle adjustment. Changing the following seems to fix it:
$datum->setAdjustments($adjustments); => $datum->setAdjustments($calculated_adjustments);
| Comment | File | Size | Author |
|---|---|---|---|
| 2-placed.png | 216.92 KB | tkiehne | |
| 1-cart.png | 94.52 KB | tkiehne |
Comments