i'm trying to add some custom attributes to the checkout(sales) page of magento 1.5.1.0 for orders created from the backend (administrator) panel. I tried this code and i can see my new attribute in the eav_attribute table, but i can't see my new attribute when i make an order from the backend. What am i missing..?
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$setup->addAttribute('5', 'testattr', array(
'label' => 'testlabel',
'type' => 'varchar',
'input' => 'text',
'visible' => true,
'required' => false,
'position' => 5,
));
$eavConfig = Mage::getSingleton('eav/config');
$attribute = $eavConfig->getAttribute('5', 'testattr');
$attribute->setData('used_in_forms', array('checkout_register', 'adminhtml_checkout'));
$attribute->save();
Thanks..