Jump to content

Recommended Posts

When someone creates the order and the product is out of stock, the status automatically switches to "On Backorder". Is there any way to turn this off?

 

We have a couple of internal statuses that we use inside the company and when we create the order in the backoffice, it just changes our custom status to "On Backorder". Can we disable this feature?

 

Thanks

Link to comment
Share on other sites

No, no... 

 

So, for example we have a product which is out of stock, but we still want to offer it. If a customer places the order, he'll get backorder email, the order status will be set to "On Backorder" and that's fine.

 

But for example, if we want to create an order in the backoffice with the product which is not in the stock then we want to use our internal order statuses (i.e. "Deliver from store #3").

 

5MsttxX.png?1

 

Once we click on "Create the order" button, the platform automatically updates the status to "On Backorder" which we don't want to have.

 

icRvNMz.png?1It seems like an easy fix but I can't find the function which does that.

Link to comment
Share on other sites

I found the solution

 

In classes/PaymentModule.php just remove this if statement

if (Configuration::get('PS_STOCK_MANAGEMENT') && $order_detail->getStockState())
					{
						$history = new OrderHistory();
						$history->id_order = (int)$order->id;
						$history->changeIdOrderState(Configuration::get('PS_OS_OUTOFSTOCK'), $order, true);
						$history->addWithemail();
					} 
  • Like 2
Link to comment
Share on other sites

×
×
  • Create New...