Skip to content

Commit d283e50

Browse files
authored
ENGCOM-3616: Fix typo in SQL join when joining custom option prices for price indexer #19546
2 parents cb08046 + cb98904 commit d283e50

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/CustomOptionPriceModifier.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ public function modifyPrice(IndexTableStructure $priceTable, array $entityIds =
127127
}
128128

129129
/**
130+
* Check if custom options exist.
131+
*
130132
* @param IndexTableStructure $priceTable
131133
* @return bool
132134
* @throws \Exception
@@ -154,6 +156,8 @@ private function checkIfCustomOptionsExist(IndexTableStructure $priceTable): boo
154156
}
155157

156158
/**
159+
* Get connection.
160+
*
157161
* @return \Magento\Framework\DB\Adapter\AdapterInterface
158162
*/
159163
private function getConnection()
@@ -211,7 +215,7 @@ private function getSelectForOptionsWithMultipleValues(string $sourceTable): Sel
211215
} else {
212216
$select->joinLeft(
213217
['otps' => $this->getTable('catalog_product_option_type_price')],
214-
'otps.option_type_id = otpd.option_type_id AND otpd.store_id = cwd.default_store_id',
218+
'otps.option_type_id = otpd.option_type_id AND otps.store_id = cwd.default_store_id',
215219
[]
216220
);
217221

@@ -373,6 +377,8 @@ private function getSelectAggregated(string $sourceTable): Select
373377
}
374378

375379
/**
380+
* Get select for update.
381+
*
376382
* @param string $sourceTable
377383
* @return \Magento\Framework\DB\Select
378384
*/
@@ -402,6 +408,8 @@ private function getSelectForUpdate(string $sourceTable): Select
402408
}
403409

404410
/**
411+
* Get table name.
412+
*
405413
* @param string $tableName
406414
* @return string
407415
*/
@@ -411,6 +419,8 @@ private function getTable(string $tableName): string
411419
}
412420

413421
/**
422+
* Is price scope global.
423+
*
414424
* @return bool
415425
*/
416426
private function isPriceGlobal(): bool

app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/DefaultPrice.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
/**
1212
* Default Product Type Price Indexer Resource model
13+
*
1314
* For correctly work need define product type id
1415
*
1516
* @api
@@ -208,6 +209,8 @@ public function reindexEntity($entityIds)
208209
}
209210

210211
/**
212+
* Reindex prices.
213+
*
211214
* @param null|int|array $entityIds
212215
* @return \Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\DefaultPrice
213216
*/
@@ -604,7 +607,7 @@ protected function _applyCustomOption()
604607
[]
605608
)->joinLeft(
606609
['otps' => $this->getTable('catalog_product_option_type_price')],
607-
'otps.option_type_id = otpd.option_type_id AND otpd.store_id = cs.store_id',
610+
'otps.option_type_id = otpd.option_type_id AND otps.store_id = cs.store_id',
608611
[]
609612
)->group(
610613
['i.entity_id', 'i.customer_group_id', 'i.website_id', 'o.option_id']
@@ -802,6 +805,8 @@ public function getIdxTable($table = null)
802805
}
803806

804807
/**
808+
* Check if product exists.
809+
*
805810
* @return bool
806811
*/
807812
protected function hasEntity()
@@ -823,6 +828,8 @@ protected function hasEntity()
823828
}
824829

825830
/**
831+
* Get total tier price expression.
832+
*
826833
* @param \Zend_Db_Expr $priceExpression
827834
* @return \Zend_Db_Expr
828835
*/
@@ -863,6 +870,8 @@ private function getTotalTierPriceExpression(\Zend_Db_Expr $priceExpression)
863870
}
864871

865872
/**
873+
* Get tier price expression for table.
874+
*
866875
* @param string $tableAlias
867876
* @param \Zend_Db_Expr $priceExpression
868877
* @return \Zend_Db_Expr

0 commit comments

Comments
 (0)