Sean
Sean

Reputation: 963

How to create a new tab in products in Magento admin panel

I just started to work with Magento. Cool thing. But I think I jumped in the middle of it so fast. However, I've been asked to create a new tab called Promotions when adding a Product. It will then have an option field (named "Is Featured") and it has values of "Yes" or "No" in form of a dropdown. I am familiar with the structure of Magento, but I can't find where I can do the changes.

I'm using Magento 1.9.2.3 Full release. I made an image for you guys to understand what I want better.

What should I do?!

enter image description here

Upvotes: 0

Views: 365

Answers (2)

Mageworx
Mageworx

Reputation: 922

In the installer of any of your suitable extension, add an attribute to the product with a new group, and they will be displayed there.

$installer = $this;
$installer->startSetup();

$installer->addAttribute('catalog_product', 'is_featured',
    array(
        'group'            => 'Promotions',
        'type'             => 'int',
        'backend'          => '',
        'frontend'         => '',
        'label'            => 'Is Featured',
        'input'            => 'select',
        'class'            => '',
        'source'           => 'eav/entity_attribute_source_boolean',
        'global'           => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
        'visible'          => true,
        'required'         => false,
        'user_defined'     => false,
        'default'          => '',
        'searchable'       => false,
        'filterable'       => false,
        'comparable'       => false,
        'visible_on_front' => false,
        'unique'           => false,
        'sort_order'       => 60
    ));

$installer->endSetup();

It will look like that: https://gyazo.com/9a0e423d0c3e78e7c440b5cd79a3e547

Tweak attribute settings according to your requirements.

Upvotes: 1

Woxxy
Woxxy

Reputation: 1298

You will have to first create the attribute:

  • open Catalog > Attributes > Manage Attributes
  • click on Add New Attribute
  • create a new boolean attribute (chose Yes/No in "Catalog Input Type for Store Owner") and fill the other fields

Then add the attribute to the Promotions group:

  • open Catalog > Attributes > Manage Attribute Sets
  • chose the attribute set you are going to use for this product
  • add a new "Group" to the column on the left with the Add New button (in this case, name it "Promotions")
  • drag and drop the newly created group to the position you'd like it to be
  • drag and drop the newly created attribute from the right column to the left one, under the Promotions group

Upvotes: 1

Related Questions