Skip to content

Commit 51e17d4

Browse files
committed
MC-19646: [Magento Cloud] - Catalog Product Rule Indexer stuck
1 parent a9d10f7 commit 51e17d4

File tree

1 file changed

+3
-26
lines changed

1 file changed

+3
-26
lines changed

app/code/Magento/CatalogRuleConfigurable/Plugin/CatalogRule/Model/Rule/ConfigurableProductHandler.php

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
<?php
22
/**
3+
*
34
* Copyright © Magento, Inc. All rights reserved.
45
* See COPYING.txt for license details.
56
*/
67
namespace Magento\CatalogRuleConfigurable\Plugin\CatalogRule\Model\Rule;
78

9+
use Magento\ConfigurableProduct\Model\Product\Type\Configurable;
810
use Magento\CatalogRuleConfigurable\Plugin\CatalogRule\Model\ConfigurableProductsProvider;
911

1012
/**
11-
* Add configurable sub products to catalog rule indexer on reindex
13+
* Add configurable sub products to catalog rule indexer on full reindex
1214
*/
1315
class ConfigurableProductHandler
1416
{
@@ -40,31 +42,6 @@ public function __construct(
4042
}
4143

4244
/**
43-
* Add configurable products during setting product ids for filtering
44-
*
45-
* @param \Magento\CatalogRule\Model\Rule $rule
46-
* @param int|array $productIds
47-
* @return array
48-
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
49-
*/
50-
public function beforeSetProductsFilter(\Magento\CatalogRule\Model\Rule $rule, $productIds)
51-
{
52-
if ($productIds) {
53-
$configurableProductIds = $this->configurable->getParentIdsByChild($productIds);
54-
if ($configurableProductIds) {
55-
$productIds = array_merge((array) $productIds, $configurableProductIds);
56-
57-
}
58-
}
59-
60-
return [
61-
$productIds,
62-
];
63-
}
64-
65-
/**
66-
* Add configurable products for matched products
67-
*
6845
* @param \Magento\CatalogRule\Model\Rule $rule
6946
* @param array $productIds
7047
* @return array

0 commit comments

Comments
 (0)