Summary
There is a bug where applying a coupon triggers a conflict with a promotion associated with a utm_campaign
. When a promotion is activated by a specific utm_campaign
and a coupon (which also has its own utm_campaign
configuration) is added, the coupon removes the initial promotion. Despite the initial utm_campaign
remaining in the orderForm
, the initial promotion is no longer applied. The second promotion is triggered by the coupon, not by the UTM.
Simulation
To reproduce this behavior, follow these steps:
- Create Promotions:
- First Promotion: Set up a promotion for free shipping that is triggered by a specific
utm_campaign
. This promotion should be configured to activate based on the UTM parameter without requiring a coupon. - Second Promotion: Set up a promotion that provides a percentage discount and is associated with a different
utm_campaign
. This promotion should be configured to require a coupon for activation.
-
Reproduce the Bug:
-
Access the store using a link with the
utm_campaign
parameter that matches the first promotion (e.g.,utm_campaign=FREE_SHIPPING
). -
Add products to the cart.
-
Enter a postal code in the cart.
-
Verify that the free shipping promotion (first promotion) is applied.
-
Apply a coupon that triggers the second promotion (e.g.,
DISCOUNT20
). -
Observe that the initial free shipping promotion is removed from the cart after applying the coupon, even though the initial
utm_campaign
remains in theorderForm
.
Workaround
If the second promotion (triggered by the coupon) is configured with a utm_source
instead of utm_campaign
, the bug can be circumvented. In this case, both promotions will be applied successfully without any conflict.