【发布时间】:2014-01-29 01:10:41
【问题描述】:
您好,我想为同一字段获取具有多个字段值的订单集合。我已经尝试使用 addFieldToFilter 获取单个字段值的集合('status':pening & 'status':processing),并且我合并了两个集合到单个集合。现在我遇到了问题,比如我无法访问结果集合,它的低谷错误,如 getMethod 无法调用非对象。给我任何建议。
这是我的代码:
$shippedCollection = array();
$processingCollection = array();
$orderSCollection = Mage::getModel('sales/order')->getCollection();
$shippedCollection = $orderSCollection->addFieldToFilter('status','delivered_carrier');
$orderPCollection = Mage::getModel('sales/order')->getCollection();
$processingCollection = $orderPCollection->addFieldToFilter('status','processing');
$order = array_merge($shippedCollection->getAllIds(),$processingCollection->getAllIds());
$order->getData('increment_id');
【问题讨论】:
标签: php magento collections