public function addFieldToFilter($attribute, $condition = null)
 {
     if ($attribute == 'name') {
         $this->getSelect()->where($this->_getConditionSql('t.name', $condition));
         return $this;
     } else {
         return parent::addFieldToFilter($attribute, $condition);
     }
 }
Example #2
0
 public function addFieldToFilter($attribute, $condition = null)
 {
     if ($attribute == 'name') {
         $where = $this->_getConditionSql('t.name', $condition);
         $this->getSelect()->where($where, null, Varien_Db_Select::TYPE_CONDITION);
         return $this;
     } else {
         return parent::addFieldToFilter($attribute, $condition);
     }
 }