Skip to content

Commit 50b58dd

Browse files
kandyadifucan
authored andcommitted
index table fix
1 parent 022bd9d commit 50b58dd

File tree

4 files changed

+36
-6
lines changed

4 files changed

+36
-6
lines changed

app/code/Magento/Bundle/Model/ResourceModel/Indexer/Price.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,17 @@ private function applyBundlePrice($priceTable): void
822822
]
823823
);
824824

825-
$this->tableMaintainer->insertFromSelect($select, $priceTable->getTableName(), []);
825+
$this->tableMaintainer->insertFromSelect($select, $priceTable->getTableName(), [
826+
"entity_id",
827+
"customer_group_id",
828+
"website_id",
829+
"tax_class_id",
830+
"price",
831+
"final_price",
832+
"min_price",
833+
"max_price",
834+
"tier_price",
835+
]);
826836
}
827837

828838
/**

app/code/Magento/ConfigurableProduct/Model/ResourceModel/Product/Indexer/Price/OptionsIndexer.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ public function __construct(
4242
public function execute(string $indexTable, string $tempIndexTable, ?array $entityIds = null): void
4343
{
4444
$select = $this->selectBuilder->execute($indexTable, $entityIds);
45-
$this->tableMaintainer->insertFromSelect($select, $tempIndexTable, []);
45+
$this->tableMaintainer->insertFromSelect($select, $tempIndexTable, [
46+
"entity_id",
47+
"customer_group_id",
48+
"website_id",
49+
"tax_class_id",
50+
"price",
51+
"final_price",
52+
"min_price",
53+
"max_price",
54+
"tier_price",
55+
]);
4656
}
4757
}

app/code/Magento/ConfigurableProduct/Model/ResourceModel/Product/Indexer/Price/OptionsSelectBuilder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ public function execute(string $indexTable, ?array $entityIds = null): Select
8585
'le.entity_id',
8686
'customer_group_id',
8787
'website_id',
88-
'MIN(final_price)',
89-
'MAX(final_price)',
90-
'MIN(tier_price)',
88+
'final_price' => 'MIN(final_price)',
89+
'final_price' => 'MAX(final_price)',
90+
'tier_price' => 'MIN(tier_price)',
9191
]
9292
)->group(
9393
['le.entity_id', 'customer_group_id', 'website_id']

app/code/Magento/Downloadable/Model/ResourceModel/Indexer/Price.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,17 @@ private function fillFinalPrice(
255255
IndexTableStructure $temporaryPriceTable
256256
) {
257257
$select = $this->baseFinalPrice->getQuery($dimensions, Type::TYPE_DOWNLOADABLE, iterator_to_array($entityIds));
258-
$this->tableMaintainer->insertFromSelect($select, $temporaryPriceTable->getTableName(), []);
258+
$this->tableMaintainer->insertFromSelect($select, $temporaryPriceTable->getTableName(), [
259+
"entity_id",
260+
"customer_group_id",
261+
"website_id",
262+
"tax_class_id",
263+
"price",
264+
"final_price",
265+
"min_price",
266+
"max_price",
267+
"tier_price",
268+
]);
259269
}
260270

261271
/**

0 commit comments

Comments
 (0)