我正在尝试合并两个由相同字段过滤但具有不同字段值的集合。但问题是当我访问结果合并集合时,其抛出错误如 getMethod无法调用非对象magento 。给我任何解决方案让它工作。 这是mycode
$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());
echo $order->getData('increment_id');
答案 0 :(得分:1)
$orderCollection = Mage::getModel('sales/order')->getCollection()
->addFieldToFilter('status',array('in'=>array('delivered_carrier','processing')));
echo "<pre>";print_r($orderCollection->getColumnValues('increment_id'));die();