您好我想知道如何在几个产品的订单中获得特定产品的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