0

I am going through the RMA process, I have placed 4 orders now with different products, and each time I try to create an RMA, I get the following error message

There are no applicable items for return in this order

Any ideas on what I am doing wrong?

1
  • You are talking about the enterprise edition? Or a module? Did ou ship your items? Commented Mar 15, 2013 at 5:38

1 Answer 1

4

The exception is thrown in Enterprise_Rma_Adminhtml_RmaController::newAction() if this piece of code returns false.

Mage::helper('enterprise_rma')->canCreateRma($orderId, true)

Digging further in Enterprise_Rma_Helper_Data::canCreateRma() this returns false if $this->getOrderItems($order) returns no items or if ($forceCreate || $this->isEnabled()) returns false. The second case can be excluded because $forceCreate is true (is the second parameter sent to the method canCreateRma()).

This means that $this->getOrderItems($order) returns no items. This is equivalent to

Mage::getResourceModel('enterprise_rma/item')->getOrderItems($orderId)

returning no items.

This can mean that Enterprise_Rma_Model_Resource_Item::getOrderItemsCollection() returns no items. this happens when there are no items in the order with 'qty_shipped > qty_returned'.

If this is not the case and Enterprise_Rma_Model_Resource_Item::getOrderItems() still returns no items maybe your products are not marked as returnable. See this piece of code in the same method:

if (!Mage::helper('enterprise_rma')->canReturnProduct($product, $item->getStoreId())) {
    $allowed = false;
}

Check the value of the 'Enable RMA' attribute for your products. If it's 'No' set it to 'Yes' or 'Use config'.

If it's set to 'Use config' then check the value of this field in System->Configuration->Sales->RMA Settings->Enable RMA on Product Level. This should be 'Yes' (if you want all the products available for RMA).

Let me know if this helps in a way. I hope I was clear in the explanations.

1
  • I Have debug same code in magento2. But when product is out of stock i cant able to return it. but if product is instock it works. Have any idea? Commented Apr 21, 2020 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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