-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: CatalogFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 releasegood first issue
Description
The commit a77fd52 refactors the method addAttributeToFilter
in file app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php
by adding two new methods addIsSaleableAttributeToFilter
and addTierPriceAttributeToFilter
.
However, there are missing return statements in the if
statement which break method chaining. https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php#L1591-L1597
Preconditions (*)
- Magento Version 2.3.3
Steps to reproduce (*)
- Create an instance of \Magento\Catalog\Model\ResourceModel\Product\Collection
- Call the method
addAttributeToFilter
with attributeis_saleable
- Chain the method
addAttributeToFilter
with any other attribute to chain the function
Expected result (*)
- Method chaining works as expected
Actual result (*)
addAttributeToFilter
returns null when addingis_saleable
to filter, therefore breaking method chaining
ahmedelbougha
Metadata
Metadata
Assignees
Labels
Component: CatalogFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 releasegood first issue