Skip to content

Instantly share code, notes, and snippets.

@speedupmate
Created March 23, 2012 09:04
Show Gist options
  • Save speedupmate/2168700 to your computer and use it in GitHub Desktop.
Save speedupmate/2168700 to your computer and use it in GitHub Desktop.
estimate shipping add data to billing address as well
/**
* Initialize billing and shipping information
*/
public function estimatePostAction()
{
$country = (string) $this->getRequest()->getParam('country_id');
$postcode = (string) $this->getRequest()->getParam('estimate_postcode');
$city = (string) $this->getRequest()->getParam('estimate_city');
$regionId = (string) $this->getRequest()->getParam('region_id');
$region = (string) $this->getRequest()->getParam('region');
$this->_getQuote()->getBillingAddress()
->setCountryId($country)
->setCity($city)
->setPostcode($postcode)
->setRegionId($regionId)
->setRegion($region);
parent::estimatePostAction();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment