Edit: I'm sorry! I missed Commerce 1 in the title! This answer only applies to Commerce 2.
Take a look at the defaultOrderStatus
event!
The description is a bit misleading—it's actually used to do exactly what you've described: alter the "default" completed order status in situations where it might not be desirable.
From the docs:
use craft\commerce\Plugin as Commerce;
use craft\commerce\events\DefaultOrderStatusEvent;
use craft\commerce\services\OrderStatuses;
use yii\base\Event;
Event::on(
OrderStatuses::class,
OrderStatuses::EVENT_DEFAULT_ORDER_STATUS,
function (DefaultOrderStatusEvent $e) {
$myOverriddenOrderStatus = Commerce::getInstance()->getOrderStatuses()->getOrderStatusByHandle('myCustomStatusHandle');
$lineItems = $e->order->getLineItems();
foreach ($lineItems as $lineItem) {
// Your logic for checking the ProductType would
// replace this basic test:
if ($lineItem->price > 500) {
$e->orderStatus = $myOverriddenOrderStatus;
}
}
// Whatever `$e->orderStatus` ends up being by the time we exit
// this event listener will be used as the new `OrderStatus`.
});