Created
February 7, 2014 12:04
-
-
Save kubaceg/8861525 to your computer and use it in GitHub Desktop.
Magento install select attribtue with multi shore values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$installer = $this; | |
$installer->startSetup(); | |
$setup = new Mage_Eav_Model_Entity_Setup('core_setup'); | |
$attribute = array( | |
'group' => 'General', | |
'type' => 'varchar', | |
'input' => 'select', | |
'label' => 'Populatity', | |
'required' => 0, | |
'searchable' => 0, | |
'filterable' => 0, | |
'comparable' => 0, | |
'visible' => 0, | |
'visible_on_front' => 0, | |
'user_defined' => 1, | |
'option' => array( | |
'value' => array( | |
'small' => array(0 => "mała", 1 => "small", 2 => "small", 7 => "small"), | |
'medium' => array(0 => "średnia", 1 => "medium", 2 => "medium", 7 => "medium"), | |
'large' => array(0 => "duża", 1 => "large", 2 => "large", 7 => "large"), | |
) | |
) | |
); | |
$setup->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'popularity', $attribute); | |
$installer->endSetup(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment