1

Does anyone know how I can change the admin reordering so that either an order that is reordered automatically gets assigned to a different site or allows the operator to change the site the reorder is made from? Basically we are closing a site down soon (it won't be deleted as that would get rid of old orders) and need to be able to allow reordering to continue working.

  • "it won't be deleted as that would get rid of old orders" - have you checked that for sure? – benmarks Sep 16 '13 at 10:29
3

You will need to rewrite the Mage_Adminhtml_Model_Sales_Order_Create::initFromOrder() method because it propagates the original order's store_id value to the session, which is then used for subordinate actions:

public function initFromOrder(Mage_Sales_Model_Order $order)
{
    //...
    $this->getSession()->setStoreId($order->getStoreId());
    //...
}
0

I've been wondering how to achieve the same thing. I need to be able to assign an order to any website.

To easily do so, I just forked the file :

/app/Mage/Adminhtml/Model/Sales/Order/Create.php

Then, based on the comment from Benmarks, I just commented out the line :

//$this->getSession()->setStoreId($order->getStoreId());

Doing this will NOT fill the storeId when duplicating an order, and therefore, It will trigger a Store Selector, so you can pick the store you want to create the order into.

Sorcy

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.