Reputation: 24116
Magento currently has the following standard "qty" fields; for each order lines (for example):
[qty_canceled] => 0.0000
[qty_invoiced] => 1.0000
[qty_ordered] => 1.0000
[qty_refunded] => 0.0000
[qty_shipped] => 1.0000
On the order view, you can see it like this:
What I'd like to do is add a new custom field called qty_allocated
This new field is going to be used with a 3rd party integration for automated order processing and I don't want to use the official qty fields.
Does anyone know if this is possible? If so, how can I go about achieving this? I need to be able to display/update this field also on Magento.
Thanks in advance for any tips/guides.
Upvotes: 0
Views: 320
Reputation: 12809
An Example creating an attrtibute for an order item:
$installer = new Mage_Sales_Model_Resource_Setup('core_setup');
$installer ->addAttribute('order_item', 'qty_allocated', array(
'label' => 'QTY Allocated',
'type' => 'varchar',
'input' => 'text',
'visible' => true,
'required' => false,
'position' => 10,
));
//$installer->endSetup();
Upvotes: 0