Jump to content

How to set default order status


jamess

Recommended Posts

When an order is placed on our site, the status is set to "On backorder (paid)." We would like it all orders to be set to "Processing in progress" by default, but I cannot find this setting anywhere in the admin.

Any ideas or advice as how to set this?

Thank you,

James

Link to comment
Share on other sites

Hi, Order's Status depend your payment method.

you can open controller: payment_module\controllers\front\validation.php

find function: $this->module->validateOrder

2nd params is id_order_status

validateOrder($id_cart, $id_order_state... in file classes\PaymentModule.php

change it to ID of order status:  "Processing in progress" 

Link to comment
Share on other sites

Thanks for your reply. The payment module doesn't exactly look like that. I'm thinking _PS_OS_PAYMENT_ is the id_order_status?

                        // create order in PS Db with the paid amount returned by gateway
                        $this->module->validateOrder(
                            (int)$cart->id,
                            _PS_OS_PAYMENT_,
                            (float)$paid_amount,
                            $this->module->displayName,
                            null,
                            array(),
                            null,
                            false,
                            $customer->secure_key
                        );

 

Link to comment
Share on other sites

_PS_OS_PAYMENT_  is typically order status 2 (aka payment accepted).  You can change that to the ID for the order status you would like to use, however if Prestashop detects that your product is out of stock, then Prestashop core will change the order status to "on backorder"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...