문제

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.

Thanks

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top