Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何获取客户处理订单状态的计数?
像 Mage::getModel('checkout/cart')->getQuote()->getItemsCount()。
请告诉我。
谢谢你。
这是一个类似的问题,它使用您所追求的“状态”字段加载订单集合:
在 Magento 中获取状态 = 'Complete' 的订单 ID
仅获取处于处理状态的订单数…
$processingOrdersCount = Mage::getModel('sales/order')->getCollection() ->addFilter('status', Mage_Sales_Model_Order::STATE_PROCESSING) ->getSize() ;