Skip to content

Commit

Permalink
rewrote the setPart usage because its wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano committed Mar 15, 2023
1 parent 089c00c commit bc6b10f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,14 @@ protected function _getSelect($filter)

// processing WHERE part
$wherePart = $select->getPart(Zend_Db_Select::WHERE);
$select->reset(Zend_Db_Select::WHERE);
$excludedWherePart = Mage_Catalog_Model_Resource_Product_Collection::MAIN_TABLE_ALIAS . '.status';
foreach ($wherePart as $key => $wherePartItem) {
if (strpos($wherePartItem, $excludedWherePart) !== false) {
$wherePart[$key] = new Zend_Db_Expr('1=1');
continue;
}
$wherePart[$key] = $this->_replaceTableAlias($wherePartItem);
$select->where($this->_replaceTableAlias($wherePartItem));
}
$select->setPart(Zend_Db_Select::WHERE, $wherePart);
$excludeJoinPart = Mage_Catalog_Model_Resource_Product_Collection::MAIN_TABLE_ALIAS . '.entity_id';
foreach ($priceIndexJoinConditions as $condition) {
if (strpos($condition, $excludeJoinPart) !== false) {
Expand Down

0 comments on commit bc6b10f

Please sign in to comment.