How would I add a custom field to the order grid?
I have the following code by looking at other questions but after I have ran the code the new field is not showing up.
require_once('app/Mage.php');
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
$installer = new Mage_Sales_Model_Mysql4_Setup;
$attribute = array(
'type' => 'int',
'input' => 'select',
'label' => 'Exported',
'sort_order' => 1000,
'required' => false,
'visible_on_front' => '0',
'filterable' => true,
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'backend' => 'eav/entity_attribute_backend_array',
'option' => array (
'values' => array(
0 => 'No',
1 => 'Yes',
)
)
);
$installer->addAttribute('order', 'Exported', $attribute);
$installer->addAttribute('quote', 'Exported', $attribute);
$installer->endSetup();