Reputation: 963
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?!
Upvotes: 0
Views: 365
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
Reputation: 1298
You will have to first create the attribute:
Then add the attribute to the Promotions group:
Upvotes: 1