Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Include custom fields in confirmation email?


dino705

Recommended Posts

Posted

I've added custom fields to my customer account using the topic I found here:

"Adding Custom Fields to Customer Details" (topic 93551). But I can't figure out how to have the information from the added fields included in the checkout confirmation email. I've searched the forum and can't find a method to do it.

Does anyone know how to add this additional information to the email? Thanks.

Posted

I have the same problem right now. I have the information being entered into the database from the sign up form but where is the information then e-mailed from or what file..

 

I will be working on this so if i figure it out I will post

Posted
I have the same problem right now. I have the information being entered into the database from the sign up form but where is the information then e-mailed from or what file..

 

I will be working on this so if i figure it out I will post

 

checkout_process .php tackles the email. You will have to query the database to add more info.

 

just as an exmaple I just added the manufacturer name (default osC) and my new field color to the product list in the email:

  $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = (select manufacturers_id from " . TABLE_PRODUCTS . " where products_id = " . tep_get_prid($order->products[$i]['id']) . ")");
 $manufacturers = tep_db_fetch_array($manufacturers_query);

 $color_query = tep_db_query("select products_color from " . TABLE_PRODUCTS . " where products_id = " . tep_get_prid($order->products[$i]['id']));
 $color = tep_db_fetch_array($color_query);

   $products_ordered .= $order->products[$i]['qty'] . ' x ' . $manufacturers['manufacturers_name'] . ' ' . $order->products[$i]['name'] . ', ' . $color['products_color'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted

Monika

 

 

You rock..

 

 

question though I have added fields to the address book. is there a specific line that can be edited to add to the list below the address.

 

 

I am creating a sizing form for tux rentals

 

 

example

 

coat_size field

 

PS I was on the right page.. I will play around and see if you reply.

 

 

checkout_process .php tackles the email. You will have to query the database to add more info.

 

just as an exmaple I just added the manufacturer name (default osC) and my new field color to the product list in the email:

  $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = (select manufacturers_id from " . TABLE_PRODUCTS . " where products_id = " . tep_get_prid($order->products[$i]['id']) . ")");
 $manufacturers = tep_db_fetch_array($manufacturers_query);

 $color_query = tep_db_query("select products_color from " . TABLE_PRODUCTS . " where products_id = " . tep_get_prid($order->products[$i]['id']));
 $color = tep_db_fetch_array($color_query);

   $products_ordered .= $order->products[$i]['qty'] . ' x ' . $manufacturers['manufacturers_name'] . ' ' . $order->products[$i]['name'] . ', ' . $color['products_color'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";

Posted
Monika

You rock..

question though I have added fields to the address book. is there a specific line that can be edited to add to the list below the address.

I am creating a sizing form for tux rentals

example

 

coat_size field

 

PS I was on the right page.. I will play around and see if you reply.

 

 

you can query the address book table too ... when I made the products mod, I changed billing addy too by adding phone# and email, those were easy as in standard class order. If you have added your new fields to the order class, yours should be just as easy, if not, make the extra queries.

 

  $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
                 EMAIL_SEPARATOR . "\n" .
                 tep_address_label($customer_id, $billto, 0, '', "\n") . "\n" .
                 $order->customer['telephone'] . "\n" .
      	 $order->customer['email_address'] . "\n\n";          

 

off to bed!

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

  • 5 months later...
Posted

I want to add the catagories and sub-catagories (4 of them) to the email output but don't know how or at what point in the checkout_process.php. I get the idea of what is being done for adding manufacturer and color attribute, but I think catagories are different.

 

Can anyone help?

 

Mike

Posted

i become an error during the installation from the code above (monika #3):

 

1064 - You have an error in your SQL syntax near 'select manufacturers_id from products where products_id = 29)' at line 1

 

select manufacturers_name from manufacturers where manufacturers_id = (select manufacturers_id from products where products_id = 29)

 

[TEP STOP]

anyone can help me?

Posted
i become an error during the installation from the code above (monika #3):

 

1064 - You have an error in your SQL syntax near 'select manufacturers_id from products where products_id = 29)' at line 1

 

select manufacturers_name from manufacturers where manufacturers_id = (select manufacturers_id from products where products_id = 29)

 

[TEP STOP]

anyone can help me?

check your mysql version ... before 4.1 subselects are not supported, you have to run the subselect query first and add that to the query I made as a variable

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted
I want to add the catagories and sub-catagories (4 of them) to the email output but don't know how or at what point in the checkout_process.php. I get the idea of what is being done for adding manufacturer and color attribute, but I think catagories are different.

 

Can anyone help?

 

Mike

 

nor sure I understand ... write down an example output row the way you want it to look!

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted
nor sure I understand ... write down an example output row the way you want it to look!

 

For example I just see:

Qty, Title, Model, Price

1 x My Circulation System, Uncle Bob Talks with (MATM11) = $5.62

 

I'd like to see:

Category_1, Category_2, Category_3, Category_4, Title, Model, Price

 

Quantity isn't necessary since all our inventory is unique.

Thanks,

Mike

Archived

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

×
×
  • Create New...