I have created configuration options. It works fine but i want to add dynamic dropdown values. For that i have created select field and added source_model.
which is in
Baka/Mama/Model/System/Config/Source/Selectsand
Folder.
in system.xml
file i have created Following Field.
<selectsand>
<label>Dropdown</label>
<comment>Dropdown with global scope.</comment>
<frontend_type>select</frontend_type>
<source_model>baka_mama/system_config_source_selectsand_values</source_model>
<sort_order>30</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</selectsand>
Fatal error: Call to a member function toOptionArray() on a non-object in C:\xampp\htdocs\magento\includes\src\Mage_Adminhtml_Block_System_Config_Form.php on line 463
in Values.php
file i have added following code.
class Baka_Mama_Model_System_Config_Source_Selectsand_Values{
public function toOptionArray()
{
return array(
array('value' => 0, 'label' =>'Pizza'),
array('value' => 1, 'label' => 'Pasta'),
array('value' => 2, 'label' =>'Manchuriyan'),
// and so on...
);
}
Where am i making mistake? Need help to resolve it.
Any help would be appreciated.