Add option to Magento system admin

Geoffrey

I would like to add a textbox to the Header block located inside System>Config>Design>Header, the location in the image below.

location of input box

I know this has to be done in xml, but I am not sure where. Also how would I display that in an phtml file?

Rabea

In code/core/Mage/Page/etc/system.xml you will find the configuration that Magento reads to show those fields, for example the "Small Logo Image src" is a field called logo_src_small. The needed is a module that will tell Magento about:

  1. The extra field in the admin panel under header.

    <config>
        <sections>
            <design>
                <groups>
                <header>
                <fields>
                <new_field translate="label">
                  <label>New Field</label>
                  <frontend_type>text</frontend_type>
                  <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>
                </new_field>
                </fields>
                </header>
                </groups>
            </design>
        </section>
    </config>
    
  2. Rewrite the block class code/core/Mage/Page/Block/Html/Header.php so you can add the method that will expose the new field.

  3. In the app/design/frontend/{Package}/{Theme}/template/page/html/header.phtml you can easily call $this->getNewField() where getNewField() is the method you have in the class we overridden in point 2.

A couple of links to help you start:

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Magento 404 on Admin Page

From Dev

How to add WYSIWYG Editor in Magento system configuration?

From Dev

add_options_page not adding option to admin page

From Dev

In magento admin how to create a custom field in add products page

From Dev

How to add filter form to magento admin grid?

From Dev

magento admin assert issue

From Dev

Magento error when I try to add special price from admin

From Dev

magento change add to cart to buy now from admin panel

From Dev

Magento admin bug

From Dev

magento admin - customize add new customer form

From Dev

Show Value in Admin in Magento

From Dev

Magento: add to admin menu

From Dev

magento 1.9.2.2 add to cart with custom option image not working

From Dev

Magento Admin Plugin

From Dev

Magento Add Payment Method to Admin Order Grid

From Dev

How to add WYSIWYG Editor in Magento system configuration?

From Dev

magento how add dynamic url path in system.xml

From Dev

No magento admin section

From Dev

Magento How to Add template path hint for admin/back-end

From Dev

Magento - Remove add new address option for customers

From Dev

Add 'Open Powershell here as admin' option to folder context menu

From Dev

magento admin - customize add new customer form

From Dev

Magento: Disabled admin configuration option

From Dev

Add Layout Identifier in Magento Admin-Panel

From Dev

Magento Admin: Limit Characters in Grid via Add Column

From Dev

Add input field in Magento Admin Panel

From Dev

Magento admin grid was not displaying only header title and add button are present

From Dev

How to add some content in menu item admin panel Magento

From Dev

System allow to add single address multiple times in magento

Related Related

HotTag

Archive