Skip to content

Commit 5a5d571

Browse files
committed
Fix bug where manually discounted was set to true when it was in fact set automatically by catalog promotions
1 parent 456c634 commit 5a5d571

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/EventListener/UpdateManuallyDiscountedPropertySubscriber.php

+6
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ private static function update(LifecycleEventArgs $event): void
4040
return;
4141
}
4242

43+
// here we check if the channel pricing is part of an already applied catalog promotion or
44+
// a job is running to add a catalog promotion to this channel pricing
45+
if ([] !== $channelPricing->getAppliedPromotions() || null !== $channelPricing->getBulkIdentifier()) {
46+
return;
47+
}
48+
4349
if ($event instanceof PreUpdateEventArgs
4450
&& !$event->hasChangedField('price')
4551
&& !$event->hasChangedField('originalPrice')

0 commit comments

Comments
 (0)