本文整理汇总了PHP中tep_mail函数的典型用法代码示例。如果您正苦于以下问题:PHP tep_mail函数的具体用法?PHP tep_mail怎么用?PHP tep_mail使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tep_mail函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendUnderpaidReminder
function sendUnderpaidReminder($order, $open_amount, $language)
{
global $class_o, $class_jo;
$status = '1';
$order_id = $order['orders_id'];
$order_no = $order['orders_no'];
$to_name = $order['customers_name'];
$to_email_address = $order['customers_email_address'];
$order_currency = $order['currency'];
$from_email_name = FROM_EMAIL_NAME;
$from_email_address = FROM_EMAIL_ADDRESS;
include DIR_FS_MINIERP . DIR_WS_EMAILS . $language . '/vorkasse-orders-reminder-underpaid.php';
$sent = tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address);
if ($sent) {
$products = $class_o->retrieveProducts($order_id);
foreach ($products as $p) {
if ($p['status'] == $status) {
if ($order['order_type'] == Order::ORDER_TYPE_JULIE_GRACE) {
$class_o->updateProductStatusNotification($p['orders_products_id'], $status);
} elseif ($order['order_type'] == Order::ORDER_TYPE_SALES_PARTNER) {
$class_jo->updateProductStatusNotification($p['jng_sp_orders_items_id'], $status);
}
}
}
}
//TODO: new method using new email template
//or maybe it is not needed after using new email template
//(already inform open amount)
}
示例2: sendMessageToAdmin
/**
* Function to send message to responsible PIC
* @global type $TB_CATUPLOAD_ADD_SUPERVISORS
* @param type $messages
*/
function sendMessageToAdmin($messages)
{
global $TB_CATUPLOAD_ADD_SUPERVISORS;
$send_message = '';
$contain_error = false;
if (!is_array($messages)) {
$messages = explode(',', $messages);
}
if (count($messages) > 0) {
$subject = 'TRADEBYTE CAT UPLOAD STATUS';
$send_message = 'Messages on ' . date("d.m.Y H:i:s") . '';
foreach ($messages as $type => $message) {
$color = '';
if ($type == 'e') {
$color = 'red';
$contain_error = true;
} elseif ($type == 's') {
$color = 'green';
}
$added_style = $color != '' ? ' style="color:' . $color . ';"' : '';
$send_message .= '<div' . $added_style . '> <br/>' . $message . '</div>';
}
if ($contain_error) {
$subject .= ' WITH ERROR';
}
//SEND EMAIL TO IT AND CAT UPLOAD SUPERVISORS
tep_mail(EMAIL_NAME_DEBUGR, EMAIL_ADDRESS_DEBUGR, $subject, $send_message, FROM_EMAIL_NAME, FROM_EMAIL_ADDRESS, false);
foreach ($TB_CATUPLOAD_ADD_SUPERVISORS as $supervisor_name => $supervisor_email) {
tep_mail($supervisor_name, $supervisor_email, $subject, $send_message, FROM_EMAIL_NAME, FROM_EMAIL_ADDRESS, false);
}
echo $send_message;
}
}
示例3: tep_db_error
function tep_db_error($query, $errno, $error)
{
global $_SERVER;
if (in_array(basename($_SERVER['PHP_SELF']), array('products_upload.php', 'discounts.php'))) {
tep_mail('sivkov@setbook.ru', 'sivkov@setbook.ru', 'ошибка', '<strong>' . $errno . ' - ' . $error . '<br /><br />' . $query . '</strong>', STORE_NAME, STORE_OWNER_EMAIL_ADDRESS);
}
die('<font color="#000000"><strong>' . $errno . ' - ' . $error . '<br /><br />' . $query . '<br /><br /><small><font color="#ff0000">[TEP STOP]</font></small><br /><br /></strong></font>');
}
示例4: sendReports
function sendReports($subject, $message, $target)
{
//Send mail to IT and members of this report
//echo "SUBJECT: $subject <br/>MESSAGE: $message<br/>TARGET: " . var_dump(',', $target);die();
tep_mail(EMAIL_NAME_DEBUGR, EMAIL_ADDRESS_DEBUGR, $subject, $message, FROM_EMAIL_NAME, FROM_EMAIL_ADDRESS, false);
foreach ($target as $member) {
tep_mail($member['username'], $member['email'], $subject, $message, FROM_EMAIL_NAME, FROM_EMAIL_ADDRESS, false);
}
}
示例5: GetStockMaat
function GetStockMaat($product_id, $maat, $data)
{
if (SOAP_SERVER != '') {
$get_model_query = tep_db_query("select products_model, products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int) $product_id . "'");
$get_model = tep_db_fetch_array($get_model_query);
$client = new SoapClient(null, array('location' => SOAP_SERVER, 'uri' => SOAP_NAMESPACE, 'trace' => true, 'connection_timeout' => 5));
$response = $client->__doRequest('<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:stockRequest>
<Artikel>' . $get_model['products_model'] . '</Artikel>
<Maat>' . $maat . '</Maat>
</ns1:stockRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>', SOAP_SERVER, SOAP_NAMESPACE, SOAP_1_2);
if ($response) {
$dom = new DOMDocument();
$dom->loadXML($response);
$xPath = new DOMXPath($dom);
if ($xPath->evaluate("//Status")->item(0)->nodeValue == 0) {
$result = $xPath->evaluate("//StatusTekst")->item(0)->nodeValue;
} else {
//Article contains XML inside, need to reparse it
$dom->loadXML('<xml>' . $xPath->evaluate("//Artikel")->item(0)->nodeValue . '</xml>');
$xPath = new DOMXPath($dom);
$elements = $xPath->evaluate("//xml/*");
if ($maat == '') {
foreach ($elements as $element) {
if ($element->nodeName == 'Maten') {
continue;
}
if ($element->nodeName == $data) {
$result .= $element->nodeValue . ' ';
}
}
} else {
$maats = $xPath->evaluate("//xml/Maten/Maat");
if ($maats->length > 0) {
foreach ($maats as $maat) {
$elements = $xPath->evaluate("child::*", $maat);
foreach ($elements as $element) {
if ($element->nodeName == $data) {
$result .= $element->nodeValue;
}
}
}
}
}
}
} else {
tep_mail('ABO Service Monitor', 'mattias@aboservice.be', 'SOAP Server offline', 'De SOAP Server op ' . STORE_NAME . ' - ' . HTTP_SERVER . ' is offline', STORE_NAME, STORE_OWNER_EMAIL_ADDRESS);
$result .= $get_model['products_quantity'];
}
} else {
$result = 'No SOAP server defined. Please check configuration';
}
return $result;
}
示例6: send_order_update_email
/**
* Method send email about order update to customer
*
* @param order $order Order
*/
public function send_order_update_email(OsCommerceOrder $order)
{
if (SEND_EMAILS != 'true') {
return;
}
$email_text = $this->get_email_text($order);
tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
if (strlen(SEND_EXTRA_ORDER_EMAILS_TO) > 0) {
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
}
}
示例7: SoapCustomerPriceRequest
function SoapCustomerPriceRequest($product_model, $abo_id, $aantal)
{
//FB::info('soap-message'.$product_model.'---'.$maat.'---'.$abo_id.'---'.$aantal);
$client = new SoapClient(null, array('location' => SOAP_SERVER, 'uri' => SOAP_NAMESPACE, 'trace' => true, 'connection_timeout' => 5));
$response = $client->__doRequest('<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:PriceRequest>
<ABO_ID>' . $abo_id . '</ABO_ID>
<Artikel>' . $product_model . '</Artikel>
<Aantal>' . $aantal . '</Aantal>
</ns1:PriceRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>', SOAP_SERVER, SOAP_NAMESPACE, SOAP_1_2);
if ($response) {
$dom = new DOMDocument();
$dom->loadXML($response);
$xPath = new DOMXPath($dom);
$result = array();
if ($xPath->evaluate("//Status")->item(0)->nodeValue == 0) {
$result = $xPath->evaluate("//StatusTekst")->item(0)->nodeValue;
} else {
$prijsCategorie = '';
$kortingGlobaal = '';
$KLANT = new DOMDocument();
$KLANT->loadXML('<xml>' . $xPath->evaluate("//Klant")->item(0)->nodeValue . '</xml>');
$klantPath = new DOMXPath($KLANT);
$klant = $klantPath->evaluate("//xml/*");
foreach ($klant as $categorie) {
if ($categorie->nodeName == 'PrijsCategorie') {
$prijsCategorie = 'Prijs' . $categorie->nodeValue;
}
}
$result['Klant']['prijsCategorie'] = $prijsCategorie;
$dom->loadXML('<xml>' . $xPath->evaluate("//Artikel")->item(0)->nodeValue . '</xml>');
$xPath = new DOMXPath($dom);
$elements = $xPath->evaluate("//xml/PrijzenTabel/*");
$CategoriePrijs = '';
foreach ($elements as $element) {
if ($element->nodeName == $prijsCategorie) {
$CategoriePrijs = $element->nodeValue;
}
}
}
return $CategoriePrijs;
} else {
tep_mail('ABO Service Monitor', 'mattias@aboservice.be', 'SOAP Server offline', 'De SOAP Server op ' . STORE_NAME . ' - ' . HTTP_SERVER . ' is offline', STORE_NAME, STORE_OWNER_EMAIL_ADDRESS);
//$result .= Translate('Server offline');
}
}
示例8: sentMailToCust
function sentMailToCust($sp_id, $to_name, $to_email_address, $oid)
{
$result = '';
include DIR_FS_MINIERP . DIR_WS_EMAILS . 'german/otto.de-orders-sent-tohh.php';
$from_email_name = FROM_EMAIL_NAME;
$from_email_address = FROM_EMAIL_ADDRESS;
if (!is_null($to_email_address) && $to_email_address != '') {
$sent = tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address);
if ($sent) {
tep_mail(EMAIL_NAME_SERVICE, EMAIL_ADDRESS_SERVICE, $email_subject, $email_text, $from_email_name, $from_email_address);
$result = "{$to_name} ({$to_email_address}) - ({$oid})";
}
}
return $result;
}
示例9: sendMessageToAdmin
function sendMessageToAdmin($message, $is_error_message, $exit = false)
{
global $SP_NECKERMANN_CATUPLOAD_ADD_SUPERVISORS;
$subject = 'NM.DE CAT UPLOAD ' . ($is_error_message ? 'ERROR' : 'SUCCESS');
$color = $is_error_message ? 'red' : 'green';
$message = '<div style="color:' . $color . ';">Messages on ' . date("d.m.Y H:i:s") . ' : <br/><br/>' . $message . '</div>';
//SEND EMAIL TO NM.DE CAT UPLOAD DEBUGGER
tep_mail(EMAIL_NAME_DEBUGR, EMAIL_ADDRESS_DEBUGR, $subject, $message, FROM_EMAIL_NAME, FROM_EMAIL_ADDRESS, false);
//SEND EMAIL TO NM.DE CAT UPLOAD ADDITIONAL SUPERVISORS
foreach ($SP_NECKERMANN_CATUPLOAD_ADD_SUPERVISORS as $supervisor_name => $supervisor_email) {
tep_mail($supervisor_name, $supervisor_email, $subject, $message, FROM_EMAIL_NAME, FROM_EMAIL_ADDRESS, false);
}
echo $message;
if ($exit) {
tep_db_close();
exit;
}
}
示例10: tep_create_random_value
*/
require 'includes/application_top.php';
require DIR_WS_LANGUAGES . $osC_Session->value('language') . '/' . FILENAME_PASSWORD_FORGOTTEN;
if (isset($_GET['action']) && $_GET['action'] == 'process') {
$Qcheck = $osC_Database->query('select customers_id, customers_firstname, customers_lastname, customers_password from :table_customers where customers_email_address = :customers_email_address');
$Qcheck->bindTable(':table_customers', TABLE_CUSTOMERS);
$Qcheck->bindValue(':customers_email_address', $_POST['email_address']);
$Qcheck->execute();
if ($Qcheck->numberOfRows()) {
$new_password = tep_create_random_value(ACCOUNT_PASSWORD);
$Qupdate = $osC_Database->query('update :table_customers set customers_password = :customers_password where customers_id = :customers_id');
$Qupdate->bindTable(':table_customers', TABLE_CUSTOMERS);
$Qupdate->bindValue(':customers_password', tep_encrypt_password($new_password));
$Qupdate->bindInt(':customers_id', $Qcheck->valueInt('customers_id'));
$Qupdate->execute();
tep_mail($Qcheck->valueProtected('customers_firstname') . ' ' . $Qcheck->valueProtected('customers_lastname'), $_POST['email_address'], EMAIL_PASSWORD_REMINDER_SUBJECT, sprintf(EMAIL_PASSWORD_REMINDER_BODY, $new_password), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
$messageStack->add_session('login', SUCCESS_PASSWORD_SENT, 'success');
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
} else {
$messageStack->add('password_forgotten', TEXT_NO_EMAIL_ADDRESS_FOUND);
}
}
$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_LOGIN, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL'));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php
echo HTML_PARAMS;
?>
>
<head>
示例11: Copyright
mail manager for oscommerce
Copyright (c) 2011 Niora http://www.css-oscommerce.com
Released under the GNU General Public License
*/
//get status of mail manager status update email
$mail_manager_status_query = tep_db_query("select status, template, htmlcontent, txtcontent from " . TABLE_MM_RESPONSEMAIL . " where mail_id = '3'");
$mail_manager_status = tep_db_fetch_array($mail_manager_status_query);
if (isset($mail_manager_status['status']) && $mail_manager_status['status'] == '1') {
//retrieve html and txt headers
$header_query = tep_db_query("select htmlheader, htmlfooter, txtheader, txtfooter from " . TABLE_MM_TEMPLATES . " where title = '" . $mail_manager_status['template'] . "'");
$header = tep_db_fetch_array($header_query);
//build email
$output_content_html = $header['htmlheader'] . $mail_manager_status['htmlcontent'] . $header['htmlfooter'];
$output_content_txt = $header['txtheader'] . $mail_manager_status['txtcontent'] . $header['txtfooter'];
// define subject
$output_subject = EMAIL_PASSWORD_RESET_SUBJECT;
//define values for placeholder variables
$firstname = $check_customer['customers_firstname'];
$lastname = $check_customer['customers_lastname'];
$newpwandmsg = sprintf(EMAIL_PASSWORD_RESET_BODY, $reset_key_url);
//define placeholders.
$placeholders = array('$storeurl', '$storename', '$storeemail', '$customerfirstname', '$customerlastname', '$customeremail', '$emailsubject', '$newpwandmsg');
$values = array(HTTP_CATALOG_SERVER, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS, $firstname, $lastname, $email_address, EMAIL_PASSWORD_RESET_SUBJECT, $newpwandmsg);
$output_content_html = str_replace($placeholders, $values, $output_content_html);
$output_content_txt = str_replace($placeholders, $values, $output_content_txt);
//send email
tep_mm_sendmail($check_customer['customers_firstname'] . ' ' . $check_customer['customers_lastname'], $email_address, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $output_subject, $output_content_html, $output_content_txt);
//if mail manager status update email 'inactive', or value=0, process normally via oscommerce
} else {
tep_mail($check_customer['customers_firstname'] . ' ' . $check_customer['customers_lastname'], $email_address, EMAIL_PASSWORD_RESET_SUBJECT, sprintf(EMAIL_PASSWORD_RESET_BODY, $reset_key_url), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
}
示例12: sendDebugEmail
function sendDebugEmail($response = array())
{
if (tep_not_null(MODULE_PAYMENT_AUTHORIZENET_CC_AIM_DEBUG_EMAIL)) {
$email_body = '';
if (!empty($response)) {
$email_body .= 'RESPONSE:' . "\n\n" . print_r($response, true) . "\n\n";
}
if (!empty($_POST)) {
if (isset($_POST['cc_number_nh-dns'])) {
$_POST['cc_number_nh-dns'] = 'XXXX' . substr($_POST['cc_number_nh-dns'], -4);
}
if (isset($_POST['cc_ccv_nh-dns'])) {
$_POST['cc_ccv_nh-dns'] = 'XXX';
}
if (isset($_POST['cc_expires_month'])) {
$_POST['cc_expires_month'] = 'XX';
}
if (isset($_POST['cc_expires_year'])) {
$_POST['cc_expires_year'] = 'XX';
}
$email_body .= '$_POST:' . "\n\n" . print_r($_POST, true) . "\n\n";
}
if (!empty($_GET)) {
$email_body .= '$_GET:' . "\n\n" . print_r($_GET, true) . "\n\n";
}
if (!empty($email_body)) {
tep_mail('', MODULE_PAYMENT_AUTHORIZENET_CC_AIM_DEBUG_EMAIL, 'Authorize.net AIM Debug E-Mail', trim($email_body), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
}
}
}
示例13: tep_db_affected_rows
$total_reset_sp = tep_db_affected_rows();
$logger->write("- TOTAL RESET SP = {$total_reset_sp} ");
if ($total_reset_sp > 0) {
$logger->write(implode(", ", $arr_jo));
}
} else {
$logger->write("Update is skipped because total products found ({$num_total}) is above the allowed limit ({$max_total_orders_allowed})");
//Notify IT Team
$subject = 'IMPORTANT & URGENT: Reprint Picklist is Skipped!';
$send_message = "Reprint is running in UPDATE mode. However, triggering Picklist reprint is skipped because total products found ({$num_total}) is above the allowed limit ({$max_total_orders_allowed})";
$send_message .= '<br /><br />Please check if it is caused by Easylog Upload issue or we really need to reprint them!';
tep_mail(EMAIL_NAME_DEBUGR, EMAIL_ADDRESS_DEBUGR, $subject, $send_message, FROM_EMAIL_NAME, FROM_EMAIL_ADDRESS, false);
}
} else {
$logger->write("Running in MONITORING MODE (orders are not updated for reprint)");
if ($num_total > 0) {
if ($num_op > 0) {
$logger->write(implode(", ", $arr_op));
}
if ($num_jo > 0) {
$logger->write(implode(", ", $arr_jo));
}
//Notify IT Team
$subject = 'IMPORTANT & URGENT: Unsent products from Pick & Pack List found!';
$send_message = "Reprint is running in MONITORING mode, no orders are updated. Manobo found {$num_total} products unsent from Pick & Pack List.";
$send_message .= '<br /><br />Please check if we have open Pick & Pack List or Easylog Upload issue or we really need to reprint them!';
tep_mail(EMAIL_NAME_DEBUGR, EMAIL_ADDRESS_DEBUGR, $subject, $send_message, FROM_EMAIL_NAME, FROM_EMAIL_ADDRESS, false);
}
}
$logger->close();
tep_db_close();
示例14: before_process
//.........这里部分代码省略.........
$sql_data_array = array('orders_id' => $order_id, 'orders_status_id' => MODULE_PAYMENT_MONEYBOOKERS_ORDER_STATUS_ID > 0 ? (int) MODULE_PAYMENT_MONEYBOOKERS_ORDER_STATUS_ID : (int) DEFAULT_ORDERS_STATUS_ID, 'date_added' => 'now()', 'customer_notified' => SEND_EMAILS == 'true' ? '1' : '0', 'comments' => $order->info['comments']);
tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);
// initialized for the email confirmation
$products_ordered = '';
$subtotal = 0;
$total_tax = 0;
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
// Stock Update - Joao Correia
if (STOCK_LIMITED == 'true') {
if (DOWNLOAD_ENABLED == 'true') {
$stock_query_raw = "SELECT products_quantity, pad.products_attributes_filename\n FROM " . TABLE_PRODUCTS . " p\n LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " pa\n ON p.products_id=pa.products_id\n LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad\n ON pa.products_attributes_id=pad.products_attributes_id\n WHERE p.products_id = '" . tep_get_prid($order->products[$i]['id']) . "'";
// Will work with only one option for downloadable products
// otherwise, we have to build the query dynamically with a loop
$products_attributes = $order->products[$i]['attributes'];
if (is_array($products_attributes)) {
$stock_query_raw .= " AND pa.options_id = '" . $products_attributes[0]['option_id'] . "' AND pa.options_values_id = '" . $products_attributes[0]['value_id'] . "'";
}
$stock_query = tep_db_query($stock_query_raw);
} else {
$stock_query = tep_db_query("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
}
if (tep_db_num_rows($stock_query) > 0) {
$stock_values = tep_db_fetch_array($stock_query);
// do not decrement quantities if products_attributes_filename exists
if (DOWNLOAD_ENABLED != 'true' || !$stock_values['products_attributes_filename']) {
$stock_left = $stock_values['products_quantity'] - $order->products[$i]['qty'];
} else {
$stock_left = $stock_values['products_quantity'];
}
tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = '" . $stock_left . "' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
if ($stock_left < 1 && STOCK_ALLOW_CHECKOUT == 'false') {
tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
}
}
}
// Update products_ordered (for bestsellers list)
tep_db_query("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%d', $order->products[$i]['qty']) . " where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
//------insert customer choosen option to order--------
$attributes_exist = '0';
$products_ordered_attributes = '';
if (isset($order->products[$i]['attributes'])) {
$attributes_exist = '1';
for ($j = 0, $n2 = sizeof($order->products[$i]['attributes']); $j < $n2; $j++) {
if (DOWNLOAD_ENABLED == 'true') {
$attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename\n from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa\n left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad\n on pa.products_attributes_id=pad.products_attributes_id\n where pa.products_id = '" . $order->products[$i]['id'] . "'\n and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "'\n and pa.options_id = popt.products_options_id\n and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "'\n and pa.options_values_id = poval.products_options_values_id\n and popt.language_id = '" . $_SESSION['languages_id'] . "'\n and poval.language_id = '" . $_SESSION['languages_id'] . "'";
$attributes = tep_db_query($attributes_query);
} else {
$attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $_SESSION['languages_id'] . "' and poval.language_id = '" . $_SESSION['languages_id'] . "'");
}
$attributes_values = tep_db_fetch_array($attributes);
$products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name'];
}
}
//------insert customer choosen option eof ----
$total_weight += $order->products[$i]['qty'] * $order->products[$i]['weight'];
$total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];
$total_cost += $total_products_price;
$products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";
}
// lets start with the email confirmation
$email_order = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $order_id . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $order_id, 'SSL', false) . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
if ($order->info['comments']) {
$email_order .= tep_db_output($order->info['comments']) . "\n\n";
}
$email_order .= EMAIL_TEXT_PRODUCTS . "\n" . EMAIL_SEPARATOR . "\n" . $products_ordered . EMAIL_SEPARATOR . "\n";
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";
}
if ($order->content_type != 'virtual') {
$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
}
$email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
if (is_object(${$payment})) {
$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n";
$payment_class = ${$payment};
$email_order .= $payment_class->title . "\n\n";
if ($payment_class->email_footer) {
$email_order .= $payment_class->email_footer . "\n\n";
}
}
tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
// send emails to other people
if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
}
// load the after_process function from the payment modules
$this->after_process();
$_SESSION['cart']->reset(true);
// unregister session variables used during checkout
unset($_SESSION['sendto']);
unset($_SESSION['billto']);
unset($_SESSION['shipping']);
unset($_SESSION['payment']);
unset($_SESSION['comments']);
unset($_SESSION[$this->_mbcartID]);
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));
} else {
tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
}
}
示例15: tep_mail
case '503':
$error_text = ERROR_503_DESC;
break;
case '504':
$error_text = ERROR_504_DESC;
break;
case '505':
$error_text = ERROR_505_DESC;
break;
default:
$error_text = UNKNOWN_ERROR_DESC;
break;
}
// Send the HTTP Error to Store Owner
if (EMAIL_HTTP_ERROR == 'true') {
tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_TEXT_SUBJECT, sprintf(EMAIL_BODY, HTTP_SERVER, $_GET['error_id'], $error_text, date("m/d/Y G:i:s"), HTTP_SERVER . $_SERVER['REQUEST_URI'], $_SERVER['REMOTE_ADDR'], $_SERVER['HTTP_USER_AGENT'], $_SERVER['$HTTP_REFERER']), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, '');
}
// PGM Edit to store in dbase
tep_db_query("insert into " . TABLE_HTTP_ERROR . " values ('', '" . $_GET['error_id'] . "', '" . HTTP_SERVER . $_SERVER['REQUEST_URI'] . "', '" . $_SERVER['REMOTE_ADDR'] . "', '" . $_SERVER['HTTP_USER_AGENT'] . "', '" . $_SERVER['$HTTP_REFERER'] . "', now())");
?>
<!-- body_text //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><?php
echo tep_draw_separator('pixel_trans.gif', '100%', '4');
?>
</td>
</tr>
<tr>
<td class="productinfo_header"><table border="0" width="100%" cellspacing="0" cellpadding="0">