5

We have allowed an offline payment method on our store, where the customer pays for the item once its been shipped and reaches them.

The test case scenario that I am facing issues with is as follows:

  1. Customer orders for 3 items with 1 quantity each.

  2. When we process this order for shipping, we find that the 1st item can be shipped right away, the 2nd item has to be cancelled as per the customer's request and the 3rd item might take a week to procure.

  3. With Magento, I've noticed that if we're sure that the last two items are not going to be shipped, we can invoice and ship only the 1st item and when we click on the 'Cancel Order' button, it cancels the non invoiced items. But in this case, the 2nd item should be cancelled right now while the 3rd item will be shipped only after a week.

Is there a way to cancel the 2nd item without cancelling the order?

2

All you need to do is, invoice and ship only the item that the customer needs. Once that is done, you need to cancel the order. It will turn the order status to complete and mentioning the other items are cancelled. Please check the attached

enter image description here

  • Hi Amjath, I have a third item which need not be cancelled but the date of shipment may be 2 or 3 weeks in the future. In this situation, since the third item is invoiced, the Cancel option will not be present unless it's been shipped. I solved this by creating a separate invoice for each item in the order and delete the invoice for items that have to clearly be cancelled. – NJT Nov 2 '15 at 8:27
  • This works perfectly for me. If items are going to be cancelled, just finish part shipping it and invoicing it, then cancel the balance at the end, I notify customers or have correspondence of items that will be cancelled so them staying on the order until last is no problem at all. – Jaimie Dijstra Oct 17 at 6:48
1

One thing can be done! You can EDIT the order after the first order_item is invoiced & shipped. in ACTION drop-down, select remove for the desired item and then Submit the order.

It will create another order with that left-out item which will be shipped later. And the original order will be stated as complete, which will definitely help you to track the orders properly, rather than cancelling them.

  • Hi Rahul, I was looking at a method where I wouldn't have to create a new order. Is that possible? – NJT May 14 '15 at 7:24
  • @NJT It's going to depend on your selected payment method if you have the ability to capture only a partial order or refund a partial order. – Eirik Dec 14 '15 at 19:30
0

Go this. Check this script I use to 'Rollback' the invoice. Had to write it as I had some issue with 'Auto Invoicing' at first. I put echo in to make sure it always parses properly. Put this in the root and call the file. http://example.com/file.php Take not under echo 4 as that is the status. This will not 'cancel', but you can add what you ened on status here.

<?php
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
include 'app/Mage.php';
Mage::app();
Mage::register('isSecureArea', 1);

$incrementId = 300000343;

echo '1';

$order = Mage::getModel('sales/order')->loadByIncrementId($incrementId);
$invoice = $order->getInvoiceCollection();
$items = $order->getItemsCollection();

echo '2';


foreach ($invoices as $invoice){
$invoice->delete();
}

echo '3';



$order->setActionFlag(Mage_Sales_Model_Order::ACTION_FLAG_CANCEL, false);
    $order->setActionFlag(Mage_Sales_Model_Order::ACTION_FLAG_HOLD, false);
    $order->setActionFlag(Mage_Sales_Model_Order::ACTION_FLAG_UNHOLD, false);
    $order->setActionFlag(Mage_Sales_Model_Order::ACTION_FLAG_EDIT, false);
    $order->setActionFlag(Mage_Sales_Model_Order::ACTION_FLAG_CREDITMEMO, false);
    $order->setActionFlag(Mage_Sales_Model_Order::ACTION_FLAG_INVOICE, false);
    $order->setActionFlag(Mage_Sales_Model_Order::ACTION_FLAG_REORDER, false);
    $order->setActionFlag(Mage_Sales_Model_Order::ACTION_FLAG_SHIP, false);
    $order->setActionFlag(Mage_Sales_Model_Order::ACTION_FLAG_COMMENT, false);
    $order->setActionFlag(Mage_Sales_Model_Order::ACTION_FLAG_PRODUCTS_PERMISSION_DENIED, false);

echo '4';

$order->setState(Mage_Sales_Model_Order::STATE_NEW, true);
$order->save();

echo '5';

foreach ($items as $item) {
    $item->setData('qty_invoiced',0)->save();
}


echo '6';


echo '7';

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.