Skip to content

Commit aeed51a

Browse files
author
Stanislav Idolov
committed
MAGETWO-64518: \Magento\CatalogRule\Model\Indexer\IndexBuilder method "doReindexFull()" causes temporary missing sale prices
1 parent 16396b5 commit aeed51a

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

app/code/Magento/CatalogRule/Model/Indexer/RuleProductPricesPersistor.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,14 @@ public function execute(array $priceData, $useAdditionalTable = false)
6969
foreach ($priceData as $key => $data) {
7070
$productIds['product_id'] = $data['product_id'];
7171
$priceData[$key]['rule_date'] = $this->dateFormat->formatDate($data['rule_date'], false);
72-
$priceData[$key]['latest_start_date'] = $this->dateFormat->formatDate($data['latest_start_date'], false);
73-
$priceData[$key]['earliest_end_date'] = $this->dateFormat->formatDate($data['earliest_end_date'], false);
72+
$priceData[$key]['latest_start_date'] = $this->dateFormat->formatDate(
73+
$data['latest_start_date'],
74+
false
75+
);
76+
$priceData[$key]['earliest_end_date'] = $this->dateFormat->formatDate(
77+
$data['earliest_end_date'],
78+
false
79+
);
7480
}
7581
$connection->insertOnDuplicate($indexTable, $priceData);
7682
} catch (\Exception $e) {

app/code/Magento/CatalogRule/Test/Unit/Model/Indexer/RuleProductsSelectBuilderTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
use Magento\Framework\EntityManager\EntityMetadataInterface;
1515
use Magento\Store\Api\Data\WebsiteInterface;
1616

17+
/**
18+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
19+
*/
1720
class RuleProductsSelectBuilderTest extends \PHPUnit_Framework_TestCase
1821
{
1922
/**

0 commit comments

Comments
 (0)