How to Create One Text Box at Admin Panel in Magento 1.9

magento-1.9product

How To Create One Text Box At Admin Panel, And
If Text Box Has Enter Some Value That Display At Front End in All Products.

Best Answer

You need to create a VERY small extension for this. Create a files (3 files only) with code shown below :

/app/code/local/Company/Customtext/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Company_Customtext>
            <version>1.0.0</version>
        </Company_Customtext>
    </modules>
</config>

/app/code/local/Company/Customtext/etc/system.xml

<?xml version="1.0"?>
<config>
    <sections>
        <general>
            <groups>
                <customtxt_group>
                    <label>Custom Text Box</label>
                    <frontend_type>text</frontend_type>
                    <sort_order>1000</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <fields>
                        <custom_text_box>
                            <label>Textbox Label</label>
                            <frontend_type>textarea</frontend_type>
                            <sort_order>10</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </custom_text_box>
                    </fields>
                </customtxt_group>
            </groups>
        </general>
    </sections>
</config>

/app/etc/modules/Company_Customtext.xml

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

Now Clear cache. You can see a Textbox at System > Configuration > General

enter image description here

You can access the value of this text box by :

<?php echo Mage::getStoreConfig("general/customtxt_group/custom_text_box"); ?>