Magento set product attribute in getAllOptions (get option from attribute)

File: \Model\Eav\Entity\Attribute\Source\Customeroptions.php

  public function getAllOptions($withEmpty = true, $defaultValues = false)
    {
        $source  = Mage::getModel('eav/config')->getAttribute('catalog_product', 'attributeName');
        return $source->getSource()->getAllOptions($withEmpty, $defaultValues);
    }
	
Advertisements

Magento: How to change a customer dropdown attribute to a multiselect

UPDATE eav_attribute SET
entity_type_id = '4',
attribute_model = NULL,
backend_model = 'eav/entity_attribute_backend_array',
backend_type = 'text',
backend_table = NULL,
frontend_model = NULL,
frontend_input = 'multiselect',
frontend_class = NULL
WHERE attribute_id = 'YOUR_ATTRIBUTE_ID_HERE';