This is my collection code:
$collection = Mage::getResourceModel('sales/order_collection') ->join(array('a' => 'sales/order_address'), 'main_table.entity_id = a.parent_id AND a.address_type != \'billing\'', array( 'city' => 'city', 'country_id' => 'country_id' )) ->join(array('c' => 'customer/customer_group'), 'main_table.customer_group_id = c.customer_group_id', array( 'customer_group_code' => 'customer_group_code' )) ->addExpressionFieldToSelect( 'mail', 'customer_email', array('customer_mail' => 'main_table.customer_email')) ->addFieldToFilter('status', array('in' => array( Mage_Sales_Model_Order::STATE_HOLDED )));
It gets all orders that are in state
ON HOLD. Now I want to exclude those orders that are not in state
ON HOLD X days later. The identification should be the mail address which is included in the collection already.
So, whenever a customers still wasnt able to order X days later, the order should be in that collection. How would I do that?