-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Attribute category_ids issue #11389
Attribute category_ids issue #11389
Conversation
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.
After all changes are made and all builds but functional tests are green on Travis, please squash changes into a single commit.
} elseif ($attribute->getFrontendInput() == 'price' && is_string($value)) { | ||
$value = $this->priceCurrency->convertAndFormat($value); | ||
} | ||
if(!is_array($value)) { |
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.
Please do not increase indentation, change to
if (is_array($value)) {
continue;
}
if(!is_array($value)) { | ||
if (!$product->hasData($attribute->getAttributeCode())) { | ||
$value = __('N/A'); | ||
} elseif (is_array($value)) { |
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.
This seems to be always false condition, please remove.
if (!$product->hasData($attribute->getAttributeCode())) { | ||
$value = __('N/A'); | ||
} elseif (is_array($value)) { | ||
continue; |
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.
No-no, your initial idea with skipping everything in case of array was fine, continue
here is a bit confusing.
Please move it upper:
if (is_array($value = $attribute->getFrontend()->getValue($product))) {
continue;
}
and the rest will remain the same. Please squash changes into single commit when builds are green (you can ignore functional tests on Travis, they are failing sometimes due to timeouts).
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.
fix it
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.
Fix it
if (!$product->hasData($attribute->getAttributeCode())) { | ||
$value = __('N/A'); | ||
} elseif (is_array($value)) { | ||
continue; |
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.
fix it
@manuelson thanks, changes look good to me now and builds on Travis are passing. Could you please squash all changes into a single commit? I may assist with this if needed. |
@orlangur did You mean that I have to close this PR and open a new one with a single commit? |
No, just force push into the same branch. |
Fixed issue: MAGETWO-77777 [2.2.x] - [Magento Cloud] Using search synonyms from the same group gives different results array bug fix Category_ids display no Refactoring continue condition Condition rewrite
eec39a4
to
c33d9d7
Compare
Done |
@orlangur @okobchenko @vkublytskyi can be SQUASHTOBERFEST? :) |
@manuelson not sure who defines it, not me :( |
Hello @orlangur for close it , you need any update? Thanks! |
Hi @manuelson, no update needed, I believe it's still waiting for testing
|
Public Pull Requests #11807 [backport 2.1] Attribute category_ids issue #11389 by @manuelson Fixed Public Issues #11341 Attribute category_ids issue
Description
Attribute category_ids issue
Fixed Issues
Contribution checklist