Jump to content
Sign in to follow this  
Kevin.Dallas

admin order : status on send html

Recommended Posts

------------------------------------admin - orders.php------------------------------------

 

// lets start with the email confirmation
if (EMAIL_HTML == 'true') {
    require(DIR_FS_CATALOG . 'admin/includes/modules/htmlEmails/order_html.php');
    $email_order = $html_email;
}
if ((($check_status['orders_status'] != $status) || tep_not_null($comments) || tep_not_null($tracking_arr[$numkey]['number'])) && ($track_id_failed == 0)) {

  tep_db_query("update " . orders . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'");
  $customer_notified = '0';
  if (isset($_POST['notify']) && ($_POST['notify'] == 'on')) {
    $notify_comments = '';
    if (isset($_POST['notify_comments']) && ($_POST['notify_comments'] == 'on')) {
      $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n";
    }

    $email_order = $html_email;
//    $email_order = $email_products;


  $orders_query = tep_db_query("select orders_id from " . orders . " where orders_id = '" . tep_db_input($oID) . "'");
  $orders = tep_db_fetch_array($orders_query);

  $customer_info_query = tep_db_query("select customers_id from " . orders . " where orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "'");
  $customer_info = tep_db_fetch_array($customer_info_query);

    tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT . '- Order #' . tep_db_input($oID), nl2br($email_order), STORE_OWNER_INFO, STORE_OWNER_EMAIL_ADDRES);

    $customer_notified = '1';
  }

 

 

------------------------------------order_html.php------------------------------------

 

 

<?php
$walkwithme = array("\r\n", "\n\r", "\n", "\r", "\t"); 
 

$html_email = '

 

' . $order->products[$i]['model'] . '
' . tep_display_tax_value($order->products[$i]['tax']) . '
' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . '
' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax'], true), true, $order->info['currency'], $order->info['currency_value']) . '
' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</strong></td>' . "\n" .
' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax'], true) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '
 


';


$html_email = str_replace($walkwithme , '', $html_email);
?>

 

 

 

Untitled.thumb.jpg.a671ec2e3161bb83904cb1c4d4b2187b.jpg

Share this post


Link to post
Share on other sites
On 10/31/2019 at 12:01 PM, Kevin.Dallas said:

------------------------------------admin - orders.php------------------------------------

 

// lets start with the email confirmation
if (EMAIL_HTML == 'true') {
    require(DIR_FS_CATALOG . 'admin/includes/modules/htmlEmails/order_html.php');
    $email_order = $html_email;
}
if ((($check_status['orders_status'] != $status) || tep_not_null($comments) || tep_not_null($tracking_arr[$numkey]['number'])) && ($track_id_failed == 0)) {

  tep_db_query("update " . orders . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'");
  $customer_notified = '0';
  if (isset($_POST['notify']) && ($_POST['notify'] == 'on')) {
    $notify_comments = '';
    if (isset($_POST['notify_comments']) && ($_POST['notify_comments'] == 'on')) {
      $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n";
    }

    $email_order = $html_email;
//    $email_order = $email_products;


  $orders_query = tep_db_query("select orders_id from " . orders . " where orders_id = '" . tep_db_input($oID) . "'");
  $orders = tep_db_fetch_array($orders_query);

  $customer_info_query = tep_db_query("select customers_id from " . orders . " where orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "'");
  $customer_info = tep_db_fetch_array($customer_info_query);

    tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT . '- Order #' . tep_db_input($oID), nl2br($email_order), STORE_OWNER_INFO, STORE_OWNER_EMAIL_ADDRES);

    $customer_notified = '1';
  }

 

 

------------------------------------order_html.php------------------------------------

 

 

<?php
$walkwithme = array("\r\n", "\n\r", "\n", "\r", "\t"); 
 

$html_email = '

 

' . $order->products[$i]['model'] . '
' . tep_display_tax_value($order->products[$i]['tax']) . '
' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . '
' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax'], true), true, $order->info['currency'], $order->info['currency_value']) . '
' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</strong></td>' . "\n" .
' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax'], true) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '
 


';


$html_email = str_replace($walkwithme , '', $html_email);
?>

 

 

 

Untitled.thumb.jpg.a671ec2e3161bb83904cb1c4d4b2187b.jpg

I cannot get the products to show 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×