-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[CatalogPromotion] Clear applied catalog promotions after updating #13100
[CatalogPromotion] Clear applied catalog promotions after updating #13100
Conversation
GSadee
commented
Sep 14, 2021
Q | A |
---|---|
Branch? | master |
Bug fix? | no |
New feature? | yes? |
BC breaks? | no |
Deprecations? | |
Related tickets | |
License | MIT |
10c5546
to
19f06a3
Compare
public function findWithDiscountedPrice(): array | ||
{ | ||
return $this->createQueryBuilder('o') | ||
->andWhere('o.originalPrice IS NOT NULL') |
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.
What if somebody manually set the original price as equal to the price? It can happen 😄 maybe additional ->andWhere('o.originalPrice > o.price
) would do the trick?
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.
Because of that, I've added an additional check if the applied promotions are not empty: https://github.com/Sylius/Sylius/pull/13100/files#diff-5f3a950780ee137f6c0dbe75d71b3ef264f25fbb5d634b9ec463fdab7b1b5819R37
Wouldn't it be enough for now?
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.
Fair enough for the merge, but would be good to add that where
too in the nearest future 🖖
Thank you, Grzegorz! 🥇 |
…icings (GSadee) This PR was merged into the 1.11-dev branch. Discussion ---------- | Q | A | --------------- | ----- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | fixes #13100 (comment) | License | MIT <!-- - Bug fixes must be submitted against the 1.9 or 1.10 branch (the lowest possible) - Features and deprecations must be submitted against the master branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html --> Commits ------- c69e751 [ChannelPricing] Improve query for finding discounted pricings
…icings (GSadee) This PR was merged into the 1.11-dev branch. Discussion ---------- | Q | A | --------------- | ----- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | fixes Sylius/Sylius#13100 (comment) | License | MIT <!-- - Bug fixes must be submitted against the 1.9 or 1.10 branch (the lowest possible) - Features and deprecations must be submitted against the master branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html --> Commits ------- c69e7518581cc1f3d784570784bec5926861d95c [ChannelPricing] Improve query for finding discounted pricings