Magento 致命错误:未找到列:未知列';属性代码';(马根托)

Magento 致命错误:未找到列:未知列';属性代码';(马根托),magento,attributes,filtering,Magento,Attributes,Filtering,我有一个自定义模块,该模块请求按属性代码分组的产品集合,但在该类别上激活锚点时,我遇到以下错误: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'myattribute' in 'group statement' 我的方法是: protected function _beforeLoad() { if ($this->isEnabled()) { if ($this->i

我有一个自定义模块,该模块请求按属性代码分组的产品集合,但在该类别上激活锚点时,我遇到以下错误:

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();
    }
我做错了什么

模块说明如下:


请检查属性是否正确添加了“myattribute”

正如我所说,在激活类别列表上的锚选项时,我收到了错误消息,即“myattribute”列不存在。请在“产品列表中使用”中从管理属性启用该属性…产品列表中使用的属性为se到Yes。这应该是一条注释,没有答案。