小编use*_*042的帖子

在几个产品的订单中获得数量的产品

您好我想知道如何在几个产品的订单中获得特定产品的qty_ordered.

我试过这些

     $orders = Mage::getModel('sales/order')->getCollection()->
        addAttributeToSelect('shipping_description')->
        addAttributeToSelect('increment_id')->
        addAttributeToSelect('base_grand_total')->
        addAttributeToSelect('total_qty_ordered')->
        addAttributeToSelect('shipping_address_id')->
        addAttributeToSelect('billing_address_id')->
        addAttributeToSelect('created_at')->
        addAttributeToSelect('shipping_incl_tax')->
        addAttributeToFilter('status', 'pending');
Run Code Online (Sandbox Code Playgroud)

但addAttributeToSelect('total_qty_ordered') - >总共?哪个产品?

magento

1
推荐指数
1
解决办法
7871
查看次数

标签 统计

magento ×1