/** * @param Mage_Sales_Model_Order_Address $address * @return array */ protected function _getShopgateAddressFromOrderAddress($address) { $shopgateAddress = new ShopgateAddress(); $shopgateAddress->setFirstName($address->getFirstname()); $shopgateAddress->setLastName($address->getLastname()); $shopgateAddress->setGender($this->_getCustomerHelper()->getShopgateCustomerGender($address)); $shopgateAddress->setCompany($address->getCompany()); $shopgateAddress->setPhone($address->getTelephone()); $shopgateAddress->setStreet1($address->getStreet1()); $shopgateAddress->setStreet2($address->getStreet2()); $shopgateAddress->setCity($address->getCity()); $shopgateAddress->setZipcode($address->getPostcode()); $shopgateAddress->setCountry($address->getCountry()); $shopgateAddress->setState($this->_getHelper()->getIsoStateByMagentoRegion($address)); return $shopgateAddress->toArray(); }