Skip to content

Commit eb7caea

Browse files
author
Roman Ganin
committed
MAGETWO-33690: Category page displays outdated prices after catalog price rule is deleted
- added check for non-empty product list
1 parent ad015e8 commit eb7caea

File tree

1 file changed

+4
-1
lines changed
  • app/code/Magento/CatalogRule/Model

1 file changed

+4
-1
lines changed

app/code/Magento/CatalogRule/Model/Rule.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,10 @@ protected function _invalidateCache()
462462
public function afterSave()
463463
{
464464
if ($this->isObjectNew()) {
465-
$this->_ruleProductProcessor->reindexList($this->getMatchingProductIds());
465+
$this->getMatchingProductIds();
466+
if (!empty($this->_productIds) && is_array($this->_productIds)) {
467+
$this->_ruleProductProcessor->reindexList($this->_productIds);
468+
}
466469
} else {
467470
$this->_ruleProductProcessor->getIndexer()->invalidate();
468471
}

0 commit comments

Comments
 (0)