when you create an order for a customer via the adminhtml you can select from a list of addresses. I am trying to find where in the code i can override or use an observer to modify the list of addresses.


1 Answer 1


The addresses come from this method Mage_Adminhtml_Block_Sales_Order_Create_Form_Address::getAddressCollection().
If you want to change this behavior you will have to copy the file in the local folder and do your edits there. because this block is not instantiated when you view the order form. Only it's children Mage_Adminhtml_Block_Sales_Order_Create_Billing_Address and Mage_Adminhtml_Block_Sales_Order_Create_Shipping_Address are instantiated.
If you plan to have a different logic for billing and shipping addresses you can rewrite each one of the blocks mentioned above.
If you want the same logic for both, do what I mentioned before. Copy Mage_Adminhtml_Block_Sales_Order_Create_Form_Address in local and do your magic there.

  • okay thanks. which is safer from the point of view of conflicting with other extensions? Mar 3, 2014 at 10:11
  • I think it would be safer to rewrite each class (Billing and shipping) but if you have the same logic for both you will get duplicate code.
    – Marius
    Mar 3, 2014 at 10:12
  • is there a way to do this via observers? Apr 14, 2014 at 13:57
  • @Conrad. Not that I know of, but I may be wrong.
    – Marius
    Apr 14, 2014 at 14:12
  • I ran "# grep -r dispatchEvent * | grep address" and couldn't find anything useful. Apr 14, 2014 at 14:13

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.