Pregunta

he seguido el tutorial en esta página

http: //www.johannreinke.com/en/2012/01/30/add-custom-settings-in-magento-admin-panel/

Mientras que yo era capaz de obtener el código fuente proporcionado al trabajo sin ningún problema, no he sido capaz de obtener la versión editada del código de trabajo. Se me está diciendo

Warning: include(Mage/VMR/Batch/Model/System/Config/Source/Dropdown/Values.php) [function.include]: failed to open stream: No such file or directory

Aquí está el bloque XML que define ese modelo

                    <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>

¿Alguna idea sobre por qué se está mirando en Mago / VMR / .... En lugar de VMR / ....?

Edit: Aquí está mi XML bloque para Modelos

<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>
¿Fue útil?

Solución

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
Licenciado bajo: CC-BY-SA con atribución
No afiliado a magento.stackexchange
scroll top