Reputation: 686
i'm trying to merge two collections which are filtered by same field but with different field value.But the problem is while i'm accessing to resulted merge collection its throwing error like getMethod can't call on non object magento.Give me any solution to get it work. Here is 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');
Upvotes: 0
Views: 856
Reputation: 2443
$orderCollection = Mage::getModel('sales/order')->getCollection()
->addFieldToFilter('status',array('in'=>array('delivered_carrier','processing')));
echo "<pre>";print_r($orderCollection->getColumnValues('increment_id'));die();
Upvotes: 1