本文整理汇总了PHP中mslib_fe::genderSalutation方法的典型用法代码示例。如果您正苦于以下问题:PHP mslib_fe::genderSalutation方法的具体用法?PHP mslib_fe::genderSalutation怎么用?PHP mslib_fe::genderSalutation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mslib_fe
的用法示例。
在下文中一共展示了mslib_fe::genderSalutation方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateOrderStatus
public function updateOrderStatus($orders_id, $orders_status, $mail_customer = 0)
{
if (!is_numeric($orders_id)) {
return false;
}
$continue = 1;
//hook to let other plugins further manipulate
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_befe.php']['updateOrderStatusPreProc'])) {
$params = array('orders_id' => &$orders_id, 'orders_status' => &$orders_status, 'mail_customer' => &$mail_customer, 'continue' => &$continue);
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_befe.php']['updateOrderStatusPreProc'] as $funcRef) {
\TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
}
}
if ($continue) {
$order = mslib_fe::getOrder($orders_id);
if ($order['orders_id']) {
// dynamic variables
if (isset($order['language_id'])) {
// Switch to language that is stored in the order
mslib_befe::setSystemLanguage($order['language_id']);
}
$billing_address = '';
$delivery_address = '';
$full_customer_name = $order['billing_first_name'];
if ($order['billing_middle_name']) {
$full_customer_name .= ' ' . $order['billing_middle_name'];
}
if ($order['billing_last_name']) {
$full_customer_name .= ' ' . $order['billing_last_name'];
}
$delivery_full_customer_name = $order['delivery_first_name'];
if ($order['delivery_middle_name']) {
$delivery_full_customer_name .= ' ' . $order['delivery_middle_name'];
}
if ($order['delivery_last_name']) {
$delivery_full_customer_name .= ' ' . $order['delivery_last_name'];
}
$full_customer_name = preg_replace('/\\s+/', ' ', $full_customer_name);
$delivery_full_customer_name = preg_replace('/\\s+/', ' ', $delivery_full_customer_name);
if (!$order['delivery_address'] or !$order['delivery_city']) {
$order['delivery_company'] = $order['billing_company'];
$order['delivery_address'] = $order['billing_address'];
$order['delivery_street_name'] = $order['billing_street_name'];
$order['delivery_address_number'] = $order['billing_address_number'];
$order['delivery_address_ext'] = $order['billing_address_ext'];
$order['delivery_building'] = $order['billing_building'];
$order['delivery_zip'] = $order['billing_zip'];
$order['delivery_city'] = $order['billing_city'];
$order['delivery_telephone'] = $order['billing_telephone'];
$order['delivery_mobile'] = $order['billing_mobile'];
}
if ($order['delivery_company']) {
$delivery_address = $order['delivery_company'] . "<br />";
}
if ($delivery_full_customer_name) {
$delivery_address .= $delivery_full_customer_name . "<br />";
}
if ($order['delivery_building']) {
$delivery_address .= $order['delivery_building'] . "<br />";
}
if ($order['delivery_address']) {
$delivery_address .= $order['delivery_address'] . "<br />";
}
if ($order['delivery_zip'] and $order['delivery_city']) {
$delivery_address .= $order['delivery_zip'] . " " . $order['delivery_city'];
}
//if ($order['delivery_telephone']) $delivery_address.=ucfirst($this->pi_getLL('telephone')).': '.$order['delivery_telephone']."<br />";
//if ($order['delivery_mobile']) $delivery_address.=ucfirst($this->pi_getLL('mobile')).': '.$order['delivery_mobile']."<br />";
if ($order['billing_company']) {
$billing_address = $order['billing_company'] . "<br />";
}
if ($full_customer_name) {
$billing_address .= $full_customer_name . "<br />";
}
if ($order['billing_building']) {
$billing_address .= $order['billing_building'] . "<br />";
}
if ($order['billing_address']) {
$billing_address .= $order['billing_address'] . "<br />";
}
if ($order['billing_zip'] and $order['billing_city']) {
$billing_address .= $order['billing_zip'] . " " . $order['billing_city'];
}
//if ($order['billing_telephone']) $billing_address.=ucfirst($this->pi_getLL('telephone')).': '.$order['billing_telephone']."<br />";
//if ($order['billing_mobile']) $billing_address.=ucfirst($this->pi_getLL('mobile')).': '.$order['billing_mobile']."<br />";
$array1 = array();
$array2 = array();
$array1[] = '###GENDER_SALUTATION###';
$array2[] = mslib_fe::genderSalutation($order['billing_gender']);
$array1[] = '###DELIVERY_FIRST_NAME###';
$array2[] = $order['delivery_first_name'];
$array1[] = '###DELIVERY_LAST_NAME###';
$array2[] = preg_replace('/\\s+/', ' ', $order['delivery_middle_name'] . ' ' . $order['delivery_last_name']);
$array1[] = '###BILLING_FIRST_NAME###';
$array2[] = $order['billing_first_name'];
$array1[] = '###BILLING_LAST_NAME###';
$array2[] = preg_replace('/\\s+/', ' ', $order['billing_middle_name'] . ' ' . $order['billing_last_name']);
$array1[] = '###BILLING_TELEPHONE###';
$array2[] = $order['billing_telephone'];
$array1[] = '###DELIVERY_TELEPHONE###';
//.........这里部分代码省略.........
示例2: strftime
$array1[] = '###CUSTOMER_COMMENTS###';
$array2[] = $order['customer_comments'];
$array1[] = '###PAYMENT_CONDITION###';
if ($order['payment_condition']) {
$array2[] = $order['payment_condition'] . ' ' . $this->pi_getLL('days');
} else {
$array2[] = '';
}
$array1[] = '###PAYMENT_DUE_DATE###';
if ($order['payment_condition']) {
$array2[] = strftime("%x", strtotime('+' . $order['payment_condition'] . ' day', $order['crdate']));
} else {
$array2[] = '';
}
$array1[] = '###GENDER_SALUTATION###';
$array2[] = mslib_fe::genderSalutation($order['billing_gender']);
//hook to let other plugins further manipulate the replacers
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_fe.php']['mailOrderReplacersPostProc'])) {
$params = array('array1' => &$array1, 'array2' => &$array2, 'order' => &$order, 'mail_template' => $mail_template);
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_fe.php']['mailOrderReplacersPostProc'] as $funcRef) {
\TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
}
}
if ($markerArray['###PACKINGSLIP_CONTENT_HEADER_MESSAGE###']) {
$markerArray['###PACKINGSLIP_CONTENT_HEADER_MESSAGE###'] = str_replace($array1, $array2, $markerArray['###PACKINGSLIP_CONTENT_HEADER_MESSAGE###']);
}
if ($markerArray['###PACKINGSLIP_CONTENT_FOOTER_MESSAGE###']) {
$markerArray['###PACKINGSLIP_CONTENT_FOOTER_MESSAGE###'] = str_replace($array1, $array2, $markerArray['###PACKINGSLIP_CONTENT_FOOTER_MESSAGE###']);
}
$markerArray['###LABEL_PACKINGSLIP_PAYMENT_CONDITION###'] = '';
$markerArray['###PACKINGSLIP_PAYMENT_CONDITION###'] = '';
示例3: ucfirst
$billing_address .= '<br />' . ucfirst(mslib_fe::getTranslatedCountryNameByEnglishName($this->lang, $tmpArray['billing_country']));
}
if (empty($tmpArray['hash'])) {
$hashcode = md5($orders_id + time());
$updateArray = array();
$updateArray['hash'] = $hashcode;
$updateArray['orders_last_modified'] = time();
$query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_orders', 'orders_id=' . $orders_id, $updateArray);
$res = $GLOBALS['TYPO3_DB']->sql_query($query);
} else {
$hashcode = $tmpArray['hash'];
}
$array1 = array();
$array2 = array();
$array1[] = '###GENDER_SALUTATION###';
$array2[] = mslib_fe::genderSalutation($tmpArray['billing_gender']);
$array1[] = '###DELIVERY_FIRST_NAME###';
$array2[] = $tmpArray['delivery_first_name'];
$array1[] = '###DELIVERY_LAST_NAME###';
$array2[] = preg_replace('/\\s+/', ' ', $tmpArray['delivery_middle_name'] . ' ' . $tmpArray['delivery_last_name']);
$array1[] = '###BILLING_FIRST_NAME###';
$array2[] = $order['billing_first_name'];
$array1[] = '###BILLING_LAST_NAME###';
$array2[] = preg_replace('/\\s+/', ' ', $tmpArray['billing_middle_name'] . ' ' . $tmpArray['billing_last_name']);
$array1[] = '###BILLING_TELEPHONE###';
$array2[] = $tmpArray['billing_telephone'];
$array1[] = '###DELIVERY_TELEPHONE###';
$array2[] = $tmpArray['delivery_telephone'];
$array1[] = '###BILLING_MOBILE###';
$array2[] = $tmpArray['billing_mobile'];
$array1[] = '###DELIVERY_MOBILE###';
示例4: sendCreateAccountConfirmationLetter
function sendCreateAccountConfirmationLetter($customer_id, $password = '')
{
if (!is_numeric($customer_id)) {
return false;
}
$page = mslib_fe::getCMScontent('email_create_account_confirmation', $GLOBALS['TSFE']->sys_language_uid);
if ($page[0]['content']) {
$newCustomer = mslib_fe::getUser($customer_id);
// loading the email confirmation letter eof
// replacing the variables with dynamic values
$array1 = array();
$array2 = array();
$array1[] = '###GENDER_SALUTATION###';
$array2[] = mslib_fe::genderSalutation($this->post['gender']);
$array1[] = '###BILLING_COMPANY###';
$array2[] = $newCustomer['company'];
$array1[] = '###FULL_NAME###';
$array2[] = $newCustomer['name'];
$array1[] = '###BILLING_NAME###';
$array2[] = $newCustomer['name'];
$array1[] = '###BILLING_FIRST_NAME###';
$array2[] = $newCustomer['first_name'];
$array1[] = '###BILLING_LAST_NAME###';
$last_name = $newCustomer['last_name'];
if ($newCustomer['middle_name']) {
$last_name = $newCustomer['middle_name'] . ' ' . $last_name;
}
$array2[] = $last_name;
$array1[] = '###CUSTOMER_EMAIL###';
$array2[] = $newCustomer['email'];
$array1[] = '###BILLING_EMAIL###';
$array2[] = $newCustomer['email'];
$array1[] = '###BILLING_ADDRESS###';
$array2[] = $newCustomer['address'];
$array1[] = '###BILLING_TELEPHONE###';
$array2[] = $newCustomer['telephone'];
$array1[] = '###BILLING_MOBILE###';
$array2[] = $newCustomer['mobile'];
$array1[] = '###LONG_DATE###';
// ie woensdag 23 juni, 2010
$long_date = strftime($this->pi_getLL('full_date_format'));
$array2[] = $long_date;
$array1[] = '###CURRENT_DATE_LONG###';
// ie woensdag 23 juni, 2010
$long_date = strftime($this->pi_getLL('full_date_format'));
$array2[] = $long_date;
$array1[] = '###STORE_NAME###';
$array2[] = $this->ms['MODULES']['STORE_NAME'];
$array1[] = '###CUSTOMER_ID###';
$array2[] = $customer_id;
$link = $this->FULL_HTTP_URL . mslib_fe::typolink($this->shop_pid . ',2002', '&tx_multishop_pi1[page_section]=confirm_create_account&tx_multishop_pi1[hash]=' . $newCustomer['tx_multishop_code']);
$array1[] = '###LINK###';
$array2[] = '<a href="' . $link . '" rel="noreferrer">' . htmlspecialchars($this->pi_getLL('click_here_to_confirm_registration')) . '</a>';
$array1[] = '###CONFIRMATION_LINK###';
$array2[] = '<a href="' . $link . '" rel="noreferrer">' . htmlspecialchars($this->pi_getLL('click_here_to_confirm_registration')) . '</a>';
$array1[] = '###USERNAME###';
$array2[] = $newCustomer['email'];
$array1[] = '###PASSWORD###';
$array2[] = $password;
if ($page[0]['content']) {
$page[0]['content'] = str_replace($array1, $array2, $page[0]['content']);
}
if ($page[0]['name']) {
$page[0]['name'] = str_replace($array1, $array2, $page[0]['name']);
}
$user = array();
$user['name'] = $newCustomer['first_name'];
$user['email'] = $newCustomer['email'];
mslib_fe::mailUser($user, $page[0]['name'], $page[0]['content'], $this->ms['MODULES']['STORE_EMAIL'], $this->ms['MODULES']['STORE_NAME']);
return true;
}
}
示例5: mailOrder
//.........这里部分代码省略.........
// proposal template
$mail_template = 'email_order_proposal';
$page = mslib_fe::getCMScontent($mail_template, $GLOBALS['TSFE']->sys_language_uid, $loadFromPids);
} else {
// normal order template
if (isset($psp_mail_template['order_confirmation'])) {
$page = array();
if (!empty($psp_mail_template['order_confirmation'])) {
$page = mslib_fe::getCMScontent($psp_mail_template['order_confirmation'], $GLOBALS['TSFE']->sys_language_uid, $loadFromPids);
}
} else {
if ($order['payment_method']) {
$page = mslib_fe::getCMScontent('email_order_confirmation_' . $order['payment_method'], $GLOBALS['TSFE']->sys_language_uid, $loadFromPids);
}
if (!count($page[0])) {
$page = mslib_fe::getCMScontent('email_order_confirmation', $GLOBALS['TSFE']->sys_language_uid, $loadFromPids);
}
}
}
}
//hook to let other plugins further manipulate the replacers
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_fe.php']['mailOrderPostCMSContent'])) {
$params = array('page' => &$page, 'order' => &$order, 'mail_template' => $mail_template, 'psp_mail_template' => $psp_mail_template, 'loadFromPids' => $loadFromPids);
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_fe.php']['mailOrderPostCMSContent'] as $funcRef) {
\TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
}
}
if ($page[0]['content']) {
// loading the email confirmation letter eof
// replacing the variables with dynamic values
$array1 = array();
$array2 = array();
$array1[] = '###GENDER_SALUTATION###';
$array2[] = mslib_fe::genderSalutation($order['billing_gender']);
// full billing name
$array1[] = '###BILLING_FULL_NAME###';
$array2[] = $full_customer_name;
$array1[] = '###FULL_NAME###';
$array2[] = $full_customer_name;
$array1[] = '###BILLING_NAME###';
$array2[] = $order['billing_name'];
$array1[] = '###BILLING_COMPANY###';
$array2[] = $order['billing_company'];
$array1[] = '###BILLING_FIRST_NAME###';
$array2[] = $order['billing_first_name'];
$array1[] = '###BILLING_LAST_NAME###';
$array2[] = preg_replace('/\\s+/', ' ', $order['billing_middle_name'] . ' ' . $order['billing_last_name']);
$array1[] = '###BILLING_EMAIL###';
$array2[] = $order['billing_email'];
$array1[] = '###BILLING_TELEPHONE###';
$array2[] = $order['billing_telephone'];
$array1[] = '###BILLING_MOBILE###';
$array2[] = $order['billing_mobile'];
// full delivery name
$array1[] = '###DELIVERY_NAME###';
$array2[] = $order['delivery_name'];
$array1[] = '###DELIVERY_FULL_NAME###';
$array2[] = $delivery_full_customer_name;
$array1[] = '###DELIVERY_COMPANY###';
$array2[] = $order['delivery_company'];
$array1[] = '###DELIVERY_FIRST_NAME###';
$array2[] = $order['delivery_first_name'];
$array1[] = '###DELIVERY_LAST_NAME###';
$array2[] = preg_replace('/\\s+/', ' ', $order['delivery_middle_name'] . ' ' . $order['delivery_last_name']);
$array1[] = '###DELIVERY_EMAIL###';
$array2[] = $order['delivery_email'];
示例6: array
if (mslib_fe::loggedin()) {
// user is already signed in
$content .= $this->pi_getLL('you_are_already_signed_in');
} else {
if ($this->get['tx_multishop_pi1']['createAccountNonOptInCompleted']) {
$customerSession = $GLOBALS['TSFE']->fe_user->getKey('ses', 'tx_multishop_customer');
$customer_id = $customerSession['customer_id'];
$newCustomer = mslib_fe::getUser($customer_id);
$page = mslib_fe::getCMScontent('create_account_thank_you_page', $GLOBALS['TSFE']->sys_language_uid);
if ($page[0]['content']) {
// loading the email confirmation letter eof
// replacing the variables with dynamic values
$array1 = array();
$array2 = array();
$array1[] = '###GENDER_SALUTATION###';
$array2[] = mslib_fe::genderSalutation($newCustomer['gender']);
$array1[] = '###BILLING_COMPANY###';
$array2[] = $newCustomer['company'];
$array1[] = '###FULL_NAME###';
$array2[] = $newCustomer['name'];
$array1[] = '###BILLING_NAME###';
$array2[] = $newCustomer['name'];
$array1[] = '###BILLING_FIRST_NAME###';
$array2[] = $newCustomer['first_name'];
$array1[] = '###BILLING_LAST_NAME###';
$last_name = $newCustomer['last_name'];
if ($newCustomer['middle_name']) {
$last_name = $newCustomer['middle_name'] . ' ' . $last_name;
}
$array2[] = $last_name;
$array1[] = '###CUSTOMER_EMAIL###';