When a customer adds a postcode / zip code I would like to complete some PHP formatting.

From what I can see there are 3 places were a customer can add an address with a postcode

  1. Signup
  2. My Account Address Book
  3. OnePage Checkout

For Signup I can see I can override the Mage_Customer_AccountController

For the My Account Address Book I can see I can override the Mage_Customer_AddressController

However For the OnePage Checkout I can seem to find where the logic is for adding an address. Please could someone advise

1 Answer 1


In app/code/core/Mage/Checkout/controllers/Onepagecontroller.php

Mage_Checkout_OnepageController there are saveBillingAction() and saveShippingAction() functions. have below code

$this->getOnepage()->saveBilling($data, $customerAddressId);

so you need to rewrite Mage_Checkout_Model_Type_Onepage in file:

app/code/core/Mage/Checkout/Model/Type/Onepage.php below function

public function saveBilling() and public function saveShipping()

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.