0

When we receive an order containing an out of stock item (that's allowed to be backordered) it nicely shows "Backordered" at 'Item status' in the backend sales order view.

Backorder

magento item status = backordered if the invoice is not yet created! When the invoice is created, the item status automatically changes to invoiced, see image.

magento item status = invoiced, even though still in backorder. This seems not logical to me and is definitely unwanted behavior. Even after the invoice has been created, I'd still like/need to know what products are in backorder.

Invoiced

Any idea how we can keep the message "backordered" on the order view?

0

You can use event sales_order_save_after, and inside the Observer put logic something like:

$oldstatus=$order->getOrigData('status');
$newstatus=$order->getData('status');

if($oldstatus == 'backordered' && $oldstatus != $newstatus) { //this checks if order was backordered and if the status is changed, it'll entered inside condition
    $order->setStatus($oldstatus); //sets back the status to old status 'backordered'
}
1
  • Any chance you can dumb it down for me and show which file to edit etc. Would be muchly appreciated. @natha
    – Shaun
    Apr 6 '21 at 4:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.