-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2214 from magento-panda/forwardports-pr
Fixed issues: - MAGETWO-88082 [Magento Cloud] Using search synonyms from the same group gives different results - MAGETWO-72620 Configurable product shows up on category page on storefront when child products are disabled via Mass Action
- Loading branch information
Showing
8 changed files
with
286 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
app/code/Magento/CatalogInventory/Model/Plugin/ReindexUpdatedProducts.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\CatalogInventory\Model\Plugin; | ||
|
||
use Magento\Catalog\Model\Product\Action as ProductAction; | ||
|
||
/** | ||
* Plugin for Magento\Catalog\Model\Product\Action | ||
*/ | ||
class ReindexUpdatedProducts | ||
{ | ||
/** | ||
* @var \Magento\CatalogInventory\Model\Indexer\Stock\Processor | ||
*/ | ||
private $indexerProcessor; | ||
|
||
/** | ||
* @param \Magento\CatalogInventory\Model\Indexer\Stock\Processor $indexerProcessor | ||
*/ | ||
public function __construct(\Magento\CatalogInventory\Model\Indexer\Stock\Processor $indexerProcessor) | ||
{ | ||
$this->indexerProcessor = $indexerProcessor; | ||
} | ||
|
||
/** | ||
* Reindex on product attribute mass change | ||
* | ||
* @param ProductAction $subject | ||
* @param ProductAction $action | ||
* @param array $productIds | ||
* @return ProductAction | ||
* | ||
* @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||
*/ | ||
public function afterUpdateAttributes( | ||
ProductAction $subject, | ||
ProductAction $action, | ||
$productIds | ||
) { | ||
$this->indexerProcessor->reindexList(array_unique($productIds)); | ||
return $action; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.