-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fix bug 26449: Configurable product attribute issue #27339
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
Fix bug 26449: Configurable product attribute issue #27339
Conversation
- Set null for configurable options of parent product whenever it's saved
Hi @tna274. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
…enever it's saved - Update unit test
app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php
Outdated
Show resolved
Hide resolved
…enever it's saved - Remove static function
app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php
Outdated
Show resolved
Hide resolved
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.
Hi @tna274 : Please check the Unit Test. It is failed now. Please run vendor/bin/phpunit app/code/Magento/ConfigurableProduct/Test/Unit/Plugin/Model/ResourceModel/ProductTest.php
to check the error of Unit Test. Thanks.
Hi @edenduong |
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.
Method $object->setData($optionAttribute->getAttributeCode(), null);
(and the logic in if
block) is not covered by Unit Test. Please mockupgetExtensionAttributes
, to cover the if
block.
Thank you.
app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php
Show resolved
Hide resolved
app/code/Magento/ConfigurableProduct/Test/Unit/Plugin/Model/ResourceModel/ProductTest.php
Outdated
Show resolved
Hide resolved
Hi @edenduong |
app/code/Magento/ConfigurableProduct/Test/Unit/Plugin/Model/ResourceModel/ProductTest.php
Outdated
Show resolved
Hide resolved
app/code/Magento/ConfigurableProduct/Test/Unit/Plugin/Model/ResourceModel/ProductTest.php
Outdated
Show resolved
Hide resolved
app/code/Magento/ConfigurableProduct/Plugin/Model/ResourceModel/Product.php
Outdated
Show resolved
Hide resolved
app/code/Magento/ConfigurableProduct/Test/Unit/Plugin/Model/ResourceModel/ProductTest.php
Outdated
Show resolved
Hide resolved
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.
Hi @tna274 : Please check my comment
- Remove redundant code
use
instead of full class name- Mock object should be declare as postfix
mock
likesearchCriteriaBuilderMock
@magento run Functional Tests B2B, Functional Tests CE, Functional Tests EE |
Hi @VladimirZaets, thank you for the review. |
@magento run all tests |
Hi @tna274, thank you for your contribution! |
Description (*)
Fix bug 26449: when creating a new configurable product, configuration options attribute of parent product still have value
Related Pull Requests
N/A
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)