Magento Ordered Item Status is MIXED – How to Resolve

magento-1magento-enterpriseorder-statussales

All of Magento order is showing Mixed status in backend. Although the ordered items are shipped, As you can see in the below screenshot.

enter image description here

***What does the 'MIXED' word means here ?***

I found this line of code in Core magento file.

Line 197: app/code/core/Mage/Sales/Model/Order/Item.php

const STATUS_PENDING        = 1; // No items shipped, invoiced, canceled, refunded nor backordered
const STATUS_SHIPPED        = 2; // When qty ordered - [qty canceled + qty returned] = qty shipped
const STATUS_INVOICED       = 9; // When qty ordered - [qty canceled + qty returned] = qty invoiced
const STATUS_BACKORDERED    = 3; // When qty ordered - [qty canceled + qty returned] = qty backordered
const STATUS_CANCELED       = 5; // When qty ordered = qty canceled
const STATUS_PARTIAL        = 6; // If [qty shipped or(max of two) qty invoiced + qty canceled + qty returned]
                                 // < qty ordered
const STATUS_MIXED          = 7; // All other combinations
const STATUS_REFUNDED       = 8; // When qty ordered = qty refunded

const STATUS_RETURNED       = 4; // When qty ordered = qty returned // not used at the moment

I am not able to understand what i need to check. Can anyone help me in it please ?

Best Answer

I reckon it's because you have not invoiced yet.

Basically, the code that handles those item status looks like this:

if (!$invoiced && !$shipped && !$refunded && !$canceled && !$backordered) {
    return self::STATUS_PENDING;
}
if ($shipped && $invoiced && ($actuallyOrdered == $shipped)) {
    return self::STATUS_SHIPPED;
}

if ($invoiced && !$shipped && ($actuallyOrdered == $invoiced)) {
    return self::STATUS_INVOICED;
}

if ($backordered && ($actuallyOrdered == $backordered) ) {
    return self::STATUS_BACKORDERED;
}

if ($refunded && $ordered == $refunded) {
    return self::STATUS_REFUNDED;
}

if ($canceled && $ordered == $canceled) {
    return self::STATUS_CANCELED;
}

if (max($shipped, $invoiced) < $actuallyOrdered) {
    return self::STATUS_PARTIAL;
}

return self::STATUS_MIXED;

As you haven't invoiced yet, it returns mixed as Magento assumes that an order is invoiced before being shipped.

Related Topic