How to add a custom text field in Magento v1.5 Catalog/Mange products/General tab in admin panel?

How to add a custom text field in Magento v1.5 Catalog/Mange products/General tab in admin panel?

September 1, 2026 · Illustrated author avatarBy Stefan Bogdanescu
How to add a custom text field in Magento v1.5 Catalog/Mange products/General tab in admin panel?

Adding a Custom Text Field to the Magento v1.5 Admin Panel: A Comprehensive Guide

Are you looking to enhance your Magento v1.5 store’s functionality by adding a custom text field in the Catalog > Manage Products > General tab? You’ve come to the right place. In this guide, we’ll walk through the process step-by-step from a developer’s perspective.

Understanding the Magento Admin Panel Architecture

Before diving into the code, it’s essential to understand how the Magento admin panel is structured. The General tab of the catalog management page is controlled by the Mage_Adminhtml_Catalog_Product_EditController class and its associated templates.

The main template responsible for rendering this section is located at /app/design/adminhtml/default/default/template/catalog/product/edit/info.phtml. This file contains HTML markup that defines the structure of the General tab, including all input fields like product name, stock status, etc.

Creating a New Attribute

To add a custom text field to the admin panel, we first need to create an attribute in the database. The Magento system uses attributes to store and manage various details about products.

  1. Open your terminal or command line.
  2. Navigate to your Magento project root directory.
  3. Run this command to create a new text attribute:
    php shell/attribute.php --add-attribute --name="custom_text_field" --group="General Information"
    

This command creates an entry in the eav_attribute table with the specified name and group.

Modifying the Adminhtml Form

Next, we need to modify the adminhtml form to include our new attribute. Open the file /app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php.

Find the _prepareForm() method around line 237. Add your custom field to the $fieldset->addFieldSet() call like this:

$fieldset->addFieldSet(
    'general_section',
    array(
        ...
        'custom_text_field' => array(
            'label'     => Mage::helper('catalog')->__('Custom Text Field'),
            'input'     => 'text',
            'type'      => 'text',
            'required'  => false,
            'note'      => Mage::helper('catalog')->__('Enter a custom text field value.')
        ),
    ...
));

This code adds an input field to the General section of the edit form with the label “Custom Text Field”.

Updating the Product Edit Form

Now, let’s modify the product edit form template to display our new field. Open /app/design/adminhtml/default/default/template/catalog/product/edit.phtml.

Find the <div class="fieldset general-fieldset"> section where all the general fields are defined.

Add this line right after the opening div tag:

<div class="field">
    <label for="custom_text_field" class="required"><em>*</em>Custom Text Field:</label>
    <div class="input-box">
        <?php echo $this->getFieldHtml('custom_text_field') ?>
    </div>
</div>

This code adds a new field to the General tab with the label “Custom Text Field”.

Conclusion

Following these steps, you should now see your custom text field appear in the Magento v1.5 admin panel under Catalog > Manage Products > General for all products.

Remember, when working with Magento core files, it’s always best practice to use a child theme or module to avoid conflicts during updates. This guide assumes you’re working directly on core files to demonstrate the process clearly.

If you want to learn more about Magento development and how to create your own modules, check out our comprehensive Magento Development Guide at LaravelCompany for in-depth tutorials and best practices.

Catalog Database Themes Admin

Our network