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 Oct 17, 2022
1 parent 15f83af commit 84ad415
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 84ad415

Please sign in to comment.