I would like to get the zip code after the user is done inputting. I am using a One Page Checkout for this. I am currently using a code that get the zip code on the user information being saved on the system. By the way I would like to add the code on one of the custom module's model. is this possible?
Add this code on the OnePageCheckout Controller(IndexController.php):
$billing_data = $this->getRequest()->getPost('billing', array());
and get the Zip Code:
as you wish to use it on other module, just set it on the core session:
and Get value from session in your module like:
$zipCode = Mage::getSingleton('core/session')->getZipCode();
this will allow you to get the Zip Code whenever the user is done inputting.