New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[API][CatalogPromotion] Reapplying catalog promotions on rule update #13129
[API][CatalogPromotion] Reapplying catalog promotions on rule update #13129
Conversation
SirDomin
commented
Sep 21, 2021
Q | A |
---|---|
Branch? | master |
Bug fix? | no |
New feature? | yes |
BC breaks? | no |
Deprecations? | no |
Related tickets | |
License | MIT |
80cdd3a
to
b2f86a2
Compare
...omotion/applying_catalog_promotions/reapplying_catalog_promotion_after_changing_rule.feature
Outdated
Show resolved
Hide resolved
...omotion/applying_catalog_promotions/reapplying_catalog_promotion_after_changing_rule.feature
Outdated
Show resolved
Hide resolved
...omotion/applying_catalog_promotions/reapplying_catalog_promotion_after_changing_rule.feature
Outdated
Show resolved
Hide resolved
...omotion/applying_catalog_promotions/reapplying_catalog_promotion_after_changing_rule.feature
Outdated
Show resolved
Hide resolved
...omotion/applying_catalog_promotions/reapplying_catalog_promotion_after_changing_rule.feature
Outdated
Show resolved
Hide resolved
...omotion/applying_catalog_promotions/reapplying_catalog_promotion_after_changing_rule.feature
Outdated
Show resolved
Hide resolved
...omotion/applying_catalog_promotions/reapplying_catalog_promotion_after_changing_rule.feature
Outdated
Show resolved
Hide resolved
...omotion/applying_catalog_promotions/reapplying_catalog_promotion_after_changing_rule.feature
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/Swagger/PathHiderDocumentationNormalizer.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/Swagger/PathHiderDocumentationNormalizer.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/CoreBundle/EventListener/CatalogPromotionEventListener.php
Outdated
Show resolved
Hide resolved
45ea582
to
1befd29
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we have the possibility to define more than one, I would be for adding another scenario for checking reapplying after adding a second rule to catalog promotion that already has one defined
...omotion/applying_catalog_promotions/reapplying_catalog_promotion_after_changing_rule.feature
Outdated
Show resolved
Hide resolved
...omotion/applying_catalog_promotions/reapplying_catalog_promotion_after_changing_rule.feature
Outdated
Show resolved
Hide resolved
454f1d0
to
f2fedce
Compare
@@ -21,8 +21,7 @@ class ChannelPricingRepository extends EntityRepository implements ChannelPricin | |||
public function findWithDiscountedPrice(): array | |||
{ | |||
return $this->createQueryBuilder('o') | |||
->andWhere('o.originalPrice IS NOT NULL') | |||
->andWhere('o.originalPrice > o.price') | |||
->andWhere('o.appliedPromotions != \'[]\'') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure, this notation will be the same for postgres?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we don't have a build for postgres, I am not 100% sure
f2fedce
to
c34c503
Compare
…ing catalog promotions after editing rules
c34c503
to
effb8eb
Compare
a261860
to
7194095
Compare
And the visitor should see that the "PHP Mug" variant is discounted from "$5.00" to "$2.50" with "Mug sale" promotion | ||
|
||
@api | ||
Scenario: Reapplying catalog promotion after adding another action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scenario: Reapplying catalog promotion after adding another action | |
Scenario: Reapplying catalog promotion after adding another rule |
Thank you, Dominik and Grzegorz 🎉 |