Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

add more information to order-email


coes

Recommended Posts

Posted

i'd like to add more information to the products in the email, that the customer gets, when he ordered sth.

 

in detail i'd like to add the "manufacturer_name" and the "date_added" for each product he ordered.

 

additionally, i want these 2 informations to be shown in the admin-area in orders.php

 

can anybody help???

 

 

btw: i managed to show them in the shopping_cart.php (see below) but i havent found a solution for the mail and admin-area!

 

 

// MODELL start	
$manufacturer_query = tep_db_query("SELECT p.products_id, p.manufacturers_id, m.manufacturers_id, m.manufacturers_name from " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS . " p where p.products_id = '" . $products[$i]['id'] . "' and p.manufacturers_id = m.manufacturers_id");

   if (tep_db_num_rows($manufacturer_query)) {
     $manufacturer = tep_db_fetch_array($manufacturer_query);
     $manufacturers_name = $manufacturer['manufacturers_name'];
           }
           else{
             $manufacturers_name = '';
           }
// MODELL end  

// DATE ADDED start	
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $products[$i]['id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

$product_info = tep_db_fetch_array($product_info_query);

$added_name = $product_info['products_date_added'];
// DATE ADDED end  

  • 2 weeks later...
Posted

Hi, first of all sorry about my bad english... I would like to know how to add the manufacturers name into the shopping_cart.php. I?ve been trying to use your code but I cant make it work.

 

I only used this part becouse Im only interested in showing the manufactures name

 

// MODELL start 
$manufacturer_query = tep_db_query("SELECT p.products_id, p.manufacturers_id, m.manufacturers_id, m.manufacturers_name from " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS . " p where p.products_id = '" . $products[$i]['id'] . "' and p.manufacturers_id = m.manufacturers_id");

  if (tep_db_num_rows($manufacturer_query)) {
    $manufacturer = tep_db_fetch_array($manufacturer_query);
    $manufacturers_name = $manufacturer['manufacturers_name'];
          }
          else{
            $manufacturers_name = '';
          }
// MODELL end

 

I dont know in whish line I have to add it and if I additionally need an extra line to call the function.

 

I?ll appreciate any help.

 

Thank you,

Juan Ugarte

Truth? You can?t handle the truth!!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...