I want to add custom frontend_input
for “Catalog Input Type for Store Owner” at the creation of an product attribute.
Like at present magento is providing Text Field,Text Area,Date,Yes/No,Multiple Select,Dropdown,Price,Media Image
.
In this list I want to add new attribute like : multiselect_calender
.
So it is possible to add new option ? How ?
Just check screen shot for better idea about my query
Best Answer
Reference
class Mage_Catalog_Model_Product_Attribute_Source_Inputtype extends Mage_Eav_Model_Adminhtml_System_Config_Source_Inputtype
, to addmultiselect_calender
as a dropdown option, you can add an observer to the eventadminhtml_product_attribute_types
. Then, you need to listen to the eventcatalog_entity_attribute_save_before
to insert yourbackend_model
.As an example from
Mage_Weee_Model_Observer
:You also need to add this in your
config.xml
:For the validator, see
Mage_Adminhtml_Catalog_Product_AttributeController::saveAction()
andMage_Eav_Model_Adminhtml_System_Config_Source_Inputtype_Validator