How to get time field on product form I have attached screenshot what i want to do.
any help would be much appreciated.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
You can add one simple text attribute where you can enter the desired value.
If you need later to filter products based on start hour or end hour you can do as @FabianBlechschmidt suggests, and add 2 fields, one for start hour and one for end hour.
You can even go further and add 4 fields, 1 for starting hour, 1 for time of the day (AM or PM) then do the same and add 2 fields for closing hour.
$installer->startSetup(); $installer->getConnection()->addAttribute( 'catalog_product', 'register_time', array( 'input' => 'time', 'type' => 'time', 'backend' => 'customer/entity_attribute_backend_datetime', 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL, 'required' => 1, 'sort_order' => 51, 'label' => 'Register Time', 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL, 'required' => 1, 'comparable' => '0', 'searchable' => '0', 'visible_on_front' => 0, 'visible_in_advanced_search' => 0, 'is_html_allowed_on_front' => 0, 'unique' => false, 'note' => 'Time format is Hrs:Mins:Secs', 'apply_to' => '', 'is_configurable' => false ) ); $installer->endSetup();