2014-02-08 51 views
0

我有一個要求由一個屬性代碼,但對這一類激活錨分組的產品集合我得到這個錯誤的自定義模塊:致命錯誤:列未找到:未知列「Attribute_Code」(Magento的)

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'myattribute' in 'group statement' 

我的方法是:

protected function _beforeLoad() 
    { 
     if ($this->isEnabled()) { 
      if ($this->isEnabledFlat()) { 
       echo $this->getSelect()->columns(array('e.myattribute_ids' => new Zend_Db_Expr("GROUP_CONCAT(DISTINCT e.color SEPARATOR ',')")))->group('myattribute'); 

      } 

      $this->getSelect()->columns(array('e.myattribute_count' => new Zend_Db_Expr('COUNT(*)'))); 
     } 
     return parent::_beforeLoad(); 
    } 

什麼即時做錯了什麼?

該模塊的解釋是在這裏:

http://goo.gl/2bUqXs

回答

0

請檢查attibute「myattribute」適當添加

+0

是,正如我所說,在激活錨類別列表中選擇我得到了列「myattribute」不存在的錯誤消息。 – Dario

+0

請從「管理屬性」中的「產品清單中使用」中啓用該屬性... –

+0

產品清單中使用的是se至Yes。 – Dario

相關問題