Question

i install the custom_attribute extension, in that i created a field name like "language" with multi select type, also there have a option to add the select box option values.

i add this field into the edit profile page, after selects the user language i want to display the selected language to some other page.

may i know in which table the options value will be stored.

see the below screen you will be feel better to answer my post.

1)customer custom multi select attribute(language)

enter image description here

2)eav attribute table

enter image description here

3)Customer entity varchar table

enter image description here

Was it helpful?

Solution

In eav_attribute table,

  • All attributes

In eav_attribute_option table,

  • Attributes options with reference to reference attribute_id in eav_attribute table

In eav_attribute_option_value table,

  • Attribute option values with reference to option_id in eav_attribute_option table,

In your customer_entity_varchar table 15,14,13,12 refers to option_id in eav_attribute_option table and you can refer the labels for 15,14,13,12 in eav_attribute_option_value table

To get the values like array(12=>'Portuguese',13=>'spanish',14=>'hindi',15=>'tamil')

 /**
     * @var $config  Mage_Eav_Model_Config
     * @var $options Mage_Eav_Model_Resource_Entity_Attribute_Option_Collection
     */
    $storeId   = Mage::app()->getStore()->getId();
    $config    = Mage::getModel('eav/config');
    $attribute = $config->getAttribute(Mage_Catalog_Model_Product::ENTITY, 'color');
    $values    = $attribute->setStoreId($storeId)->getSource()->getAllOptions();
    print_r($values);

    //here is another method
    $options = Mage::getResourceModel('eav/entity_attribute_option_collection');
    $values  = $options->setAttributeFilter($attribute->getId())->setStoreFilter($storeId)->toOptionArray();
    print_r($values);
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top