Duplicate promotion adjustments added to order items because of the promotion subscriber

Created on 9 January 2024, 12 months ago
Updated 10 January 2024, 12 months ago

Problem/Motivation

This one is going to be hard to explain. The logic we have in the PromotionSubscriber re-applies promotions on a "fake" order. But the order items aren't duplicated/faked, causing promotion adjustments to be added twice.

This happens whenever a combination offer is applied with an inclusive shipping promotion.
The fix I have in mind is similar to what we're doing for shipments... Simply fake order items as well.
I'm a little bit worried about the potential side effects, especially if the combination offer has a BuyXGetY offer configured.

Will attach a patch that implements the approach I have in mind, let's see if the tests are failing.

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇮🇱Israel jsacksick

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024