2013-05-03 74 views
0

Magento目前有以下标准“数量”字段;每个订单行(例如):Magento新的自定义订单行“数量”字段

[qty_canceled] => 0.0000 
[qty_invoiced] => 1.0000 
[qty_ordered] => 1.0000 
[qty_refunded] => 0.0000 
[qty_shipped] => 1.0000 

在顺序视图,你可以看到它是这样的:

enter image description here 我希望做的是添加一个名为一个新的自定义字段qty_allocated

这个新领域将与第三方集成一起用于自动化订单处理,我不想使用官方数量字段。

有谁知道这是可能的吗?如果是这样,我该如何去实现这一目标? 我需要能够在Magento上显示/更新此字段。

在此先感谢您提供任何提示/指南。

+0

那相当一个加载的问题。为此添加一个新字段很简单,但创建后端等可能有点多,作为答案! – Andrew 2013-05-03 11:39:37

+0

我可以照顾后端。你能给我一些关于如何创建该领域的提示吗?这是我的出发点。 – Latheesan 2013-05-03 12:42:30

+0

您是否需要归属于产品或订单项目本身? – Andrew 2013-05-03 12:56:39

回答

0

一例订单项目创建attrtibute:

$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(); 
+0

谢谢。非常感激。 – Latheesan 2013-05-07 08:23:04

相关问题