Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding Delivery Date to order confirmation email


Recommended Posts

Posted

I recently installed the Delivery Date for Florists etc Contribution and it all works.

 

When customer picks a delivery date this is given to the store owner in their admin area.

 

However, I'd like this delivery date to appear in the order confirmation email that the customer recieves. Is it possible to pull this information in? If so, where abouts in the code of what page do I make an amendment and what do i add?

 

Thanks!

Posted
I recently installed the Delivery Date for Florists etc Contribution and it all works.

 

When customer picks a delivery date this is given to the store owner in their admin area.

 

However, I'd like this delivery date to appear in the order confirmation email that the customer recieves. Is it possible to pull this information in? If so, where abouts in the code of what page do I make an amendment and what do i add?

 

Thanks!

 

I assume it gets generated in checkout_success.php - what code would i put to pull a field into the body of the email. It's a nice little extra to have as there's no reference for customer over what date they ordered once they've checked out.

Posted
I assume it gets generated in checkout_success.php - what code would i put to pull a field into the body of the email. It's a nice little extra to have as there's no reference for customer over what date they ordered once they've checked out.

 

Let's try again...

 

I didn't use the contribution but I have added fields for delivery date, time and instructions. My field name, deliverydate, may be different from the one you are using. The file you need to change is catalog/checkout_process.php. After:

 

if ($order->content_type != 'virtual') {

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

EMAIL_SEPARATOR . "\n" .

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

}

 

I added:

 

if ($order->info['deliverydate'])

{

$email_order .= "\n" . EMAIL_TEXT_DELIVERY_DATE . "\n" .

EMAIL_SEPARATOR . "\n" .

tep_db_output($order->info['deliverydate']) . "\n";

}

 

Although I'm not sure if this is necessary, at the end of the file (approx. line 313) I added:

 

tep_session_unregister('deliverydate');

 

After:

 

$customer_notification = (SEND_EMAILS == 'true') ? '1' : '0';

$sql_data_array = array('orders_id' => $insert_id,

'orders_status_id' => $order->info['order_status'],

'date_added' => 'now()',

'customer_notified' => $customer_notification;

I changed the ; after $customer_notification to a , and added the following line:

 

'deliverydate' => $order->info['deliverydate'];

 

You also need to define EMAIL_TEXT_DELIVERY_ADDRESS in catalog/includes/languages/english/checkout_process.php.

 

 

 

Good luck!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...