Magento: Change Attribute Type – Select to Multiselect

13. September 2013 at 17:51

Ihr möchtet den Attribute Type von Select auf Multiselect ändern?

so geht’s

$installer = $this;
$this->startSetup();
//$installer->updateAttribute('catalog_product', 'attributename', array('type' => 'varchar', 'input' => 'multiselect'));
$entityTypeId = $installer->getEntityTypeId('catalog_product', 'attributename');
$idAttributeOldSelect = $this->getAttribute($entityTypeId, 'attributename', 'attribute_id');
$installer->updateAttribute($entityTypeId, $idAttributeOldSelect, array(
    'frontend_input' => 'multiselect',
    'backend_type' => 'varchar'
));
$this->endSetup();