Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

changing the order email


Guest

Recommended Posts

Hi,

 

I am tring to change the order email so it has the following items at the top

 

 

order number

date ordered

customer name

customer telephone number

payment method

 

i have the order number, date ordered and payment method already there but i can get the name and phone number!

 

this is what i have so far

 

$email_order = STORE_NAME . "\n" .

EMAIL_SEPARATOR . "\n" .

EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .

EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";

EMAIL_CUSTOMER_NAME . ' ' . $customer_name . "\n" .

$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .

EMAIL_SEPARATOR2 . "\n";

$payment_class = $$payment;

$email_order .= $payment_class->title . "\n\n";

Link to comment
Share on other sites

$email_order = STORE_NAME . "\n" .
EMAIL_SEPARATOR . "\n" .
EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
EMAIL_CUSTOMER_NAME . ' ' . $order->customer['firstname'] . ' ' . $order->customer['lastname'] . "\n" .
EMAIL_CUSTOMER_PHONE . ' '. $order->customer['telephone'] . "\n",
$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .
EMAIL_SEPARATOR2 . "\n";
$payment_class = $$payment;
$email_order .= $payment_class->title . "\n\n";

 

where EMAIL_CUSTOMER_PHONE is not a constant yet. It has to be defined previously.

Link to comment
Share on other sites

i still cant get this to work!!

 

I cant understand why though.

 

this is the code i have at the mo, thanks to Nullachtfuffzehn for that.

 

// lets start with the email confirmation

$email_order = STORE_NAME . "\n" .

EMAIL_SEPARATOR . "\n" .

EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .

EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";

EMAIL_CUSTOMER_NAME . ' ' . $order->customer['firstname'] . ' ' . $order->customer['lastname'] . "\n" .

EMAIL_CUSTOMER_PHONE . ' ' . $order->customer['telephone'] . "\n",

$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .

EMAIL_SEPARATOR2 . "\n";

$payment_class = $$payment;

$email_order .= $payment_class->title . "\n\n";

 

But in the email all i get is the following.

 

Ready 2 Eat

...............................................................

Order Number: 109

Date Ordered: Friday 07 September, 2007

 

Payment Method

 

Cash on Collection

 

can anyone help?

Link to comment
Share on other sites

It was a little confusion about the line separators...

 

// lets start with the email confirmation
 $email_order = STORE_NAME . "\n" .
EMAIL_SEPARATOR . "\n" .
EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n".
EMAIL_CUSTOMER_NAME . ' ' . $order->customer['firstname'] . ' ' . $order->customer['lastname'] . "\n" .
EMAIL_CUSTOMER_PHONE . ' ' . $order->customer['telephone'] . "\n";
$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .
EMAIL_SEPARATOR2 . "\n";
$payment_class = $$payment;
$email_order .= $payment_class->title . "\n\n";

 

This should work now.

Link to comment
Share on other sites

  • 2 weeks later...
Should be stored in the session variable $shipping.

 

i have already tried the following,

 

$shipping_modules = shipping($shipping);

this one completed the sale but didnt add anything to the email

 

EMAIL_TEXT_SHIPPING . ' ' . $shipping

and this one came up with an error,

 

I am not sure what else to try,

 

Regards

 

Pete

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...