Zend framework2 产品网格magento 1.9.2上的订购数量

Zend framework2 产品网格magento 1.9.2上的订购数量,zend-framework2,left-join,magento-1.9,Zend Framework2,Left Join,Magento 1.9,我创建了一个脚本来显示从表sales\u flat\u order\u项目订购的数量。 但现在我只想要订单处于挂起处理状态时订购的数量 但是我不知道我怎么能做到。 我在网上搜索,但没有结果 我为此创建了一个LeftJoin $totalOrderedQuery = Mage::getSingleton('core/resource')->getConnection('core_read') ->select() ->from('sales_flat

我创建了一个脚本来显示从表sales\u flat\u order\u项目订购的数量。 但现在我只想要订单处于挂起处理状态时订购的数量

但是我不知道我怎么能做到。 我在网上搜索,但没有结果

我为此创建了一个LeftJoin

$totalOrderedQuery = Mage::getSingleton('core/resource')->getConnection('core_read') ->select() ->from('sales_flat_order_item', array('product_id', 'qty_ordered' => 'SUM(`qty_ordered`)')) ->group('product_id'); $collection->joinField('qty_ordered', $totalOrderedQuery, 'qty_ordered', 'product_id=entity_id', null, 'left'); $totalOrderedQuery=Mage::getSingleton('core/resource')->getConnection('core\u read')) ->选择() ->from('sales\u flat\u order\u item',array('product\u id','qty\u ordered'=>'总和('qty\u ordered`))) ->集团(“产品标识”); $collection->joinField($totalOrderedQuery,$totalOrderedQuery,'qty\u ordered','product\u id=entity\u id',null,'left'); 我带着

$this->addColumn('qty_ordered', array( 'header'=> Mage::helper('catalog')->__('test'), 'width' => '70px', 'type' => 'number', 'index' => "qty_ordered" )); $this->addColumn('订购数量', 排列( 'header'=>Mage::helper('catalog')->, “宽度”=>“70px”, '类型'=>'编号', “索引”=>“订购数量” )); 它在网格中

谁能帮帮我吗。 多谢各位