Skip to content

Commit f09b664

Browse files
authored
fix typo in _applyCustomOption() to correctly calculate min/max price (#1500)
* fix typo in _applyCustomOption() to correctly calculate min/max price per website * Remove unnecessary core_store join
1 parent 438639f commit f09b664

File tree

1 file changed

+2
-12
lines changed
  • app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price

1 file changed

+2
-12
lines changed

app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Default.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,6 @@ protected function _applyCustomOption()
389389
'csg.group_id = cw.default_group_id',
390390
array()
391391
)
392-
->join(
393-
array('cs' => $this->getTable('core/store')),
394-
'cs.store_id = csg.default_store_id',
395-
array()
396-
)
397392
->join(
398393
array('o' => $this->getTable('catalog/product_option')),
399394
'o.product_id = i.entity_id',
@@ -411,7 +406,7 @@ protected function _applyCustomOption()
411406
)
412407
->joinLeft(
413408
array('otps' => $this->getTable('catalog/product_option_type_price')),
414-
'otps.option_type_id = otpd.option_type_id AND otpd.store_id = cs.store_id',
409+
'otps.option_type_id = otpd.option_type_id AND otps.store_id = csg.default_store_id',
415410
array()
416411
)
417412
->group(array('i.entity_id', 'i.customer_group_id', 'i.website_id', 'o.option_id'));
@@ -468,11 +463,6 @@ protected function _applyCustomOption()
468463
'csg.group_id = cw.default_group_id',
469464
array()
470465
)
471-
->join(
472-
array('cs' => $this->getTable('core/store')),
473-
'cs.store_id = csg.default_store_id',
474-
array()
475-
)
476466
->join(
477467
array('o' => $this->getTable('catalog/product_option')),
478468
'o.product_id = i.entity_id',
@@ -485,7 +475,7 @@ protected function _applyCustomOption()
485475
)
486476
->joinLeft(
487477
array('ops' => $this->getTable('catalog/product_option_price')),
488-
'ops.option_id = opd.option_id AND ops.store_id = cs.store_id',
478+
'ops.option_id = opd.option_id AND ops.store_id = csg.default_store_id',
489479
array()
490480
);
491481

0 commit comments

Comments
 (0)