Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Still stumped on the Email Confirmation - Help plz ! =)


MjrGaelic

Recommended Posts

Emails are going out fine, both to customer, and admin... What I need to see on the admin side is the Company Name. It's mandatory in customer signup but doesn't showup in the order confirmation..

 

Basically, what I would like is where it has the Ship To: Name address and so on, I also need to see the company name...

 

Can anyone shed some light?

Link to comment
Share on other sites

Emails are going out fine, both to customer, and admin...  What I need to see on the admin side is the Company Name.  It's mandatory in customer signup but doesn't showup in the order confirmation..

 

Basically, what I would like is where it has the Ship To: Name address and so on, I also need to see the company name...

 

Can anyone shed some light?

 

In checkout_process.php, add in this line where you want the company to appear: $order->customer['company'] .

 

  $email_order .= "n" . EMAIL_TEXT_DELIVERY_ADDRESS . "n" . 

                 EMAIL_SEPARATOR . "n" .

**********$order->customer['company'] . "n" .

                 tep_address_label($customer_id, $sendto, 0, '', "n") . "nn" .

                 EMAIL_TEXT_BILLING_ADDRESS . "n" .

                 EMAIL_SEPARATOR . "n" .

                 tep_address_label($customer_id, $billto, 0, '', "n") . "nn";

 

Aodhan

Link to comment
Share on other sites

Thanks for the help, this gets me close, but not quite.

 

When this code is added to the checkout_process.php the emails generated look like (edited customer info):

 

Delivery Address

------------------------------------------------------

 

Customer Name

Address

City, Postal Code

Province, Country

 

 

EMAIL_TEXT_BILLING_ADDRESS

------------------------------------------------------

 

 

,

Link to comment
Share on other sites

Thanks for the help, this gets me close, but not quite.

 

When this code is added to the checkout_process.php the emails generated look like (edited customer info):

 

Delivery Address

------------------------------------------------------

 

Customer Name

Address

City, Postal Code

Province, Country

 

 

EMAIL_TEXT_BILLING_ADDRESS

------------------------------------------------------

 

 

,

 

If you are getting the EMAIL_TEXT label, something isn't closed right would be my first guess. You didn't put the ******* in with the line, did you? :grin:

 

Your other option is to assign the $order->customer['company'] to a variable at the top, then write in that variable at the bottom.

 

Aodhan

Link to comment
Share on other sites

Still not going, I'm not much of a coder y nature, more of a style guy =).. I tried adding an argument on the top of the file, but it just gave me a TEP Stop error when I did..

 

Alas, I am still stuck =)

Link to comment
Share on other sites

Still not going, I'm not much of a coder y nature, more of a style guy =).. I tried adding an argument on the top of the file, but it just gave me a TEP Stop error when I did..  

 

Alas, I am still stuck =)

 

Try this:

 

In the first section of code, right after this part:

 

  $sql_data_array = array('customers_id' => $customer_id,

                         'customers_name' => $order->customer['firstname'] . ' ' . $order->customer['lastname'],

                         'customers_company' => $order->customer['company'],

                         'customers_street_address' => $order->customer['street_address'],

                         'customers_suburb' => $order->customer['suburb'],

                         'customers_city' => $order->customer['city'],

                         'customers_postcode' => $order->customer['postcode'], 

                         'customers_state' => $order->customer['state'], 

                         'customers_country' => $order->customer['country']['title'], 

                         'customers_telephone' => $order->customer['telephone'], 

                         'customers_email_address' => $order->customer['email_address'],

                         'customers_address_format_id' => $order->customer['format_id'], 

                         'delivery_name' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'], 

                         'delivery_company' => $order->delivery['company'],

                         'delivery_street_address' => $order->delivery['street_address'], 

                         'delivery_suburb' => $order->delivery['suburb'], 

                         'delivery_city' => $order->delivery['city'], 

                         'delivery_postcode' => $order->delivery['postcode'], 

                         'delivery_state' => $order->delivery['state'], 

                         'delivery_country' => $order->delivery['country']['title'], 

                         'delivery_address_format_id' => $order->delivery['format_id'], 

                         'billing_name' => $order->billing['firstname'] . ' ' . $order->billing['lastname'], 

                         'billing_company' => $order->billing['company'],

                         'billing_street_address' => $order->billing['street_address'], 

                         'billing_suburb' => $order->billing['suburb'], 

                         'billing_city' => $order->billing['city'], 

                         'billing_postcode' => $order->billing['postcode'], 

                         'billing_state' => $order->billing['state'], 

                         'billing_country' => $order->billing['country']['title'], 

                         'billing_address_format_id' => $order->billing['format_id'], 

                         'payment_method' => $order->info['payment_method'], 

                         'cc_type' => $order->info['cc_type'], 

                         'cc_owner' => $order->info['cc_owner'], 

                         'cc_number' => $order->info['cc_number'], 

                         'cc_expires' => $order->info['cc_expires'], 

                         'date_purchased' => 'now()', 

                         'orders_status' => DEFAULT_ORDERS_STATUS_ID, 

                         'comments' => $order->info['comments'], 

                         'currency' => $order->info['currency'], 

                         'currency_value' => $order->info['currency_value']);

 tep_db_perform(TABLE_ORDERS, $sql_data_array);

 $insert_id = tep_db_insert_id();

 

Add the line

  $my_variable_name = $order->customer['company'];

 

Then in the email portion, add a write for $my_variable_name wherever you want it in the email, as such:

  $email_order .= "n" . EMAIL_TEXT_DELIVERY_ADDRESS . "n" . 

                 EMAIL_SEPARATOR . "n" .

                 $my_variable_name . "n" .

                 tep_address_label($customer_id, $sendto, 0, '', "n") . "nn" .

                 EMAIL_TEXT_BILLING_ADDRESS . "n" .

                 EMAIL_SEPARATOR . "n" .

                 tep_address_label($customer_id, $billto, 0, '', "n") . "nn";

 

Also, make sure you add that trailing period after your variable insertion, otherwise it gets all bunged up.

 

Aodhan

Link to comment
Share on other sites

Still got the same error after adding this code, actually, got alot of errors as alot of the variables weren't recognized..

 

I wonder if myscreenshot isn't to old? 052802 is what I'm using right now.

 

I'm pondering that I'm getting lost on this heheh.. I get a 1054 unrecognized table error here when adding the code as above.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...