Skip to content

Commit

Permalink
MAGETWO-52311: \Magento\Catalog\Cron\RefreshSpecialPrices::_refreshSp…
Browse files Browse the repository at this point in the history
…ecialPriceByStore should reference link field
  • Loading branch information
vzabaznov committed Apr 27, 2016
1 parent 2715736 commit 76cee92
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/code/Magento/Catalog/Cron/RefreshSpecialPrices.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@ protected function _refreshSpecialPriceByStore($storeId, $attrCode, $attrConditi
$select = $connection->select()->from(
['attr' => $this->_resource->getTableName(['catalog_product_entity', 'datetime'])],
[
$identifierField => 'cat.'.$identifierField,
$identifierField => 'cat.' . $identifierField,
]
)->joinLeft(
['cat' => $this->_resource->getTableName('catalog_product_entity')],
'cat.'.$linkField . '= attr.'.$linkField,
'cat.' . $linkField . '= attr.' . $linkField,
''
)->where(
'attr.attribute_id = ?',
Expand All @@ -164,8 +164,10 @@ protected function _refreshSpecialPriceByStore($storeId, $attrCode, $attrConditi
$attrConditionValue
);

if (!empty($connection->fetchCol($select))) {
$this->_processor->getIndexer()->reindexList($connection->fetchCol($select, $identifierField));
$selectData = $connection->fetchCol($select, $identifierField);

if (!empty($selectData)) {
$this->_processor->getIndexer()->reindexList($selectData);
}

}
Expand Down

0 comments on commit 76cee92

Please sign in to comment.