本文整理汇总了PHP中unknown::getPhone方法的典型用法代码示例。如果您正苦于以下问题:PHP unknown::getPhone方法的具体用法?PHP unknown::getPhone怎么用?PHP unknown::getPhone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类unknown
的用法示例。
在下文中一共展示了unknown::getPhone方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createFormDataArray
/**
* Fills in the form data array
*
* @param unknown $object
* @return array
*/
protected function createFormDataArray($object)
{
return array("label" => $object->getLabel(), "title" => $object->getTitleId(), "firstname" => $object->getFirstname(), "lastname" => $object->getLastname(), "address1" => $object->getAddress1(), "address2" => $object->getAddress2(), "address3" => $object->getAddress3(), "zipcode" => $object->getZipcode(), "city" => $object->getCity(), "country" => $object->getCountryId(), "cellphone" => $object->getCellphone(), "phone" => $object->getPhone(), "company" => $object->getCompany());
}
示例2: exportCustomer
/**
* Exports the customer
*/
protected function exportCustomer()
{
if (is_null($this->BillingAddress)) {
throw new PlentymarketsExportEntityException('The customer with the email address »' . $this->Customer->getEmail() . '« could not be exported (no billing address)', 2100);
}
try {
if ($this->BillingAddress instanceof \Shopware\Models\Customer\Billing) {
$this->PLENTY_customerID = PlentymarketsMappingController::getCustomerBillingAddressByShopwareID($this->BillingAddress->getId());
} else {
if ($this->BillingAddress instanceof \Shopware\Models\Order\Billing) {
$this->PLENTY_customerID = PlentymarketsMappingController::getCustomerByShopwareID($this->BillingAddress->getId());
}
}
// Already exported
return;
} catch (PlentymarketsMappingExceptionNotExistant $E) {
}
// Logging
PlentymarketsLogger::getInstance()->message('Export:Customer', 'Export of the customer with the number »' . $this->getCustomerNumber() . '«');
$city = trim($this->BillingAddress->getCity());
$street_arr = PlentymarketsUtils::extractStreetAndHouseNo($this->BillingAddress->getStreet());
if (isset($street_arr['street']) && strlen($street_arr['street']) > 0) {
$streetName = $street_arr['street'];
} else {
$streetName = trim($this->BillingAddress->getStreet());
}
if (isset($street_arr['houseNo']) && strlen($street_arr['houseNo']) > 0) {
$streetHouseNumber = $street_arr['houseNo'];
} else {
//no house number was found in the street string
$streetHouseNumber = '';
}
$zip = trim($this->BillingAddress->getZipCode());
if (empty($city)) {
$city = PlentymarketsConfig::getInstance()->get('CustomerDefaultCity');
}
if (!isset($streetHouseNumber) || $streetHouseNumber == '') {
$streetHouseNumber = PlentymarketsConfig::getInstance()->get('CustomerDefaultHouseNumber');
}
if (!isset($streetName) || $streetName == '') {
$streetName = PlentymarketsConfig::getInstance()->get('CustomerDefaultStreet');
}
if ($zip == '') {
$zip = PlentymarketsConfig::getInstance()->get('CustomerDefaultZipcode');
}
$Request_SetCustomers = new PlentySoapRequest_SetCustomers();
$Request_SetCustomers->Customers = array();
$Object_SetCustomersCustomer = new PlentySoapObject_Customer();
$Object_SetCustomersCustomer->City = $city;
$Object_SetCustomersCustomer->Company = $this->BillingAddress->getCompany();
$Object_SetCustomersCustomer->CountryID = $this->getBillingCountryID();
// int
$Object_SetCustomersCustomer->CustomerClass = $this->getCustomerClassId();
$Object_SetCustomersCustomer->CustomerNumber = $this->getCustomerNumber();
// string
$Object_SetCustomersCustomer->CustomerSince = $this->Customer->getFirstLogin()->getTimestamp();
// int
$Object_SetCustomersCustomer->Email = $this->Customer->getEmail();
// string
$Object_SetCustomersCustomer->ExternalCustomerID = PlentymarketsUtils::getExternalCustomerID($this->Customer->getId());
// string
$Object_SetCustomersCustomer->FormOfAddress = $this->getBillingFormOfAddress();
// string
$Object_SetCustomersCustomer->Fax = $this->BillingAddress->getFax();
$Object_SetCustomersCustomer->FirstName = $this->BillingAddress->getFirstName();
$Object_SetCustomersCustomer->HouseNo = $streetHouseNumber;
$Object_SetCustomersCustomer->IsBlocked = !$this->Customer->getActive();
$Object_SetCustomersCustomer->Newsletter = (int) $this->Customer->getNewsletter();
$Object_SetCustomersCustomer->PayInvoice = true;
// boolean
$Object_SetCustomersCustomer->Street = $streetName;
$Object_SetCustomersCustomer->Surname = $this->BillingAddress->getLastName();
$Object_SetCustomersCustomer->Telephone = $this->BillingAddress->getPhone();
$Object_SetCustomersCustomer->VAT_ID = $this->BillingAddress->getVatId();
$Object_SetCustomersCustomer->ZIP = $zip;
// Store id
try {
$Object_SetCustomersCustomer->StoreID = PlentymarketsMappingController::getShopByShopwareID($this->Customer->getShop()->getId());
$Object_SetCustomersCustomer->Language = strtolower(substr($this->Customer->getShop()->getLocale()->getLocale(), 0, 2));
} catch (PlentymarketsMappingExceptionNotExistant $E) {
}
// Customer class
if ($this->Customer->getGroup()->getId() > 0) {
try {
$Object_SetCustomersCustomer->CustomerClass = PlentymarketsMappingController::getCustomerClassByShopwareID($this->Customer->getGroup()->getId());
} catch (PlentymarketsMappingExceptionNotExistant $E) {
}
}
$Request_SetCustomers->Customers[] = $Object_SetCustomersCustomer;
$Response_SetCustomers = PlentymarketsSoapClient::getInstance()->SetCustomers($Request_SetCustomers);
if (!$Response_SetCustomers->Success) {
throw new PlentymarketsExportEntityException('The customer with the number »' . $this->getCustomerNumber() . '« could not be exported', 2110);
}
if ($Response_SetCustomers->ResponseMessages->item[0]->Code == 100 || $Response_SetCustomers->ResponseMessages->item[0]->Code == 200) {
$this->PLENTY_customerID = (int) $Response_SetCustomers->ResponseMessages->item[0]->SuccessMessages->item[0]->Value;
if ($this->BillingAddress instanceof \Shopware\Models\Customer\Billing) {
PlentymarketsMappingController::addCustomerBillingAddress($this->BillingAddress->getId(), $this->PLENTY_customerID);
//.........这里部分代码省略.........
开发者ID:pixolith,项目名称:plentymarkets-shopware-connector,代码行数:101,代码来源:PlentymarketsExportEntityCustomer.php