/** * @param Mage_Customer_Model_Address $customerAddress * @param array $randomData */ protected function _anonymizeCustomerAddress($customerAddress, $randomData) { foreach ($this->_getAddressMapping() as $addressKey => $randomDataKey) { if (!$customerAddress->getData($addressKey)) { continue; } if (strlen($randomDataKey)) { $customerAddress->setData($addressKey, $randomData[$randomDataKey]); } else { $customerAddress->setData($addressKey, ''); } } $customerAddress->getResource()->save($customerAddress); $this->_anonymizedCustomerAddressIds[] = $customerAddress->getId(); $this->_anonymizeQuoteAddresses($customerAddress, $randomData); $this->_anonymizeOrderAddresses($customerAddress, $randomData); }
/** * Set customer id * * @deprecated * @param Mage_Customer_Model_Address $object * @param integer $id * @return Mage_Customer_Model_Address */ public function setCustomerId($object, $id) { $object->setParentId($id); $object->setData('customer_id', $id); return $object; }
/** * @param Mage_Customer_Model_Address $address */ protected function _country(&$address) { $_country = Mage::app()->getLocale()->getCountryTranslation($address->getData("country_id")); $address->setData("country", $_country); }