本文整理汇总了PHP中Mage_Customer_Model_Address_Abstract::getCustomerId方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Customer_Model_Address_Abstract::getCustomerId方法的具体用法?PHP Mage_Customer_Model_Address_Abstract::getCustomerId怎么用?PHP Mage_Customer_Model_Address_Abstract::getCustomerId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Customer_Model_Address_Abstract
的用法示例。
在下文中一共展示了Mage_Customer_Model_Address_Abstract::getCustomerId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mapFromAddress
/**
* @param Mage_Customer_Model_Address_Abstract $address
* @return Payone_Api_Request_Consumerscore
*/
public function mapFromAddress(Mage_Customer_Model_Address_Abstract $address)
{
$factory = $this->getFactory();
$request = $factory->getRequestVerificationConsumerScore();
$helper = $this->helper();
$configGlobal = $this->getConfigGlobal();
$config = $this->getConfig();
$request->setConsumerscoretype($config->getType());
$request->setAddresschecktype(Payone_Api_Enum_AddressCheckType::NONE);
$request->setAid($configGlobal->getAid());
$request->setMid($configGlobal->getMid());
$request->setMode($config->getMode());
$request->setPortalid($configGlobal->getPortalid());
$request->setKey($configGlobal->getKey());
$request->setCity($address->getCity());
$request->setCompany($address->getCompany());
$request->setCountry($address->getCountry());
$request->setFirstname($address->getFirstname());
$request->setLastname($address->getLastname());
$request->setIntegratorName('Magento');
$request->setIntegratorVersion($helper->getMagentoVersion());
$request->setSolutionName('votum');
$request->setSolutionVersion($helper->getPayoneVersion());
if ($customerId = $address->getCustomerId()) {
$customer = $factory->getModelCustomer();
$customer->load($customerId);
$date = $customer->getDob();
$date = date('Ymd', strtotime($date));
$request->setBirthday($date);
}
$request->setEncoding('UTF-8');
$request->setLanguage($helper->getDefaultLanguage());
$request->setStreet($address->getStreetFull());
$request->setTelephonenumber($address->getTelephone());
$request->setZip($address->getPostcode());
return $request;
}
示例2: _isAddressFromAddressBook
/**
* Determine if the address is from the customers address book or is a new address
* @param Mage_Customer_Model_Address_Abstract $address
* @return bool
*/
protected function _isAddressFromAddressBook(Mage_Customer_Model_Address_Abstract $address)
{
return $address->getId() && $address->getCustomerId() && $address->getCustomerAddressId();
}