-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: ConfigurableProductFixed in 2.4.xThe issue has been fixed in 2.4-develop branchThe issue has been fixed in 2.4-develop branchIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passed
Description
Magneto 2.3.x
Preconditions (*)
- Render product listing
Proposal to optimize or replace getUsedProductCollection
in call
\Magento\ConfigurableProduct\Model\Product\Type\Configurable::isSalable
since it can affect performance
e.g. create alias for getUsedProductCollection
-> getLinkedProductCollection
and use this method in isSalable
additionally store its result to prevent multiple DB calls.
Steps to reproduce (*)
- Render prices on product listing
- Check if product is saleable
Expected result (*)
- plugin
\Magento\Swatches\Model\Plugin\Configurable::afterGetUsedProductCollection
is not called afterisSaleable
call \Magento\ConfigurableProduct\Model\Product\Type\Configurable::isSalable
stores result since it can be called twice
Actual result (*)
- plugin
\Magento\Swatches\Model\Plugin\Configurable::afterGetUsedProductCollection
is called when isSaleable checks - Multiple call of
\Magento\ConfigurableProduct\Model\Product\Type\Configurable::isSalable
affects performance since the result is not cached andafterGetUsedProductCollection
called
Metadata
Metadata
Assignees
Labels
Component: ConfigurableProductFixed in 2.4.xThe issue has been fixed in 2.4-develop branchThe issue has been fixed in 2.4-develop branchIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passed