I want to generate a link to the sales create order page (manual order page) in the admin and submit a customer id so that it opens automatically with the customers details filled out in the address form.


I know sometimes a $this->getUrl('path') works but I can't find any instructions online for setting a customer before the page loads. A solution like the following would obviously be ideal.

 $this->getUrl('sales/order/create/', $customer_id);

2 Answers 2


In your admin template or block file:

echo $this->getUrl('*/sales_order_create', array('customer_id' => 137));

This will land you on store selection page. If you already know store id you can add that as well:

echo $this->getUrl('*/sales_order_create', array('customer_id' => 137, 'store_id' => 1));


Alternative method

echo $this->helper('adminhtml')->getUrl('*/sales_order_create', array('customer_id' => 137, 'store_id' => 1));
  • Nope. How does your url look like? Jan 14, 2015 at 9:13
  • http://mysite.localhost/shop/index.php/admin/sales_order_create/index/customer_id/74/store_id/1/ this just goes to the dashboard (i'm using the second option with store id but it happens with both) Jan 14, 2015 at 9:17
  • key param is missing for some reason. Try with the snippet I just added. Url should look like index.php/admin/sales_order_create/index/customer_id/137/store_id/1/key/23c81d9...... Jan 14, 2015 at 9:27
  • The bottom option works perfectly. Thank you! Jan 14, 2015 at 9:28

Assuming $customer_id is already the correct ID for the customer, I think you'd just need:

$this->getUrl('sales/order/create/', array('customer_id' => $customer_id));

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.