Skip to content

collect all fee options before determining value of applyToAllLineItems

There is a bug determining applyToAllLineItems variable value.

If you configure a price set with 2 price fields, one with a single price field value, and the next with a set of checkbox price field values, and you configure a discount to apply only to the first price field, the discount is applied to the values in the second price field regardless.

This is two to applyToAllLineItems being set to true after the discount is processed for the first price field. Once applyToAllLineItems is set to true, the discount is applied to all subsequent price fields and price field values.

I see other MRs were trying to fix this in a similar way: !288 But that MR was rejected.

Reference #304 #288

This MR is causing problems: !301 (merged)

@JonGold @eileen

My solution seems to work but you all understand all use cases better.

Merge request reports