本文整理汇总了PHP中email_collect_extra_info函数的典型用法代码示例。如果您正苦于以下问题:PHP email_collect_extra_info函数的具体用法?PHP email_collect_extra_info怎么用?PHP email_collect_extra_info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了email_collect_extra_info函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: str_replace
$html_msg['EMAIL_CONTACT_OWNER'] = str_replace('\\n', '', EMAIL_CONTACT);
$html_msg['EMAIL_CLOSURE'] = nl2br(EMAIL_GV_CLOSURE);
// include create-account-specific disclaimer
$email_text .= "\n\n" . sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER, STORE_OWNER_EMAIL_ADDRESS) . "\n\n";
$html_msg['EMAIL_DISCLAIMER'] = sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER, '<a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">' . STORE_OWNER_EMAIL_ADDRESS . ' </a>');
// send welcome email
if (trim(EMAIL_SUBJECT) != 'n/a') {
zen_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_NAME, EMAIL_FROM, $html_msg, 'welcome');
}
// send additional emails
if (SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_STATUS == '1' and SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO != '') {
if ($_SESSION['customer_id']) {
$account_query = "select customers_firstname, customers_lastname, customers_email_address, customers_telephone, customers_fax\n from " . TABLE_CUSTOMERS . "\n where customers_id = '" . (int) $_SESSION['customer_id'] . "'";
$account = $db->Execute($account_query);
}
$extra_info = email_collect_extra_info($name, $email_address, $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'], $account->fields['customers_email_address'], $account->fields['customers_telephone'], $account->fields['customers_fax']);
$html_msg['EXTRA_INFO'] = $extra_info['HTML'];
if (trim(SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT) != 'n/a') {
zen_mail('', SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO, SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT . ' ' . EMAIL_SUBJECT, $email_text . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'welcome_extra');
}
}
//endif send extra emails
}
zen_redirect(zen_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));
}
//endif !error
}
/*
* Set flags for template use:
*/
$selected_country = isset($_POST['zone_country_id']) && $_POST['zone_country_id'] != '' ? $country : SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY;
示例2: sprintf
}
$email_body .= sprintf(EMAIL_TEXT_LINK, zen_href_link(zen_get_info_page($_GET['products_id']), 'products_id=' . $_GET['products_id']), '', false) . "\n\n" . sprintf(EMAIL_TEXT_SIGNATURE, STORE_NAME . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n");
$html_msg['EMAIL_TEXT_HEADER'] = EMAIL_TEXT_HEADER;
$html_msg['EMAIL_PRODUCT_LINK'] = sprintf(str_replace('\\n\\n', '<br />', EMAIL_TEXT_LINK), '<a href="' . zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['products_id']) . '">' . $product_info->fields['products_name'] . '</a>', '', false);
$html_msg['EMAIL_TEXT_SIGNATURE'] = sprintf(str_replace('\\n', '', EMAIL_TEXT_SIGNATURE), '');
// include disclaimer
$email_body .= "\n\n" . EMAIL_ADVISORY . "\n\n";
//send the email
zen_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address, $html_msg, 'tell_a_friend');
// send additional emails
if (SEND_EXTRA_TELL_A_FRIEND_EMAILS_TO_STATUS == '1' and SEND_EXTRA_TELL_A_FRIEND_EMAILS_TO != '') {
if ($_SESSION['customer_id']) {
$account_query = "SELECT customers_firstname, customers_lastname, customers_email_address\n FROM " . TABLE_CUSTOMERS . "\n WHERE customers_id = :customersID";
$account_query = $db->bindVars($account_query, ':customersID', $_SESSION['customer_id'], 'integer');
$account = $db->Execute($account_query);
}
$extra_info = email_collect_extra_info($from_name, $from_email_address, $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'], $account->fields['customers_email_address']);
$html_msg['EXTRA_INFO'] = $extra_info['HTML'];
zen_mail('', SEND_EXTRA_TELL_A_FRIEND_EMAILS_TO, SEND_EXTRA_TELL_A_FRIEND_EMAILS_TO_SUBJECT . ' ' . $email_subject, $email_body . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'tell_a_friend_extra');
}
$messageStack->add_session('header', sprintf(TEXT_EMAIL_SUCCESSFUL_SENT, $product_info->fields['products_name'], zen_output_string_protected($to_name)), 'success');
zen_redirect(zen_href_link(zen_get_info_page($_GET['products_id']), 'products_id=' . $_GET['products_id']));
}
} elseif ($_SESSION['customer_id']) {
$account_query = "SELECT customers_firstname, customers_lastname, customers_email_address\n FROM " . TABLE_CUSTOMERS . "\n WHERE customers_id = :customersID";
$account_query = $db->bindVars($account_query, ':customersID', $_SESSION['customer_id'], 'integer');
$account = $db->Execute($account_query);
$from_name = $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'];
$from_email_address = $account->fields['customers_email_address'];
}
$breadcrumb->add(NAVBAR_TITLE);
示例3: explode
$customer_name = NOT_LOGGED_IN_TEXT;
}
// use contact us dropdown if defined
if (CONTACT_US_LIST != '') {
$send_to_array = explode(",", CONTACT_US_LIST);
preg_match('/\\<[^>]+\\>/', $send_to_array[$_POST['send_to']], $send_email_array);
$send_to_email = eregi_replace(">", "", $send_email_array[0]);
$send_to_email = eregi_replace("<", "", $send_to_email);
$send_to_name = preg_replace('/\\<[^*]*/', '', $send_to_array[$_POST['send_to']]);
} else {
//otherwise default to EMAIL_FROM and store name
$send_to_email = EMAIL_FROM;
$send_to_name = STORE_NAME;
}
// Prepare extra-info details
$extra_info = email_collect_extra_info($name, $email_address, $customer_name, $customer_email);
// Prepare Text-only portion of message
$text_message = OFFICE_FROM . "\t" . $name . "\n" . OFFICE_EMAIL . "\t" . $email_address . "\n\n" . '------------------------------------------------------' . "\n\n" . strip_tags($_POST['enquiry']) . "\n\n" . '------------------------------------------------------' . "\n\n" . $extra_info['TEXT'];
// Prepare HTML-portion of message
$html_msg['EMAIL_MESSAGE_HTML'] = strip_tags($_POST['enquiry']);
$html_msg['CONTACT_US_OFFICE_FROM'] = OFFICE_FROM . ' ' . $name . '<br />' . OFFICE_EMAIL . '(' . $email_address . ')';
$html_msg['EXTRA_INFO'] = $extra_info['HTML'];
// Send message
zen_mail($send_to_name, $send_to_email, EMAIL_SUBJECT, $text_message, $name, $email_address, $html_msg, 'contact_us');
zen_redirect(zen_href_link(FILENAME_CONTACT_US, 'action=success'));
} else {
$error = true;
if (empty($name)) {
$messageStack->add('contact', ENTRY_EMAIL_NAME_CHECK_ERROR);
}
if ($zc_validate_email == false) {
示例4: zen_mail
$name = TEXT_EASY_SIGNUP_CUSTOMER_NAME;
//send welcome email
zen_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_NAME, EMAIL_FROM, $html_msg, 'welcome');
// send additional emails
if (SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_STATUS == '1' and SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO != '') {
/*if ($_SESSION['customer_id']) {
$account_query = "select customers_firstname, customers_lastname, customers_email_address, customers_telephone, customers_fax
from " . TABLE_CUSTOMERS . "
where customers_id = '" . (int)$_SESSION['customer_id'] . "'";
$account_query = "select customers_email_address, customers_telephone, customers_fax
from " . TABLE_CUSTOMERS . "
where customers_id = '" . (int)$_SESSION['customer_id'] . "'";
$account = $db->Execute($account_query);
}*/
/*$extra_info=email_collect_extra_info($name,$email_address, $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'], $account->fields['customers_email_address'], $account->fields['customers_telephone'], $account->fields['customers_fax']);*/
$extra_info = email_collect_extra_info($name, $email_address, ' ', $email_address, '', '');
$html_msg['EXTRA_INFO'] = $extra_info['HTML'];
zen_mail('', SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO, SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT . ' ' . EMAIL_SUBJECT, $email_text . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'welcome_extra');
}
//endif send extra emails
//user
if (function_exists('addRewardPointersForRecommender')) {
addRewardPointersForRecommender();
}
//end user
zen_redirect(zen_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));
}
//endif !error
}
// This should be last line of the script:
$zco_notifier->notify('NOTIFY_MODULE_END_EASY_CREATE_ACCOUNT');
示例5: values
}
$sql = "insert into " . TABLE_REVIEWS . "\r\n (products_id, customers_id, customers_name, reviews_rating, date_added, status)\r\n values ('" . (int) $_GET['products_id'] . "', '" . (int) $_SESSION['customer_id'] . "', '" . zen_db_input($customer->fields['customers_firstname']) . ' ' . zen_db_input($customer->fields['customers_lastname']) . "', '" . zen_db_input($rating) . "', now(), " . zen_db_input($review_status) . ")";
$rs = $db->Execute($sql);
$insert_id = $db->Insert_ID();
$sql = "insert into " . TABLE_REVIEWS_DESCRIPTION . "\r\n (reviews_id, languages_id, reviews_text)\r\n values ('" . (int) $insert_id . "', '" . (int) $_SESSION['languages_id'] . "', '" . zen_db_input($review_text) . "')";
$db->Execute($sql);
// send review-notification email to admin
if (REVIEWS_APPROVAL == '1' && SEND_EXTRA_REVIEW_NOTIFICATION_EMAILS_TO_STATUS == '1' and defined('SEND_EXTRA_REVIEW_NOTIFICATION_EMAILS_TO') and SEND_EXTRA_REVIEW_NOTIFICATION_EMAILS_TO != '') {
$email_text = sprintf(EMAIL_PRODUCT_REVIEW_CONTENT_INTRO, $product_info->fields['products_name']) . "\n\n";
$email_text .= sprintf(EMAIL_PRODUCT_REVIEW_CONTENT_DETAILS, $review_text) . "\n\n";
$email_subject = sprintf(EMAIL_REVIEW_PENDING_SUBJECT, $product_info->fields['products_name']);
$html_msg['EMAIL_SUBJECT'] = sprintf(EMAIL_REVIEW_PENDING_SUBJECT, $product_info->fields['products_name']);
$html_msg['EMAIL_MESSAGE_HTML'] = str_replace('\\n', '', sprintf(EMAIL_PRODUCT_REVIEW_CONTENT_INTRO, $product_info->fields['products_name']));
$html_msg['EMAIL_MESSAGE_HTML'] .= '<br />';
$html_msg['EMAIL_MESSAGE_HTML'] .= str_replace('\\n', '', sprintf(EMAIL_PRODUCT_REVIEW_CONTENT_DETAILS, $review_text));
$extra_info = email_collect_extra_info($name, $email_address, $customer->fields['customers_firstname'] . ' ' . $customer->fields['customers_lastname'], $customer->fields['customers_email_address']);
$html_msg['EXTRA_INFO'] = $extra_info['HTML'];
zen_mail('', SEND_EXTRA_REVIEW_NOTIFICATION_EMAILS_TO, $email_subject, $email_text . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'reviews_extra');
}
// end send email
zen_redirect(zen_href_link(FILENAME_PRODUCT_REVIEWS, zen_get_all_get_params(array('action'))));
}
}
$products_price = zen_get_products_display_price($product_info->fields['products_id']);
$products_name = $product_info->fields['products_name'];
if ($product_info->fields['products_model'] != '') {
$products_model = '<br /><span class="smallText">[' . $product_info->fields['products_model'] . ']</span>';
} else {
$products_model = '';
}
// set image
示例6: module_visitor_to_account
//.........这里部分代码省略.........
$sql_data_array['entry_state'] = $state;
}
}
zen_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array, 'update', "customers_id = '" . (int) $_SESSION['customer_id'] . "' and address_book_id = '" . (int) $_SESSION['customer_default_address_id'] . "'");
$sql = "UPDATE " . TABLE_CUSTOMERS_INFO . "\r\n SET customers_info_date_account_last_modified = now()\r\n WHERE customers_info_id = :customersID";
$sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
// phpBB create account
if ($phpBB->phpBB['installed'] == true) {
$phpBB->phpbb_create_account($nick, $password, $email_address);
}
// End phppBB create account
$_SESSION['customer_first_name'] = $firstname;
$_SESSION['customer_last_name'] = $lastname;
// ->furikana
if (FURIKANA_NESESSARY) {
$_SESSION['customer_first_name_kana'] = $firstname_kana;
$_SESSION['customer_last_name_kana'] = $lastname_kana;
}
// <-furikana
$_SESSION['customer_country_id'] = $country;
$_SESSION['customer_zone_id'] = $zone_id;
// restore cart contents
$_SESSION['cart']->restore_contents();
// hook notifier class
$zco_notifier->notify('NOTIFY_LOGIN_SUCCESS_VIA_VISITOR_TO_ACCOUNT');
// build the message content
$name = $firstname . ' ' . $lastname;
if (ACCOUNT_GENDER == 'true') {
if ($gender == 'm') {
$email_text = sprintf(EMAIL_GREET_MR, $name);
} else {
$email_text = sprintf(EMAIL_GREET_MS, $name);
}
} else {
$email_text = sprintf(EMAIL_GREET_NONE, $name);
}
$html_msg['EMAIL_GREETING'] = str_replace('\\n', '', $email_text);
$html_msg['EMAIL_FIRST_NAME'] = $firstname;
$html_msg['EMAIL_LAST_NAME'] = $lastname;
// initial welcome
$email_text .= EMAIL_WELCOME;
$html_msg['EMAIL_WELCOME'] = str_replace('\\n', '', EMAIL_WELCOME);
if (NEW_SIGNUP_DISCOUNT_COUPON != '' and NEW_SIGNUP_DISCOUNT_COUPON != '0') {
$coupon_id = NEW_SIGNUP_DISCOUNT_COUPON;
$coupon = $db->Execute("select * from " . TABLE_COUPONS . " where coupon_id = '" . $coupon_id . "'");
$coupon_desc = $db->Execute("select coupon_description from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $coupon_id . "' and language_id = '" . $_SESSION['languages_id'] . "'");
$db->Execute("insert into " . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" . $coupon_id . "', '0', 'Admin', '" . $email_address . "', now() )");
// if on, add in Discount Coupon explanation
// $email_text .= EMAIL_COUPON_INCENTIVE_HEADER .
$email_text .= "\n" . EMAIL_COUPON_INCENTIVE_HEADER . (!empty($coupon_desc->fields['coupon_description']) ? $coupon_desc->fields['coupon_description'] . "\n\n" : '') . strip_tags(sprintf(EMAIL_COUPON_REDEEM, ' ' . $coupon->fields['coupon_code'])) . EMAIL_SEPARATOR;
$html_msg['COUPON_TEXT_VOUCHER_IS'] = EMAIL_COUPON_INCENTIVE_HEADER;
$html_msg['COUPON_DESCRIPTION'] = !empty($coupon_desc->fields['coupon_description']) ? '<strong>' . $coupon_desc->fields['coupon_description'] . '</strong>' : '';
$html_msg['COUPON_TEXT_TO_REDEEM'] = str_replace("\n", '', sprintf(EMAIL_COUPON_REDEEM, ''));
$html_msg['COUPON_CODE'] = $coupon->fields['coupon_code'];
}
//endif coupon
if (NEW_SIGNUP_GIFT_VOUCHER_AMOUNT > 0) {
$coupon_code = zen_create_coupon_code();
$insert_query = $db->Execute("insert into " . TABLE_COUPONS . " (coupon_code, coupon_type, coupon_amount, date_created) values ('" . $coupon_code . "', 'G', '" . NEW_SIGNUP_GIFT_VOUCHER_AMOUNT . "', now())");
$insert_id = $db->Insert_ID();
$db->Execute("insert into " . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" . $insert_id . "', '0', 'Admin', '" . $email_address . "', now() )");
// if on, add in GV explanation
$email_text .= "\n\n" . sprintf(EMAIL_GV_INCENTIVE_HEADER, $currencies->format(NEW_SIGNUP_GIFT_VOUCHER_AMOUNT)) . sprintf(EMAIL_GV_REDEEM, $coupon_code) . EMAIL_GV_LINK . zen_href_link(FILENAME_GV_REDEEM, 'gv_no=' . $coupon_code, 'NONSSL', false) . "\n\n" . EMAIL_GV_LINK_OTHER . EMAIL_SEPARATOR;
$html_msg['GV_WORTH'] = str_replace('\\n', '', sprintf(EMAIL_GV_INCENTIVE_HEADER, $currencies->format(NEW_SIGNUP_GIFT_VOUCHER_AMOUNT)));
$html_msg['GV_REDEEM'] = str_replace('\\n', '', str_replace('\\n\\n', '<br />', sprintf(EMAIL_GV_REDEEM, '<strong>' . $coupon_code . '</strong>')));
$html_msg['GV_CODE_NUM'] = $coupon_code;
$html_msg['GV_CODE_URL'] = str_replace('\\n', '', EMAIL_GV_LINK . '<a href="' . zen_href_link(FILENAME_GV_REDEEM, 'gv_no=' . $coupon_code, 'NONSSL', false) . '">' . TEXT_GV_NAME . ': ' . $coupon_code . '</a>');
$html_msg['GV_LINK_OTHER'] = EMAIL_GV_LINK_OTHER;
}
// endif voucher
// add in regular email welcome text
$email_text .= "\n\n" . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_GV_CLOSURE;
$html_msg['EMAIL_MESSAGE_HTML'] = str_replace('\\n', '', EMAIL_TEXT);
$html_msg['EMAIL_CONTACT_OWNER'] = str_replace('\\n', '', EMAIL_CONTACT);
$html_msg['EMAIL_CLOSURE'] = nl2br(EMAIL_GV_CLOSURE);
// include create-account-specific disclaimer
$email_text .= "\n\n" . sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER, STORE_OWNER_EMAIL_ADDRESS) . "\n\n";
$html_msg['EMAIL_DISCLAIMER'] = sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER, '<a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">' . STORE_OWNER_EMAIL_ADDRESS . ' </a>');
// send welcome email
zen_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_NAME, EMAIL_FROM, $html_msg, 'welcome');
// send additional emails
if (SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_STATUS == '1' and SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO != '') {
if ($_SESSION['customer_id']) {
$account_query = "select customers_firstname, customers_lastname, customers_email_address\r\n from " . TABLE_CUSTOMERS . "\r\n where customers_id = '" . (int) $_SESSION['customer_id'] . "'";
$account = $db->Execute($account_query);
}
$extra_info = email_collect_extra_info($name, $email_address, $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'], $account->fields['customers_email_address']);
$html_msg['EXTRA_INFO'] = $extra_info['HTML'];
zen_mail('', SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO, SEND_EXTRA_CREATE_ACCOUNT_EMAILS_TO_SUBJECT . ' ' . EMAIL_SUBJECT, $email_text . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'welcome_extra');
}
//endif send extra emails
$_SESSION['navigation']->clear_snapshot();
zen_redirect(zen_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));
}
//endif !error
} else {
$return = $this->getFormDefault($return);
}
return $return;
}
示例7: str_replace
$html_msg['GV_LINK_OTHER'] = EMAIL_GV_LINK_OTHER;
}
// add in regular email welcome text
$email_text .= "\n\n" . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_GV_CLOSURE;
$html_msg['EMAIL_MESSAGE_HTML'] = str_replace('\\n', '', EMAIL_TEXT);
$html_msg['EMAIL_CONTACT_OWNER'] = str_replace('\\n', '', EMAIL_CONTACT);
$html_msg['EMAIL_CLOSURE'] = nl2br(EMAIL_GV_CLOSURE);
// include create-account-specific disclaimer
$email_text .= "\n\n" . sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER, STORE_OWNER_EMAIL_ADDRESS) . "\n\n";
$html_msg['EMAIL_DISCLAIMER'] = sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER, '<a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">' . STORE_OWNER_EMAIL_ADDRESS . ' </a>');
$html_msg['EMAIL_TO_NAME'] = $name;
$html_msg['EMAIL_TO_ADDRESS'] = $email_address;
$html_msg['EMAIL_SUBJECT'] = $EMAIL_SUBJECT;
$html_msg['EMAIL_FROM_NAME'] = $STORE_NAME;
$html_msg['EMAIL_FROM_ADDRESS'] = $EMAIL_FROM;
$extra_info = email_collect_extra_info(STORE_NAME, EMAIL_FROM, $name, $email_address);
$html_msg['EXTRA_INFO'] = $extra_info['HTML'];
$email_html = zen_build_html_email_from_template('welcome_extra', $html_msg);
// zen_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_NAME, EMAIL_FROM, $html_msg, 'welcome');
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php
echo CHARSET;
?>
">
<title><?php
示例8: send_order_email
//.........这里部分代码省略.........
//added by john 2010-05-04 afterbuy
$afterbuy_id = '';
$afterbuy_id_chk = false;
$email_module_template = 'checkout';
$afterbuy_id_db = $db->Execute('select afterbuy_id,afterbuy_success,payment_module_code from ' . TABLE_ORDERS . ' where orders_id=' . (int) $zf_insert_id);
if ($afterbuy_id_db->RecordCount() == 1) {
if ($afterbuy_id_db->fields['afterbuy_success'] == 1) {
$afterbuy_id_chk = true;
$afterbuy_id = $afterbuy_id_db->fields['afterbuy_id'];
$html_msg['AFTERBUY_ID'] = $afterbuy_id;
$html_msg['EMAIL_TEXT_AFTERBUY_ID_TIP1'] = EMAIL_TEXT_AFTERBUY_ID_TIP1;
} else {
$html_msg['AFTERBUY_ID'] = '';
$html_msg['EMAIL_TEXT_AFTERBUY_ID_TIP1'] = '';
}
}
//end
$email_order = EMAIL_TEXT_HEADER . EMAIL_TEXT_FROM . STORE_NAME . "\n\n" . $this->customer['firstname'] . ' ' . $this->customer['lastname'] . "\n\n" . EMAIL_THANKS_FOR_SHOPPING . "\n" . EMAIL_DETAILS_FOLLOW . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $zf_insert_id . "\n" . ($afterbuy_id_chk == true ? EMAIL_TEXT_AFTERBUY_ID_TIP1 . $afterbuy_id . "\n" : '') . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false) . "\n\n";
$html_msg['EMAIL_TEXT_HEADER'] = EMAIL_TEXT_HEADER;
$html_msg['EMAIL_TEXT_FROM'] = EMAIL_TEXT_FROM;
$html_msg['INTRO_STORE_NAME'] = STORE_NAME;
$html_msg['EMAIL_THANKS_FOR_SHOPPING'] = EMAIL_THANKS_FOR_SHOPPING;
$html_msg['EMAIL_DETAILS_FOLLOW'] = EMAIL_DETAILS_FOLLOW;
$html_msg['INTRO_ORDER_NUM_TITLE'] = EMAIL_TEXT_ORDER_NUMBER;
$html_msg['INTRO_ORDER_NUMBER'] = $zf_insert_id;
$html_msg['INTRO_DATE_TITLE'] = EMAIL_TEXT_DATE_ORDERED;
$html_msg['INTRO_DATE_ORDERED'] = strftime(DATE_FORMAT_LONG);
$html_msg['INTRO_URL_TEXT'] = $htmlInvoiceURL;
$html_msg['INTRO_URL_VALUE'] = $htmlInvoiceValue;
//comments area
if ($this->info['comments']) {
$email_order .= zen_db_output($this->info['comments']) . "\n\n";
$html_msg['ORDER_COMMENTS'] = nl2br(zen_db_output($this->info['comments']));
} else {
$html_msg['ORDER_COMMENTS'] = '';
}
//products area
$email_order .= EMAIL_TEXT_PRODUCTS . "\n" . EMAIL_SEPARATOR . "\n" . $this->products_ordered . EMAIL_SEPARATOR . "\n";
$html_msg['PRODUCTS_TITLE'] = EMAIL_TEXT_PRODUCTS;
$html_msg['PRODUCTS_DETAIL'] = '<table class="product-details" border="0" width="100%" cellspacing="0" cellpadding="2">' . $this->products_ordered_html . '</table>';
//order totals area
$html_ot .= '<td class="order-totals-text" align="right" width="100%">' . ' ' . '</td> ' . "\n" . '<td class="order-totals-num" align="right" nowrap="nowrap">' . '---------' . '</td> </tr>' . "\n" . '<tr>';
for ($i = 0, $n = sizeof($order_totals); $i < $n; $i++) {
$email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
$html_ot .= '<td class="order-totals-text" align="right" width="100%">' . $order_totals[$i]['title'] . '</td> ' . "\n" . '<td class="order-totals-num" align="right" nowrap="nowrap">' . $order_totals[$i]['text'] . '</td> </tr>' . "\n" . '<tr>';
}
$html_msg['ORDER_TOTALS'] = '<table border="0" width="100%" cellspacing="0" cellpadding="2"> ' . $html_ot . ' </table>';
//addresses area: Delivery
$html_msg['HEADING_ADDRESS_INFORMATION'] = HEADING_ADDRESS_INFORMATION;
$html_msg['ADDRESS_DELIVERY_TITLE'] = EMAIL_TEXT_DELIVERY_ADDRESS;
$html_msg['ADDRESS_DELIVERY_DETAIL'] = $this->content_type != 'virtual' ? zen_address_label($_SESSION['customer_id'], $_SESSION['sendto'], true, '', "<br />") : 'n/a';
$html_msg['SHIPPING_METHOD_TITLE'] = HEADING_SHIPPING_METHOD;
$html_msg['SHIPPING_METHOD_DETAIL'] = zen_not_null($this->info['shipping_method']) ? $this->info['shipping_method'] : 'n/a';
if ($this->content_type != 'virtual') {
$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . zen_address_label($_SESSION['customer_id'], $_SESSION['sendto'], 0, '', "\n") . "\n";
}
//addresses area: Billing
$email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . zen_address_label($_SESSION['customer_id'], $_SESSION['billto'], 0, '', "\n") . "\n\n";
$html_msg['ADDRESS_BILLING_TITLE'] = EMAIL_TEXT_BILLING_ADDRESS;
$html_msg['ADDRESS_BILLING_DETAIL'] = zen_address_label($_SESSION['customer_id'], $_SESSION['billto'], true, '', "<br />");
if (is_object($GLOBALS[$_SESSION['payment']])) {
$cc_num_display = isset($this->info['cc_number']) && $this->info['cc_number'] != '' ? substr($this->info['cc_number'], 0, 4) . str_repeat('X', strlen($this->info['cc_number']) - 8) . substr($this->info['cc_number'], -4) . "\n\n" : '';
$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n";
$payment_class = $_SESSION['payment'];
$email_order .= $GLOBALS[$payment_class]->title . "\n\n";
$email_order .= isset($this->info['cc_type']) && $this->info['cc_type'] != '' ? $this->info['cc_type'] . ' ' . $cc_num_display . "\n\n" : '';
$email_order .= $GLOBALS[$payment_class]->email_footer ? $GLOBALS[$payment_class]->email_footer . "\n\n" : '';
} else {
$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n";
$email_order .= PAYMENT_METHOD_GV . "\n\n";
}
$html_msg['PAYMENT_METHOD_TITLE'] = EMAIL_TEXT_PAYMENT_METHOD;
$html_msg['PAYMENT_METHOD_DETAIL'] = is_object($GLOBALS[$_SESSION['payment']]) ? $GLOBALS[$payment_class]->title : PAYMENT_METHOD_GV;
$html_msg['PAYMENT_METHOD_FOOTER'] = is_object($GLOBALS[$_SESSION['payment']]) && $GLOBALS[$payment_class]->email_footer != '' ? nl2br($GLOBALS[$payment_class]->email_footer) : (isset($this->info['cc_type']) && $this->info['cc_type'] != '' ? $this->info['cc_type'] . ' ' . $cc_num_display . "\n\n" : '');
// include disclaimer
$email_order .= "\n-----\n" . sprintf(EMAIL_DISCLAIMER, STORE_OWNER_EMAIL_ADDRESS) . "\n\n";
// include copyright
$email_order .= "\n-----\n" . EMAIL_FOOTER_COPYRIGHT . "\n\n";
while (strstr($email_order, ' ')) {
$email_order = str_replace(' ', ' ', $email_order);
}
$html_msg['EMAIL_FIRST_NAME'] = $this->customer['firstname'];
$html_msg['EMAIL_LAST_NAME'] = $this->customer['lastname'];
// $html_msg['EMAIL_TEXT_HEADER'] = EMAIL_TEXT_HEADER;
$html_msg['EXTRA_INFO'] = '';
$zco_notifier->notify('NOTIFY_ORDER_INVOICE_CONTENT_READY_TO_SEND', array('zf_insert_id' => $zf_insert_id, 'text_email' => $email_order, 'html_email' => $html_msg));
zen_mail($this->customer['firstname'] . ' ' . $this->customer['lastname'], $this->customer['email_address'], EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, $email_order, STORE_NAME, EMAIL_FROM, $html_msg, $email_module_template, $this->attachArray);
// send additional emails
if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
$extra_info = email_collect_extra_info('', '', $this->customer['firstname'] . ' ' . $this->customer['lastname'], $this->customer['email_address'], $this->customer['telephone']);
$html_msg['EXTRA_INFO'] = $extra_info['HTML'];
if ($GLOBALS[$_SESSION['payment']]->auth_code || $GLOBALS[$_SESSION['payment']]->transaction_id) {
$pmt_details = 'AuthCode: ' . $GLOBALS[$_SESSION['payment']]->auth_code . ' TransID: ' . $GLOBALS[$_SESSION['payment']]->transaction_id . "\n\n";
$email_order = $pmt_details . $email_order;
$html_msg['EMAIL_TEXT_HEADER'] = nl2br($pmt_details) . $html_msg['EMAIL_TEXT_HEADER'];
}
zen_mail('', SEND_EXTRA_ORDER_EMAILS_TO, SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, $email_order . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, $email_module_template, $this->attachArray);
}
$zco_notifier->notify('NOTIFY_ORDER_AFTER_SEND_ORDER_EMAIL');
}
示例9: zen_href_link
$gv_email .= EMAIL_GV_LINK . ' ' . zen_href_link(FILENAME_GV_REDEEM, 'gv_no=' . $id1, 'NONSSL');
$gv_email .= "\n\n";
$gv_email .= EMAIL_GV_FIXED_FOOTER . "\n\n";
$gv_email .= EMAIL_GV_SHOP_FOOTER;
$gv_email_subject = sprintf(EMAIL_GV_TEXT_SUBJECT, $_POST['send_name']);
// include disclaimer
$gv_email .= "\n\n" . EMAIL_ADVISORY . "\n\n";
$html_msg['EMAIL_GV_FIXED_FOOTER'] = str_replace(array("\r\n", "\n", "\r", "-----"), '', EMAIL_GV_FIXED_FOOTER);
$html_msg['EMAIL_GV_SHOP_FOOTER'] = EMAIL_GV_SHOP_FOOTER;
// send the email
zen_mail('', $_POST['email'], $gv_email_subject, nl2br($gv_email), STORE_NAME, EMAIL_FROM, $html_msg, 'gv_send');
// send additional emails
if (SEND_EXTRA_GV_CUSTOMER_EMAILS_TO_STATUS == '1' and SEND_EXTRA_GV_CUSTOMER_EMAILS_TO != '') {
if ($_SESSION['customer_id']) {
$account_query = "select customers_firstname, customers_lastname, customers_email_address\r\n from " . TABLE_CUSTOMERS . "\r\n where customers_id = '" . (int) $_SESSION['customer_id'] . "'";
$account = $db->Execute($account_query);
}
$extra_info = email_collect_extra_info($_POST['to_name'], $_POST['email'], $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'], $account->fields['customers_email_address']);
$html_msg['EXTRA_INFO'] = $extra_info['HTML'];
zen_mail('', SEND_EXTRA_GV_CUSTOMER_EMAILS_TO, SEND_EXTRA_GV_CUSTOMER_EMAILS_TO_SUBJECT . ' ' . $gv_email_subject, $gv_email . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'gv_send_extra');
}
// do a fresh calculation after sending an email
$gv_query = "select amount\r\n from " . TABLE_COUPON_GV_CUSTOMER . "\r\n where customer_id = '" . $_SESSION['customer_id'] . "'";
$gv_result = $db->Execute($gv_query);
}
}
$gv_current_balance = $gv_result->fields['amount'];
if ($_GET['action'] == 'complete') {
zen_redirect(zen_href_link(FILENAME_GV_SEND, 'action=doneprocess'));
}
$breadcrumb->add(NAVBAR_TITLE);
示例10: sprintf
$email_text .= "\n\n" . sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER, STORE_OWNER_EMAIL_ADDRESS) . "\n\n";
$html_msg['EMAIL_DISCLAIMER'] = sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER, '<a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">' . STORE_OWNER_EMAIL_ADDRESS . ' </a>');
// send welcome email
zen_mail($name, $faqs_contact_mail, EMAIL_SUBJECT, $email_text, STORE_NAME, EMAIL_FROM, $html_msg, 'faqssubmit');
// send additional emails
if (SEND_FAQ_SUBMIT_EMAILS_TO_EMAILS_TO != '') {
if ($_SESSION['customer_id']) {
$account_query = "select customers_firstname, customers_lastname, customers_email_address\n from " . TABLE_CUSTOMERS . "\n where customers_id = '" . (int) $_SESSION['customer_id'] . "'";
$account = $db->Execute($account_query);
$customers_sname = $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'];
$customers_email_address = $account->fields['customers_email_address'];
} else {
$customers_sname = 'Not logged in';
$customers_email_address = 'Not logged in';
}
$extra_info = email_collect_extra_info($name, $faqs_contact_mail, $customers_sname, $customers_email_address);
$html_msg['EMAIL_MESSAGE_HTML'] = $faqs_name . '<br />' . $faqs_description . '<br />';
$html_msg['CONTACT_US_OFFICE_FROM'] = OFFICE_FROM . ' ' . $name . '<br />' . OFFICE_EMAIL . '(' . $faqs_contact_mail . ')';
$html_msg['EXTRA_INFO'] = $extra_info['HTML'];
zen_mail('', SEND_FAQ_SUBMIT_EMAILS_TO_EMAILS_TO, SEND_EXTRA_SUBMIT_FAQ_TO_SUBJECT . ' ' . EMAIL_SUBJECT, $email_text . $extra_info['HTML'], STORE_NAME, EMAIL_FROM, $html_msg, 'contact_us');
}
$messageStack->add_session('submit_success', EMAIL_TEXT_APPROVED, 'success');
zen_redirect(zen_href_link(FILENAME_FAQS_SUBMIT, '', 'SSL'));
}
}
// faqs breadcrumb
if ($_SESSION['customer_id']) {
$check_customer = $db->Execute("select customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $_SESSION['customer_id'] . "'");
$email = $check_customer->fields['customers_email_address'];
$name = $check_customer->fields['customers_firstname'] . ' ' . $check_customer->fields['customers_lastname'];
}
示例11: checkout_process
function checkout_process($notifier)
{
global $currencies, $order_totals, $order;
global $messageStack;
global $request_type;
// send lowstock email to admin
if ($order->email_low_stock != '' and SEND_LOWSTOCK_EMAIL == '1') {
return true;
}
// prepare data
$customer = $order->customer;
$GLOBALS['phpmailer']['comments'] = $order->info['comments'];
$GLOBALS['phpmailer']['content_type'] = $order->content_type;
$oID = $_SESSION['order_number_created'];
// get template id
if ($_SESSION['customer_id'] > 0 && !isset($_SESSION['visitors_id'])) {
// members
$email_template_id = MODULE_EMAIL_TEMPLATE_CHECKOUT_SUCCESS_MAIL_ID;
} else {
//visitors
$email_template_id = MODULE_EMAIL_TEMPLATE_CHECKOUT_SUCCESS_VISITOR_MAIL_ID;
}
switch ($notifier) {
case 'NOTIFY_BEFORE_CREATE_HEADER':
if (!empty($email_template_id) && is_numeric($email_template_id)) {
// template本文取得
$id = $email_template_id;
$order_id = null;
$language_id = $_SESSION['language_id'];
$subject = get_email_template_contents($id, $order_id, $language_id, 'subject');
if ($subject === false) {
// template取得できなければ何もしない
return false;
}
if (strpos($GLOBALS['phpmailer']['Subject'], SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT) !== false) {
// admin 宛のメールはsubjectにprefixを付ける
$GLOBALS['phpmailer']['Subject'] = SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT . zen_db_prepare_input($subject) . EMAIL_ORDER_NUMBER_SUBJECT . $oID;
} else {
$GLOBALS['phpmailer']['Subject'] = zen_db_prepare_input($subject) . EMAIL_ORDER_NUMBER_SUBJECT . $oID;
}
} else {
// idが無効なら何もしない
return false;
}
break;
case 'NOTIFY_BEFORE_CREATE_BODY':
if (!empty($email_template_id) && is_numeric($email_template_id)) {
// template本文取得
$id = $email_template_id;
$order_id = null;
$language_id = $_SESSION['language_id'];
$contents = get_email_template_contents($id, $order_id, $language_id, 'contents');
if ($contents === false) {
// template取得できなければ何もしない
return false;
}
// GLOBALSにテンプレートをセット
$GLOBALS['phpmailer']['Body'] = zen_db_prepare_input($contents);
if (!empty($GLOBALS['phpmailer']['AltBody'])) {
$GLOBALS['phpmailer']['AltBody'] = zen_db_prepare_input($contents);
}
// 置換開始
$GLOBALS['phpmailer']['Body'] = replace_order_email($oID, $GLOBALS['phpmailer']['Body'], $id);
$GLOBALS['phpmailer']['Body'] = $this->_cleanup_email($GLOBALS['phpmailer']['Body']);
if (!empty($GLOBALS['phpmailer']['AltBody'])) {
$GLOBALS['phpmailer']['AltBody'] = replace_order_email($oID, $GLOBALS['phpmailer']['AltBody'], $id);
$GLOBALS['phpmailer']['AltBody'] = $this->_cleanup_email($GLOBALS['phpmailer']['AltBody']);
}
// admin 宛には追加情報を付加
if (strpos($GLOBALS['phpmailer']['Subject'], SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT) !== false) {
$extra_info = email_collect_extra_info('', '', $customer['firstname'] . ' ' . $customer['lastname'], $customer['email_address'], $customer['telephone']);
$GLOBALS['phpmailer']['Body'] .= strip_tags($extra_info['TEXT']);
if (!empty($GLOBALS['phpmailer']['AltBody'])) {
$GLOBALS['phpmailer']['AltBody'] .= strip_tags($extra_info['TEXT']);
}
}
} else {
// idが無効なら何もしない
return false;
}
break;
}
}
示例12: customerSendCoupon
function customerSendCoupon($pFromUser, $pRecipient, $pAmount)
{
global $gBitDb, $gBitSmarty, $gCommerceSystem, $currencies;
$ret = NULL;
$gBitDb->StartTrans();
$code = CommerceVoucher::generateCouponCode();
$gvBalance = CommerceVoucher::getGiftAmount(FALSE);
$newBalance = $gvBalance - $pAmount;
if ($new_amount < 0) {
$error = ERROR_ENTRY_AMOUNT_CHECK;
} else {
$gv_query = "UPDATE " . TABLE_COUPON_GV_CUSTOMER . "\n\t\t\t\t\t\t SET `amount` = ?\n\t\t\t\t\t\t WHERE `customer_id` = ?";
$gBitDb->query($gv_query, array($newBalance, $pFromUser->mUserId));
$gv_query = "INSERT INTO " . TABLE_COUPONS . " (`coupon_type`, `coupon_code`, `date_created`, `coupon_amount`) values ('G', ?, NOW(), ?)";
$gv = $gBitDb->query($gv_query, array($code, $pAmount));
$gvId = zen_db_insert_id(TABLE_COUPONS, 'coupon_id');
$gv_query = "insert into " . TABLE_COUPON_EMAIL_TRACK . "\t(`coupon_id`, `customer_id_sent`, `emailed_to`, `date_sent`)\n\t\t\t\t\t\tvalues ( ?, ?, ?, now())";
$gBitDb->query($gv_query, array($gvId, $pFromUser->mUserId, $pRecipient['email']));
$ret = $code;
$gv_email_subject = tra('A gift from') . ' ' . $pFromUser->getDisplayName() . ' ' . tra('to') . ' ' . $gCommerceSystem->getConfig('STORE_NAME');
$gBitSmarty->assign('gvCode', $code);
$gBitSmarty->assign('gvSender', $pFromUser->getDisplayName());
$gBitSmarty->assign('gvAmount', $currencies->format($pAmount, false));
$gBitSmarty->assign('gvRedeemUrl', BITCOMMERCE_PKG_URI . 'index.php?main_page=gv_redeem&gv_no=' . $code);
if (!empty($pRecipient['message'])) {
$gBitSmarty->assign('gvMessage', $pRecipient['message']);
}
$textMessage = $gBitSmarty->fetch('bitpackage:bitcommerce/gv_send_email_text.tpl');
$htmlMessage = $gBitSmarty->fetch('bitpackage:bitcommerce/gv_send_email_html.tpl');
// send the email
zen_mail('', $pRecipient['email'], $gv_email_subject, $textMessage, STORE_NAME, EMAIL_FROM, $htmlMessage, 'gv_send');
// send additional emails
if (SEND_EXTRA_GV_CUSTOMER_EMAILS_TO_STATUS == '1' and SEND_EXTRA_GV_CUSTOMER_EMAILS_TO != '') {
zen_mail('', SEND_EXTRA_GV_CUSTOMER_EMAILS_TO, $gv_email_subject, $textMessage, STORE_NAME, EMAIL_FROM, $htmlMessage, 'gv_send');
if ($_SESSION['customer_id']) {
$account_query = "select `customers_firstname`, `customers_lastname`, `customers_email_address`\n\t\t\t\t\t\t\t\t\t\tfrom " . TABLE_CUSTOMERS . "\n\t\t\t\t\t\t\t\t\t\twhere `customers_id` = '" . (int) $_SESSION['customer_id'] . "'";
$account = $gBitDb->Execute($account_query);
}
$extra_info = email_collect_extra_info($pRecipient['to_name'], $pRecipient['email'], $pFromUser->getDisplayName(), $pFromUser->getField('email'));
$html_msg['EXTRA_INFO'] = $gCommerceSystem->getConfig('TEXT_GV_NAME') . ' Code: ' . $code . '<br/>' . $extra_info['HTML'];
zen_mail('', SEND_EXTRA_GV_CUSTOMER_EMAILS_TO, tra('[GV CUSTOMER SENT]') . ' ' . $gv_email_subject, $gCommerceSystem->getConfig('TEXT_GV_NAME') . ' Code: ' . $code . "\n" . $gv_email . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'gv_send_extra');
}
}
$gBitDb->CompleteTrans();
return $ret;
}
示例13: send_gift_certificate_email
public static function send_gift_certificate_email()
{
global $db, $error, $messageStack, $mail, $gv_current_balance, $gv_amount;
require_once 'includes/classes/http_client.php';
require 'includes/languages/english/gv_send.php';
// verify no timeout has occurred on the send or process
if (!$_SESSION['customer_id']) {
zen_redirect(zen_href_link(FILENAME_TIME_OUT));
}
// if the customer is not logged on, redirect them to the login page (for
// cowoa customers, just a check the session is good)
if (!$_SESSION['customer_id']) {
$_SESSION['navigation']->set_snapshot();
zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
}
require DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
// extract sender's name+email from database, since logged-in customer is the one who is sending this GV email
$account_query = "SELECT customers_firstname, customers_lastname, customers_email_address\n FROM " . TABLE_CUSTOMERS . "\n WHERE customers_id = :customersID";
$account_query = $db->bindVars($account_query, ':customersID', $_SESSION['customer_id'], 'integer');
$account = $db->Execute($account_query);
$send_firstname = $account->fields['customers_firstname'];
$send_name = $send_firstname . ' ' . $account->fields['customers_lastname'];
$send_email_address = $account->fields['customers_email_address'];
$gv_query = "SELECT amount\n FROM " . TABLE_COUPON_GV_CUSTOMER . "\n WHERE customer_id = :customersID";
$gv_query = $db->bindVars($gv_query, ':customersID', $_SESSION['customer_id'], 'integer');
$gv_result = $db->Execute($gv_query);
$gv_amount = $gv_result->fields['amount'];
if ($currencies->value($gv_amount, true, DEFAULT_CURRENCY) > $gv_amount || $gv_amount == 0) {
$error = true;
$messageStack->add('gv_send', ERROR_ENTRY_AMOUNT_CHECK, 'error');
}
$id1 = zen_create_coupon_code($mail['customers_email_address']);
$new_amount = 0;
$new_db_amount = 0;
$gv_query = "UPDATE " . TABLE_COUPON_GV_CUSTOMER . "\n SET amount = '" . $new_amount . "'\n WHERE customer_id = :customersID";
$gv_query = $db->bindVars($gv_query, ':customersID', $_SESSION['customer_id'], 'integer');
$db->Execute($gv_query);
$gv_query = "INSERT INTO " . TABLE_COUPONS . " (coupon_type, coupon_code, date_created, coupon_amount)\n VALUES ('G', :couponCode, NOW(), :amount)";
$gv_query = $db->bindVars($gv_query, ':couponCode', $id1, 'string');
$gv_query = $db->bindVars($gv_query, ':amount', $currencies->value($gv_amount, true, DEFAULT_CURRENCY), 'currency');
$gv = $db->Execute($gv_query);
$insert_id = $db->Insert_ID();
$gv_query = "INSERT INTO " . TABLE_COUPON_EMAIL_TRACK . "\n (coupon_id, customer_id_sent, sent_firstname, sent_lastname, emailed_to, date_sent)\n VALUES (:insertID, :customersID, :firstname, :lastname, :email, now())";
$gv_query = $db->bindVars($gv_query, ':insertID', $insert_id, 'integer');
$gv_query = $db->bindVars($gv_query, ':customersID', $_SESSION['customer_id'], 'integer');
$gv_query = $db->bindVars($gv_query, ':firstname', $send_firstname, 'string');
$gv_query = $db->bindVars($gv_query, ':lastname', $account->fields['customers_lastname'], 'string');
$gv_query = $db->bindVars($gv_query, ':email', $account->fields['customers_email_address'], 'string');
$db->Execute($gv_query);
// build email content:
$gv_email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . sprintf(EMAIL_GV_AUTO_AMOUNT, $currencies->format($gv_amount, false)) . "\n" . EMAIL_SEPARATOR . "\n\n";
$gv_email .= sprintf(EMAIL_GV_AUTO_CODE, '<strong>' . $id1 . '</strong>');
$gv_email .= "\n\n";
$gv_email .= EMAIL_GV_SHOP_FOOTER;
$gv_email_subject = EMAIL_GV_AUTO_SUBJECT;
$html_msg['EMAIL_GV_SHOP_FOOTER'] = EMAIL_GV_SHOP_FOOTER;
// send the email
zen_mail($send_name, $send_email_address, $gv_email_subject, nl2br($gv_email), STORE_NAME, EMAIL_FROM, $html_msg, 'gv_send');
// send additional emails
if (SEND_EXTRA_GV_CUSTOMER_EMAILS_TO_STATUS == '1' and SEND_EXTRA_GV_CUSTOMER_EMAILS_TO != '') {
$extra_info = email_collect_extra_info(ENTRY_NAME . $_POST['to_name'], ENTRY_EMAIL . $_POST['email'], $send_name, $account->fields['customers_email_address']);
$html_msg['EXTRA_INFO'] = $extra_info['HTML'];
zen_mail('', SEND_EXTRA_GV_CUSTOMER_EMAILS_TO, SEND_EXTRA_GV_CUSTOMER_EMAILS_TO_SUBJECT . ' ' . $gv_email_subject, $gv_email . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'gv_send_extra');
}
// do a fresh calculation after sending an email
$gv_query = "SELECT amount\n FROM " . TABLE_COUPON_GV_CUSTOMER . "\n WHERE customer_id = :customersID";
$gv_query = $db->bindVars($gv_query, ':customersID', $_SESSION['customer_id'], 'integer');
$gv_result = $db->Execute($gv_query);
$gv_current_balance = $currencies->format($gv_result->fields['amount']);
// validate entries
$gv_amount = (double) $gv_amount;
}
开发者ID:Southern-Exposure-Seed-Exchange,项目名称:Zencart-Bootstrap-Theme,代码行数:72,代码来源:tpl_checkout_success_default.php
示例14: send_order_email
//.........这里部分代码省略.........
if ($this->email_low_stock != '' and SEND_LOWSTOCK_EMAIL == '1') {
// send an email
$email_low_stock = SEND_EXTRA_LOW_STOCK_EMAIL_TITLE . "\n\n" . $this->email_low_stock;
zen_mail('', SEND_EXTRA_LOW_STOCK_EMAILS_TO, EMAIL_TEXT_SUBJECT_LOWSTOCK, $email_low_stock, STORE_OWNER, EMAIL_FROM, array('EMAIL_MESSAGE_HTML' => nl2br($email_low_stock)), 'low_stock', '', $pFormat);
}
// lets start with the email confirmation
// make an array to store the html version
$emailVars = array();
$emailVars['order'] = $this;
//intro area
if (!empty($this->customer['firstname'])) {
$customerName = $this->customer['firstname'] . ' ' . $this->customer['lastname'];
} else {
$customerName = BitUser::getDisplayNameFromHash(FALSE, $this->customer);
}
$email_order = EMAIL_TEXT_HEADER . EMAIL_TEXT_FROM . STORE_NAME . "\n\n" . $customerName . "\n\n" . EMAIL_THANKS_FOR_SHOPPING . "\n\n" . EMAIL_DETAILS_FOLLOW . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $pOrdersId . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $pOrdersId, 'SSL', false) . "\n\n";
$emailVars['EMAIL_TEXT_HEADER'] = EMAIL_TEXT_HEADER;
$emailVars['EMAIL_TEXT_FROM'] = EMAIL_TEXT_FROM;
$emailVars['INTRO_STORE_NAME'] = STORE_NAME;
$emailVars['EMAIL_THANKS_FOR_SHOPPING'] = EMAIL_THANKS_FOR_SHOPPING;
$emailVars['EMAIL_DETAILS_FOLLOW'] = EMAIL_DETAILS_FOLLOW;
$emailVars['INTRO_ORDER_NUM_TITLE'] = EMAIL_TEXT_ORDER_NUMBER;
$emailVars['INTRO_ORDER_NUMBER'] = $pOrdersId;
$emailVars['INTRO_DATE_TITLE'] = EMAIL_TEXT_DATE_ORDERED;
$emailVars['INTRO_DATE_ORDERED'] = strftime(DATE_FORMAT_LONG);
$emailVars['INTRO_URL_TEXT'] = EMAIL_TEXT_INVOICE_URL_CLICK;
$emailVars['INTRO_URL_VALUE'] = zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $pOrdersId, 'SSL', false);
//comments area
if (!empty($this->info['comments'])) {
$email_order .= zen_db_output($this->info['comments']) . "\n\n";
$emailVars['ORDER_COMMENTS'] = zen_db_output($this->info['comments']);
} else {
$emailVars['ORDER_COMMENTS'] = '';
}
//products area
$email_order .= EMAIL_TEXT_PRODUCTS . "\n" . EMAIL_SEPARATOR . "\n";
foreach (array_keys($this->contents) as $productsKey) {
$email_order .= $this->contents[$productsKey]['products_quantity'] . ' x ' . $this->contents[$productsKey]['name'] . ($this->contents[$productsKey]['model'] != '' ? ' (' . $this->contents[$productsKey]['model'] . ') ' : '') . ' = ' . $currencies->display_price($this->contents[$productsKey]['final_price'], $this->contents[$productsKey]['tax'], $this->contents[$productsKey]['products_quantity'], $this->getField('currency'), $this->getField('currency_value')) . ($this->contents[$productsKey]['onetime_charges'] != 0 ? "\n" . TEXT_ONETIME_CHARGES_EMAIL . $currencies->display_price($this->contents[$productsKey]['onetime_charges'], $this->contents[$productsKey]['tax'], 1) : '');
foreach (array_keys($this->contents[$productsKey]['attributes']) as $j) {
$optionValues = zen_get_option_value((int) $this->contents[$productsKey]['attributes'][$j]['options_id'], (int) $this->contents[$productsKey]['attributes'][$j]['options_values_id']);
$email_order .= "\n + " . $optionValues['products_options_name'] . ' ' . zen_decode_specialchars($this->contents[$productsKey]['attributes'][$j]['value']);
}
$email_order .= "\n\n";
}
$email_order .= EMAIL_SEPARATOR . "\n";
$emailVars['PRODUCTS_TITLE'] = EMAIL_TEXT_PRODUCTS;
if (!empty($this->products_ordered_html)) {
$emailVars['PRODUCTS_DETAIL'] = '<table class="product-details" border="0" width="100%" cellspacing="0" cellpadding="2">' . $this->products_ordered_html . '</table>';
}
//order totals area
$html_ot = '<td class="order-totals-text alignright" width="100%">' . ' ' . '</td><td class="order-totals-num alignright" nowrap="nowrap">' . '---------' . '</td></tr><tr>';
for ($i = 0, $n = sizeof($order_totals); $i < $n; $i++) {
$email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
$html_ot .= '<td class="order-totals-text" align="right" width="100%">' . $order_totals[$i]['title'] . '</td><td class="order-totals-num" align="right" nowrap="nowrap">' . $order_totals[$i]['text'] . '</td></tr><tr>';
}
$emailVars['ORDER_TOTALS'] = '<table border="0" width="100%" cellspacing="0" cellpadding="2">' . $html_ot . '</table>';
//addresses area: Delivery
$emailVars['HEADING_ADDRESS_INFORMATION'] = tra('Address Information');
$emailVars['ADDRESS_DELIVERY_TITLE'] = EMAIL_TEXT_DELIVERY_ADDRESS;
$emailVars['ADDRESS_DELIVERY_DETAIL'] = $this->content_type != 'virtual' ? zen_address_label($this->customer['user_id'], $this->delivery, true, '', "<br />") : 'n/a';
$emailVars['SHIPPING_METHOD_TITLE'] = HEADING_SHIPPING_METHOD;
$emailVars['SHIPPING_METHOD_DETAIL'] = zen_not_null($this->info['shipping_method']) ? $this->info['shipping_method'] : 'n/a';
if ($this->content_type != 'virtual') {
$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . zen_address_format($this->delivery['format_id'], $this->delivery, FALSE, '', "\n") . "\n\n";
}
//addresses area: Billing
$email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . zen_address_format($this->billing['format_id'], $this->billing, FALSE, '', "\n") . "\n\n";
$emailVars['ADDRESS_BILLING_TITLE'] = EMAIL_TEXT_BILLING_ADDRESS;
$emailVars['ADDRESS_BILLING_DETAIL'] = zen_address_label($this->customer['user_id'], $this->billing, true, '', "<br />");
$emailVars['PAYMENT_METHOD_TITLE'] = $emailVars['PAYMENT_METHOD_DETAIL'] = $emailVars['PAYMENT_METHOD_FOOTER'] = '';
if (!empty($_SESSION['payment']) && is_object($GLOBALS[$_SESSION['payment']])) {
$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n";
$payment_class = $_SESSION['payment'];
$email_order .= $GLOBALS[$payment_class]->title . "\n\n";
if (!empty($GLOBALS[$payment_class]->email_footer)) {
$email_order .= $GLOBALS[$payment_class]->email_footer . "\n\n";
}
$emailVars['PAYMENT_METHOD_TITLE'] = EMAIL_TEXT_PAYMENT_METHOD;
$emailVars['PAYMENT_METHOD_DETAIL'] = $GLOBALS[$payment_class]->title;
$emailVars['PAYMENT_METHOD_FOOTER'] = !empty($GLOBALS[$payment_class]->email_footer) ? $GLOBALS[$payment_class]->email_footer : '';
}
// include disclaimer
$email_order .= "\n-----\n" . sprintf(EMAIL_DISCLAIMER, STORE_OWNER_EMAIL_ADDRESS) . "\n\n";
// include copyright
$email_order .= "\n-----\n" . EMAIL_FOOTER_COPYRIGHT . "\n\n";
while (strstr($email_order, ' ')) {
$email_order = str_replace(' ', ' ', $email_order);
}
$emailVars['EMAIL_FIRST_NAME'] = $this->getFirstName();
// $emailVars['EMAIL_LAST_NAME'] = $this->customer['lastname'];
// $emailVars['EMAIL_TEXT_HEADER'] = EMAIL_TEXT_HEADER;
$emailVars['EXTRA_INFO'] = '';
zen_mail($customerName, $pEmailRecipient, EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $pOrdersId, $email_order, STORE_NAME, EMAIL_FROM, $emailVars, 'checkout', '', $pFormat);
// send additional emails
if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
$extra_info = email_collect_extra_info('', '', $customerName, $this->customer['email_address'], $this->customer['telephone']);
$emailVars['EXTRA_INFO'] = $extra_info['HTML'];
zen_mail('', SEND_EXTRA_ORDER_EMAILS_TO, tra('[NEW ORDER]') . ' ' . EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $pOrdersId, $email_order . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $emailVars, 'checkout_extra', '', $pFormat);
}
}
示例15: send_order_email
function send_order_email($zf_insert_id, $zf_mode)
{
global $currencies, $order_totals;
// print_r($this);
// die();
if ($this->email_low_stock != '' and SEND_LOWSTOCK_EMAIL == '1') {
// send an email
$email_low_stock = SEND_EXTRA_LOW_STOCK_EMAIL_TITLE . "\n\n" . $this->email_low_stock;
zen_mail('', SEND_EXTRA_LOW_STOCK_EMAILS_TO, EMAIL_TEXT_SUBJECT_LOWSTOCK, $email_low_stock, STORE_OWNER, EMAIL_FROM, array('EMAIL_MESSAGE_HTML' => nl2br($email_low_stock)), 'low_stock');
}
// lets start with the email confirmation
// make an array to store the html version
$html_msg = array();
//intro area
$email_order = EMAIL_TEXT_HEADER . EMAIL_TEXT_FROM . STORE_NAME . "\n\n" . $this->customer['firstname'] . ' ' . $this->customer['lastname'] . EMAIL_GREET . "\n\n" . EMAIL_THANKS_FOR_SHOPPING . "\n" . EMAIL_DETAILS_FOLLOW . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $zf_insert_id . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n" . ($html_msg['EMAIL_TEXT_HEADER'] = EMAIL_TEXT_HEADER);
$html_msg['EMAIL_TEXT_FROM'] = EMAIL_TEXT_FROM;
$html_msg['INTRO_STORE_NAME'] = STORE_NAME;
$html_msg['EMAIL_THANKS_FOR_SHOPPING'] = EMAIL_THANKS_FOR_SHOPPING;
$html_msg['EMAIL_DETAILS_FOLLOW'] = EMAIL_DETAILS_FOLLOW;
$html_msg['INTRO_ORDER_NUM_TITLE'] = EMAIL_TEXT_ORDER_NUMBER;
$html_msg['INTRO_ORDER_NUMBER'] = $zf_insert_id;
$html_msg['INTRO_DATE_TITLE'] = EMAIL_TEXT_DATE_ORDERED;
$html_msg['INTRO_DATE_ORDERED'] = strftime(DATE_FORMAT_LONG);
//comments area
if ($this->info['comments']) {
$email_order .= zen_db_output($this->info['comments']) . "\n\n";
$html_msg['ORDER_COMMENTS'] = zen_db_output($this->info['comments']);
} else {
$html_msg['ORDER_COMMENTS'] = '';
}
//products area
$email_order .= EMAIL_TEXT_PRODUCTS . "\n" . EMAIL_SEPARATOR . "\n" . $this->products_ordered . EMAIL_SEPARATOR . "\n";
$html_msg['PRODUCTS_TITLE'] = EMAIL_TEXT_PRODUCTS;
$html_msg['PRODUCTS_DETAIL'] = '<table class="product-details" border="0" width="100%" cellspacing="0" cellpadding="2">' . $this->products_ordered_html . '</table>';
//order totals area
$html_ot .= '<td class="order-totals-text" align="right" width="100%">' . ' ' . '</td><td class="order-totals-num" align="right" nowrap="nowrap">' . '---------' . '</td></tr><tr>';
for ($i = 0, $n = sizeof($order_totals); $i < $n; $i++) {
$email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
$html_ot .= '<td class="order-totals-text" align="right" width="100%">' . $order_totals[$i]['title'] . '</td><td class="order-totals-num" align="right" nowrap="nowrap">' . $order_totals[$i]['text'] . '</td></tr><tr>';
}
$html_msg['ORDER_TOTALS'] = '<table border="0" width="100%" cellspacing="0" cellpadding="2">' . $html_ot . '</table>';
$html_msg['HEADING_ADDRESS_INFORMATION'] = HEADING_ADDRESS_INFORMATION;
$html_msg['ADDRESS_CUSTOMER_TITLE'] = EMAIL_TEXT_CUSTOMER_ADDRESS;
$html_msg['ADDRESS_CUSTOMER_DETAIL'] = zen_address_label($_SESSION['customer_id'], $_SESSION['customer_default_address_id'], true, '', "<br />") . '<br />' . ENTRY_EMAIL_ADDRESS . $this->customer['email_address'];
$email_order .= "\n" . EMAIL_TEXT_CUSTOMER_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . zen_address_label($_SESSION['customer_id'], $_SESSION['customer_default_address_id'], 0, '', "\n") . "\n" . ENTRY_EMAIL_ADDRESS . $this->customer['email_address'] . "\n";
//addresses area: Delivery
$html_msg['ADDRESS_DELIVERY_TITLE'] = EMAIL_TEXT_DELIVERY_ADDRESS;
$html_msg['ADDRESS_DELIVERY_DETAIL'] = $this->content_type != 'virtual' ? zen_address_label($_SESSION['customer_id'], $_SESSION['sendto'], true, '', "<br />") : 'n/a';
$html_msg['SHIPPING_METHOD_TITLE'] = HEADING_SHIPPING_METHOD;
$html_msg['SHIPPING_METHOD_DETAIL'] = zen_not_null($this->info['shipping_method']) ? $this->info['shipping_method'] : 'n/a';
if ($this->content_type != 'virtual') {
$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . zen_address_label($_SESSION['customer_id'], $_SESSION['sendto'], 0, '', "\n") . "\n";
}
//addresses area: Billing
$email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . zen_address_label($_SESSION['customer_id'], $_SESSION['billto'], 0, '', "\n") . "\n\n";
$html_msg['ADDRESS_BILLING_TITLE'] = EMAIL_TEXT_BILLING_ADDRESS;
$html_msg['ADDRESS_BILLING_DETAIL'] = zen_address_label($_SESSION['customer_id'], $_SESSION['billto'], true, '', "<br />");
if (is_object($GLOBALS[$_SESSION['payment']])) {
$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n";
$payment_class = $_SESSION['payment'];
$email_order .= $GLOBALS[$payment_class]->title . "\n\n";
if ($GLOBALS[$payment_class]->email_footer) {
$email_order .= $GLOBALS[$payment_class]->email_footer . "\n\n";
}
} else {
$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n";
$email_order .= PAYMENT_METHOD_GV . "\n\n";
}
$html_msg['PAYMENT_METHOD_TITLE'] = EMAIL_TEXT_PAYMENT_METHOD;
$html_msg['PAYMENT_METHOD_DETAIL'] = is_object($GLOBALS[$_SESSION['payment']]) ? $GLOBALS[$payment_class]->title : PAYMENT_METHOD_GV;
$html_msg['PAYMENT_METHOD_FOOTER'] = is_object($GLOBALS[$_SESSION['payment']]) ? $GLOBALS[$payment_class]->email_footer : '';
$html_msg['EMAIL_VISITORS_DISCLAIMER'] = sprintf(EMAIL_VISITORS_DISCLAIMER, '<a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">' . STORE_OWNER_EMAIL_ADDRESS . ' </a>');
// include disclaimer
$email_order .= "\n-----\n" . sprintf(EMAIL_VISITORS_DISCLAIMER, STORE_OWNER_EMAIL_ADDRESS) . "\n\n";
// include copyright
$email_order .= "\n-----\n" . EMAIL_FOOTER_COPYRIGHT . "\n\n";
while (strstr($email_order, ' ')) {
$email_order = str_replace(' ', ' ', $email_order);
}
$html_msg['EMAIL_FIRST_NAME'] = $this->customer['firstname'];
$html_msg['EMAIL_LAST_NAME'] = $this->customer['lastname'];
$html_msg['EMAIL_GREET'] = EMAIL_GREET;
// $html_msg['EMAIL_TEXT_HEADER'] = EMAIL_TEXT_HEADER;
$html_msg['EXTRA_INFO'] = '';
zen_mail($this->customer['firstname'] . ' ' . $this->customer['lastname'], $this->customer['email_address'], EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, $email_order, STORE_NAME, EMAIL_FROM, $html_msg, 'checkout_visitors');
// send additional emails
if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
$extra_info = email_collect_extra_info('', '', $this->customer['firstname'] . ' ' . $this->customer['lastname'], $this->customer['email_address'], $this->customer['telephone']);
$html_msg['EXTRA_INFO'] = $extra_info['HTML'];
zen_mail('', SEND_EXTRA_ORDER_EMAILS_TO, SEND_EXTRA_VISITORS_NEW_ORDERS_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, $email_order . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'checkout_visitors_extra');
}
}