0

I have set the multiple select option in system configuration. I need to get the selected values. I used the following, Mage::getStoreConfig('customer/group_location/data')

But I didn't get anything. Somebody help me

below is the system.xml code

<?xml version="1.0"?>
<config>
    <sections>
        <customer translate="label" module="customer">
            <groups>
                <group_location translate="label">
                    <label>Group Location</label>
                    <sort_order>200</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <fields> <!-- Add Group location under customer configuration -->
                        <data>
                            <label>Group Location</label>
                            <frontend_type>multiselect</frontend_type>
                            <source_model>customerattribute/attribute</source_model>
                            <sort_order>1</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                            <can_be_empty>1</can_be_empty>
                        </data>
                    </fields>
                </group_location>
            </groups>
        </customer>
    </sections>
</config>
  • 1
    Can you post the code from system.xml and config.xml – philwinkle Mar 16 '16 at 19:06
  • 1
    added system.xml @philwinkle – vinothavn Mar 16 '16 at 19:16
  • 1
    What if you change to a simple text field without source model? Do you manage to get something ? – Raphael at Digital Pianism Mar 16 '16 at 19:58
2

Just an idea...

Change data for any other identifier, as personal as you can, as it's a very common alias in Magento for getting data

  • 2
    That's a good idea I thought about it too, I was waiting for the OP to answer my comment before suggesting this. – Raphael at Digital Pianism Mar 17 '16 at 8:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.