https://github.com/rootindex/module-multiselect-attribute-fix
Magento Multi-select Attribute Indexing Fix
https://github.com/rootindex/module-multiselect-attribute-fix
Last synced: 28 days ago
JSON representation
Magento Multi-select Attribute Indexing Fix
- Host: GitHub
- URL: https://github.com/rootindex/module-multiselect-attribute-fix
- Owner: rootindex
- License: mit
- Created: 2017-05-19T11:45:12.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-19T11:51:28.000Z (about 9 years ago)
- Last Synced: 2025-12-15T02:19:20.872Z (6 months ago)
- Language: PHP
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Magento Multi-select Attribute Indexing Fix
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.
```php
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);
}
```