I'm following this alanstorm tutorial and when I'm trying to load the backend page I've got this error:
Fatal error: Uncaught Error: Class 'Mage_Antonino-banner_Helper_Data' not found
Probably there's some typo or some naming convention error, but I really cannot find it.
My app/code/local/Antonino/Banner/etc/config.xml is
<?xml version="1.0" encoding="UTF-8" ?>
<config>
<modules>
<Antonino_Banner>
<version>1.0.0</version>
</Antonino_Banner>
</modules>
<global>
<models>
<banner>
<class>Antonino_Banner_Model</class>
</banner>
</models>
<helpers>
<banner>
<class>Antonino_Banner_Helper</class>
</banner>
</helpers>
</global>
</config>
And my app/code/local/Antonino/Banner/etc/system.xml is
<?xml version="1.0" encoding="UTF-8" ?>
<config>
<tabs>
<antonino_banner translate="label" module="antonino-banner">
<label>Antonino</label>
<sort_order>350</sort_order>
</antonino_banner>
</tabs>
<sections>
<antoninobanner translate="label" module="antonino-banner">
<label>Banner Config Options</label>
<tab>antonino_banner</tab>
<frontend_type>text</frontend_type>
<sort_order>300</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<groups>
<general translate="label">
<label>General</label>
<frontend_type>text</frontend_type>
<sort_order>5</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<choose_category translate="label comment">
<label>Choose Category</label>
<comment>Select the category to which apply the banner</comment>
<frontend_type>select</frontend_type>
<source_model>banner/categories</source_model>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</choose_category>
</fields>
</general>
<anothergroup translate="label">
<label>Another Group</label>
<frontend_type>text</frontend_type>
<sort_order>5</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</anothergroup>
</groups>
</antoninobanner>
<antoninobannertwo translate="label" module="antonino-banner">
<label>Another section</label>
<tab>antonino_banner</tab>
<frontend_type>text</frontend_type>
<sort_order>300</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</antoninobannertwo>
</sections>
</config>
The error shows when i the method Mage::helper('banner')->__('Hello') in app/code/local/Antonino/Banner/Model/Categories.php which code is
<?php
class Antonino_Banner_Model_Categories extends Mage_Core_Helper_Abstract
{
public function toOptionArray()
{
return array(
array('value'=>1, 'label'=>Mage::helper('banner')->__('Hello')),
array('value'=>2, 'label'=>Mage::helper('banner')->__('Goodbye')),
array('value'=>3, 'label'=>Mage::helper('banner')->__('Yes')),
array('value'=>4, 'label'=>Mage::helper('banner')->__('No')),
);
}
}
Someone could pls help me? I really cannot figure out why this is not working.
Thanks!