I’ve created a button within the Admin theme, which is named ‘Create order for Johnsons’
Basically on this button I want to point it to the new create order screen for customerid 3 and store 2. Something like this:
$key=Mage::getSingleton('adminhtml/url')->getSecretKey("sales_order_create","index");
echo $COUrl=Mage::helper("adminhtml")->getUrl("adminhtml/sales_order/new/",array("customer_id"=>"3","key"=>$key));
Please can anybody help me?
You don’t need to specify the key,
getUrldoes that for you when in an admin context.When using
startlike this it wipes all parameters exceptcustomer_idso a store cannot be specified. It will respect astore_idparameter if you change the URL to*/sales_order_create/indexbut that does not start a new order so it would be problematic. To get that to work you will have to create a new controller and action for your own use and make it almost exactly likeMage_Adminhtml_Sales_Order_CreateController::startAction():