Beispiel #1
0
 /**
  * @param ShopgateCustomer             $shopgateCustomer
  * @param Mage_Customer_Model_Customer $magentoCustomer
  * @return ShopgateCustomer
  */
 protected function _getCustomerSetBaseData(&$shopgateCustomer, $magentoCustomer)
 {
     $shopgateCustomer->setCustomerId($magentoCustomer->getId());
     $shopgateCustomer->setCustomerToken($this->_getCustomerToken($magentoCustomer));
     $shopgateCustomer->setFirstName($magentoCustomer->getFirstname());
     $shopgateCustomer->setLastName($magentoCustomer->getLastname());
     $shopgateCustomer->setMail($magentoCustomer->getEmail());
     $shopgateCustomer->setBirthday($magentoCustomer->getDob());
     $shopgateCustomer->setPhone($magentoCustomer->getTelephone());
     $shopgateCustomer->setGender($this->_getCustomerHelper()->getShopgateCustomerGender($magentoCustomer));
     $customerGroups = array();
     foreach ($this->_getCustomerHelper()->getShopgateCustomerGroups($magentoCustomer) as $customerGroup) {
         $customerGroups[] = new ShopgateCustomerGroup($customerGroup);
     }
     $shopgateCustomer->setCustomerGroups($customerGroups);
     return $shopgateCustomer;
 }