Save select attribute options

$this->addAttribute(catalog_product, ‘product_burntime’, array( ‘group’ => ‘General’, ‘type’ => ‘text’, ‘input’ => ‘select’, ‘label’ => ‘Burn Time’, ‘backend’ => ”, ‘visible’ => true, ‘required’ => false, ‘visible_on_front’ => true, ‘global’ => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL, ‘source’ => ‘eav/entity_attribute_source_table’, ‘option’ => array( ‘values’=> array( 1 => ‘Large – upto 120 hrs burn time, Silver Lid’, 2 => ‘Medium – upto… Read more »

$this->addAttribute(catalog_product, 'product_burntime', array(
    'group'         => 'General',
    'type'          => 'text',
    'input'         => 'select',
    'label'         => 'Burn Time',
    'backend'       => '',
    'visible'       => true,
    'required'      => false,
    'visible_on_front' => true,
    'global'        => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'source' => 'eav/entity_attribute_source_table',
    'option' => array(
        'values'=> array(
            1 => 'Large - upto 120 hrs burn time, Silver Lid',
            2 => 'Medium - upto 60 hrs burn time, Silver Lid',
            3 => 'Travel Candle - upto 20 hrs burn time',
            4 => 'Pail Candle - upto 30 hrs burn time'
        )
    )
));

Share this Tutorial