Jump to content

How to disable order status for all payment modules 1.7


WEBDVL

Recommended Posts

Create override PaymentModule.php or edit ./classes/PaymentModule.php

change lines 551, 559:

// Switch to back order if needed
                    if (Configuration::get('PS_STOCK_MANAGEMENT') &&
                            ($order_detail->getStockState() ||
                            $order_detail->product_quantity_in_stock < 0)) {
                        $history = new OrderHistory();
                        $history->id_order = (int) $order->id;
                        $history->changeIdOrderState(Configuration::get($order->hasBeenPaid() ? 'PS_OS_OUTOFSTOCK_PAID' : 'PS_OS_OUTOFSTOCK_UNPAID'), $order, true);
                        $history->addWithemail();
                    }

to

 

// Switch to back order if needed
/*                    if (Configuration::get('PS_STOCK_MANAGEMENT') &&
                            ($order_detail->getStockState() ||
                            $order_detail->product_quantity_in_stock < 0)) {
                        $history = new OrderHistory();
                        $history->id_order = (int) $order->id;
                        $history->changeIdOrderState(Configuration::get($order->hasBeenPaid() ? 'PS_OS_OUTOFSTOCK_PAID' : 'PS_OS_OUTOFSTOCK_UNPAID'), $order, true);
                        $history->addWithemail();
                    } */

 

Link to comment
Share on other sites

7 minutes ago, Guest said:

Create override PaymentModule.php or edit ./classes/PaymentModule.php

change lines 551, 559

 

Thank you. Is there another configuration to disable it? This configuration affects the payment gateway module STRIPE, which displays the error.
Is it possible to change the settings directly in the ps_cashondelivery module?

Link to comment
Share on other sites

2 minutes ago, WEBDVL said:

 

Thank you. Is there another configuration to disable it? This configuration affects the payment gateway module STRIPE, which displays the error.
Is it possible to change the settings directly in the ps_cashondelivery module?

I don't have the ps_cashondelivery module.
I can't advise.

Link to comment
Share on other sites

Check if there is ./override/classes/PaymentModule.php
It is possible that the payment gateway module STRIPE has already overwritten it.

Link to comment
Share on other sites

Quote

payment gateway module STRIPE, which displays the error

What's the error?
Realize that what you see, I don't see.
I have no error message or log file from ./var/logs / .....
Then how can a person help you without all the information?
It just can't.

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...