Skip to content
Snippets Groups Projects
Commit eb7caeac authored by Roman Ganin's avatar Roman Ganin
Browse files

MAGETWO-33690: Category page displays outdated prices after catalog price rule is deleted

- added check for non-empty product list
parent ad015e8a
No related merge requests found
......@@ -462,7 +462,10 @@ class Rule extends \Magento\Rule\Model\AbstractModel
public function afterSave()
{
if ($this->isObjectNew()) {
$this->_ruleProductProcessor->reindexList($this->getMatchingProductIds());
$this->getMatchingProductIds();
if (!empty($this->_productIds) && is_array($this->_productIds)) {
$this->_ruleProductProcessor->reindexList($this->_productIds);
}
} else {
$this->_ruleProductProcessor->getIndexer()->invalidate();
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment