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] add original price to product variant #12877
Merged
Merged
Conversation
This file contains 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
Contributor
SirDomin
commented
Aug 10, 2021
Q | A |
---|---|
Branch? | master |
Bug fix? | no |
New feature? | yes |
BC breaks? | no |
Deprecations? | no |
Related tickets | |
License | MIT |
arti0090
approved these changes
Aug 11, 2021
AdamKasp
suggested changes
Aug 11, 2021
src/Sylius/Bundle/ApiBundle/Serializer/ProductVariantNormalizer.php
Outdated
Show resolved
Hide resolved
SirDomin
force-pushed
the
product-original-price
branch
from
August 11, 2021 06:52
c99452a
to
d69671f
Compare
SirDomin
force-pushed
the
product-original-price
branch
from
August 11, 2021 08:23
017fd40
to
b3e3f10
Compare
Arminek
reviewed
Aug 11, 2021
AdamKasp
suggested changes
Aug 11, 2021
src/Sylius/Bundle/ApiBundle/Serializer/ProductVariantNormalizer.php
Outdated
Show resolved
Hide resolved
SirDomin
force-pushed
the
product-original-price
branch
from
August 11, 2021 12:26
e05a805
to
dde631e
Compare
AdamKasp
approved these changes
Aug 11, 2021
Tomanhez
approved these changes
Aug 11, 2021
Thanks, @SirDomin! 🥇 |
lchrusciel
reviewed
Aug 12, 2021
@@ -343,6 +366,17 @@ private function hasProductWithName(array $products, string $name): bool | |||
return false; | |||
} | |||
|
|||
private function hasProductWithOriginalPrice(array $products, int $originalPrice): bool | |||
{ | |||
foreach ($products as $product) { |
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.
Why do we have an array of products here? Also, this loop just checks if there is any product with original_price
, not the particular, which seems bad
AdamKasp
added a commit
that referenced
this pull request
Aug 13, 2021
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 for #12877 | License | MIT ! MERGE #12883 FIRST Commits ------- d88eed4 Change the behat implementation to be more strict
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.