[CatalogPromotion] Clear applied catalog promotions after updating#13100
Merged
Zales0123 merged 2 commits intoSep 14, 2021
Merged
Conversation
Member
GSadee
commented
Sep 14, 2021
| Q | A |
|---|---|
| Branch? | master |
| Bug fix? | no |
| New feature? | yes? |
| BC breaks? | no |
| Deprecations? | |
| Related tickets | |
| License | MIT |
arti0090
approved these changes
Sep 14, 2021
10c5546 to
19f06a3
Compare
Zales0123
approved these changes
Sep 14, 2021
| public function findWithDiscountedPrice(): array | ||
| { | ||
| return $this->createQueryBuilder('o') | ||
| ->andWhere('o.originalPrice IS NOT NULL') |
Contributor
There was a problem hiding this comment.
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?
Member
Author
There was a problem hiding this comment.
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?
Contributor
There was a problem hiding this comment.
Fair enough for the merge, but would be good to add that where too in the nearest future 🖖
Contributor
|
Thank you, Grzegorz! 🥇 |
AdamKasp
added a commit
that referenced
this pull request
Sep 15, 2021
…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
AdamKasp
added a commit
to Sylius/SyliusCoreBundle
that referenced
this pull request
Sep 15, 2021
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.