Problem/Motivation
groupAdjustments() used a dead $order_data variable in its isset() check, so it
was never populated and every adjustment simply overwrote the previous one of
the same type. When an order item carried more than one adjustment of a type
(e.g. two stacked promotions), the grouped "total" kept only the last one.
The per-item split then subtracted the share of *all* same-type adjustments from
that understated total, driving the running remainder negative, and the
last-item reconciliation folded that bogus remainder into the final bundle
component — producing a discount larger than the component's own price.
Fix: accumulate into $adjustments_amounts directly. Also fold the last-item
rounding remainder into a single adjustment per type (break) so it is not
multiplied across several same-type adjustments.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork commerce_variation_bundle-3615956
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
valic