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] Receiving discount promotion #12081
Conversation
Tomanhez
commented
Nov 24, 2020
Q | A |
---|---|
Branch? | master |
Bug fix? | no |
New feature? | yes |
BC breaks? | no |
Deprecations? | no |
License | MIT |
79a333a
to
0ddad77
Compare
0ddad77
to
a2cef23
Compare
|
||
$items = $this->responseChecker->getValue($this->cartsClient->getLastResponse(), 'items'); | ||
|
||
foreach ($items as $item) { |
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.
foreach ($items as $item) { | |
$productName = $product->getName(); | |
foreach ($items as $item) { | |
if ($item['productName'] === $productName()) { |
in this $product->getName()
we will call once but I assume there is not a lot of items in the $items.
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.
You wrong, look in this scenario: features/promotion/receiving_discount/receiving_discount_from_promotion_with_multiple_actions.feature
there are two products
a2cef23
to
5c28552
Compare
5c28552
to
377a445
Compare
Thank you, Tomasz! 🥇 |
This PR was merged into the 1.9-dev branch. Discussion ---------- | Q | A | --------------- | ----- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | License | MIT This PR is based on #12081 <!-- - Bug fixes must be submitted against the 1.7 or 1.8 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 ------- 25afe06 Add api tags to behats