Admin Area Custom Configuration
Question
I followed the tutorial on this page
http://www.johannreinke.com/en/2012/01/30/add-custom-settings-in-magento-admin-panel/
While I was able to get the source code provided to work without a problem, I have not been able to get the edited version of the code to work. It is telling me
Warning: include(Mage/VMR/Batch/Model/System/Config/Source/Dropdown/Values.php) [function.include]: failed to open stream: No such file or directory
Here is the XML Block defining that model
<multiple_dropdown translate="label comment">
<label>Multiselect</label>
<comment>Multiselect with global scope.</comment>
<frontend_type>multiselect</frontend_type>
<source_model>VMR_Batch/system_config_source_dropdown_values</source_model>
<sort_order>40</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>0</show_in_website>
<show_in_store>0</show_in_store>
</multiple_dropdown>
Any Ideas on why it is looking in Mage/VMR/.... Instead of VMR/.... ?
Edit: Here is my XML Block For Models
<global>
<models>
<!-- VMR Batch Results Model Declaration -->
<batch>
<class>VMR_Batch_Model</class>
<resourceModel>batch_mysql4</resourceModel>
</batch>
<!-- VMR Batch Results Table Declaration -->
<batch_mysql4>
<class>VMR_Batch_Model_Mysql4</class>
<entities>
<batch>
<table>vmr_batches</table>
</batch>
</entities>
</batch_mysql4>
</models>
Solution
Assuming the module is enabled and loading (if it's not, you'll need to solve that problem first), check the etc/config.xml
in the VMR_Batch module and make sure it has the proper configuration declaring the class prefix for models:
<global>
<models>
<vmr_batch>
<class>VMR_Batch_Model</class>
</vmr_batch>
</models>
</global>
Then where you are referencing the source model, reference it using all lower case to match the node name in the XML shown above:
vmr_batch/system_config_source_dropdown_values