coisio/module-multiselect-attribute-fix

Fixes Multiselect attributes indexing issues

1.0.0 2017-05-19 11:51 UTC

This package is auto-updated.

Last update: 2024-11-10 23:02:48 UTC


README

Please note when you run a custom attribute of multiselect & text to be saved on the flat table:

You have to tell the indexer about the flat table column.

public function getFlatColums()
    {
        $attributeCode = $this->getAttribute()->getAttributeCode();
        $column = array(
            'default'   => null,
            'extra'     => null
        );
        if (Mage::helper('core')->useDbCompatibleMode()) {
            $column['type']     = 'varchar(255)';
            $column['is_null']  = true;
        } else {
            $column['type']     = Varien_Db_Ddl_Table::TYPE_VARCHAR;
            $column['nullable'] = true;
            $column['comment']  = $attributeCode . ' column';
        }
        return array($attributeCode => $column);
    }