Assign Order Status From One Particular Payment Method

I have an offline payment method (let's say id=11).

I want that the orders that use this payment method goes on status order "H" when order has been processed.

I use offline processor and I can use fax template for example.

Is there any simple solution to do that ? It should be possible to assign either : payment method id=11 to status "H".or template="fax" to status ="H", but i cannot find how...

PS: I cannot convert all offline processor to that order status has I use different offline payment method.

app/functions/fn.cart.php

replace

            if (!$is_processor_script && $order_status == STATUS_INCOMPLETED_ORDER) {
                $order_status = 'O';
            }

with

            if (!$is_processor_script && $order_status == STATUS_INCOMPLETED_ORDER) {
                if ($cart['payment_id'] == 11) {
                    $order_status = 'H';
                } else {
                    $order_status = 'O';
                }
            }

(!) Not tested

Unfortunately this function does not contain hooks which can be used for this modificaiton

Strongly suggest you use the change_order_status hook instead of modifying the distributed core files for this. That's what the hooks are for.

Thanks. It works.

Thanks. It works.

You are welcome!

I also recommend you to avoid modifying core file. Most probably you will lose these changes with next upgrade. Take a look at this doc: http://docs.cs-cart.com/4.4.x/developer_guide/getting_started/guidelines.html

I totally agree with you, guys. We do everything possible to avoid core changes in our modifications or addons. But as a fast solution, it will work. If anybody have time to provide with the fill addon code here, you are welcome!