|
| 1 | +diff -Nuar a/vendor/magento/module-swatches/Block/Product/Renderer/Listing/Configurable.php b/vendor/magento/module-swatches/Block/Product/Renderer/Listing/Configurable.php |
| 2 | +--- a/vendor/magento/module-swatches/Block/Product/Renderer/Listing/Configurable.php |
| 3 | ++++ b/vendor/magento/module-swatches/Block/Product/Renderer/Listing/Configurable.php |
| 4 | +@@ -9,7 +9,6 @@ use Magento\Catalog\Block\Product\Context; |
| 5 | + use Magento\Catalog\Helper\Product as CatalogProduct; |
| 6 | + use Magento\Catalog\Model\Product; |
| 7 | + use Magento\Catalog\Model\Layer\Resolver; |
| 8 | +-use Magento\Catalog\Model\Layer\Category as CategoryLayer; |
| 9 | + use Magento\ConfigurableProduct\Helper\Data; |
| 10 | + use Magento\ConfigurableProduct\Model\ConfigurableAttributeData; |
| 11 | + use Magento\Customer\Helper\Session\CurrentCustomer; |
| 12 | +@@ -244,9 +243,12 @@ class Configurable extends \Magento\Swatches\Block\Product\Renderer\Configurable |
| 13 | + |
| 14 | + $layeredAttributes = []; |
| 15 | + |
| 16 | +- $configurableAttributes = array_map(function ($attribute) { |
| 17 | +- return $attribute->getAttributeCode(); |
| 18 | +- }, $configurableAttributes); |
| 19 | ++ $configurableAttributes = array_map( |
| 20 | ++ function ($attribute) { |
| 21 | ++ return $attribute->getAttributeCode(); |
| 22 | ++ }, |
| 23 | ++ $configurableAttributes |
| 24 | ++ ); |
| 25 | + |
| 26 | + $commonAttributeCodes = array_intersect( |
| 27 | + $configurableAttributes, |
| 28 | +@@ -259,17 +261,4 @@ class Configurable extends \Magento\Swatches\Block\Product\Renderer\Configurable |
| 29 | + |
| 30 | + return $layeredAttributes; |
| 31 | + } |
| 32 | +- |
| 33 | +- /** |
| 34 | +- * @inheritdoc |
| 35 | +- * @since 100.3.1 |
| 36 | +- */ |
| 37 | +- public function getCacheKeyInfo() |
| 38 | +- { |
| 39 | +- $cacheKeyInfo = parent::getCacheKeyInfo(); |
| 40 | +- /** @var CategoryLayer $catalogLayer */ |
| 41 | +- $catalogLayer = $this->layerResolver->get(); |
| 42 | +- $cacheKeyInfo[] = $catalogLayer->getStateKey(); |
| 43 | +- return $cacheKeyInfo; |
| 44 | +- } |
| 45 | + } |
0 commit comments