0

This is my config file located at app\etc\modules\Mage_Homepage

<?xml version="1.0"?>
<config>
<modules>
<Mage_Homepage>
  <active>true</active>
  <codePool>local</codePool>
  <version>0.0.1</version>
</Mage_Homepage>
</modules>
</config>

Then I added my module config file at \app\code\local\Mage\Homepage\etc\config.xml

 <?xml version="1.0" encoding="UTF-8"?>
 <config>
  <modules>
    <Mage_Homepage>
        <version>0.0.1</version>
    </Mage_Homepage>
  </modules>
<global>
    <helpers>
      <homepage>
        <class>Mage_Homepage_Helper</class>
      </homepage>
    </helpers>
    <models>
        <homepage>
            <class>Mage_Homepage_Model</class>
        </homepage>
    </models>
    <events>
 <controller_action_predispatch_cms_index_index>
          <observers>
              <mage_homepage_model_observer>
                  <model>mage_homepage/observer</model>
                  <method>homepage</method>
              </mage_homepage_model_observer>
          </observers>
  </controller_action_predispatch_cms_index_index>
    </events>
</global>
</config>

system file :\app\code\local\Mage\Homepage\etc\system.xml

<?xml version="1.0"?>

<config>
  <tabs>
    <mage translate="label" module="homepage">
        <label>MasterSoftwareSolutions</label>
        <sort_order>0</sort_order>
    </mage>
  </tabs>
  <sections>
    <mage  translate="label" module="homepage">                    
    <label>DHFLU</label>
    <tab>Custom Tabsd</tab>
    <frontend_type>text</frontend_type>
    <sort_order>0</sort_order>
    <show_in_default>1</show_in_default>
    <show_in_website>1</show_in_website>
    <show_in_store>1</show_in_store>            
                <groups>
                  <mage translate="label"> 
                  <label>MasterSoftwareSolutions</label>

                  <frontend_type>text</frontend_type>
                  <sort_order>0</sort_order>
                  <show_in_default>1</show_in_default>
                  <show_in_website>1</show_in_website>
                  <show_in_store>1</show_in_store>
                   <fields>
                      <heading_example translate="label">
                        <label>Enable the Module and Set the Home page for Login User</label>
                        <frontend_model>adminhtml/system_config_form_field_heading</frontend_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>
                    </heading_example>
                       <enable translate="label">
                        <label>Enable</label>  <comment><model>homepage/adminhtml_comment</model></comment> 
               <frontend_type>select</frontend_type>
               <source_model>adminhtml/system_config_source_yesno</source_model> 
                        <sort_order>4</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                      </enable>
                       <page translate="label">
                        <label>Select page for login user</label>
           <frontend_type>select</frontend_type>
           <source_model>adminhtml/system_config_source_cms_page</source_model> 
                        <sort_order>12</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                      </page >
                   </fields>
                   </mage>
                </groups>
    </mage>
  </sections>
 </config>

& adminhtml.xml file :

 <?xml version="1.0"?>
  <config>
    <acl>
        <resources>
            <all>
                <title>Allow Everything</title>
            </all>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <mage translate="title" module="homepage">
                                        <title>Mss Section</title>
                                        <sort_order>0</sort_order>
                                    </mage>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>
</config>

I have also created this in my model folder as Data.php :

class Mage_Homepage_Helper_Data extends Mage_Core_Helper_Abstract
{

}

Also created observer.php in helper.Still my custom options are not visible in admin panel.

1
  • All tab sections are not showing are any particular update your Model config file also
    – Magento 2
    Nov 29, 2016 at 11:00

1 Answer 1

0

I resolved this issue by replacing this line in system.xml :

<tab>Custom Tabsd</tab>

with

<tab>mage</tab>

Also , in config.xml,

<model>mage_homepage/observer</model>

with

<model>homepage/observer</model>

& it worked .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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