Post by gibpat » Fri Jun 13, 2008 8:24 am

Hi Guys,
(I think) Im having a problem with my email confirmation, the following is what the customer receives after checkout confirmation:
Thank you for your interest in MYSITE Online Store Products. Your order has been received and will be dealt with as quickly as possible.

Order ID: #4851B-A1C61-F8342
Invoice: http://www.mysite.com/webstore/index.ph ... 1C61-F8342
What i am trying to do it when the customer receives his/her confirmation it will email banking details. if they have chosen bank deposit.

Also can anyone tell me what the difference is between email_thanks and email_message?

This is what is contained in my checkout_confirm.php file

Code: Select all

$_['email_subject']          = 'Order ID #%s';
$_['email_greeting']         = 'Dear %s,';
$_['email_thanks']           = 'Thank you for your interest in %s Products. Your order with details below has been received. Thank you.';
$_['email_order']            = '<b>Order ID:</b> #%s';
$_['email_invoice']          = '<b>Invoice:</b> <a href="%s">%s</a>';
$_['email_date']             = '<b>Date Ordered:</b> %s';
$_['email_email']            = 'E-Mail';
$_['email_telephone']        = 'Telephone';
$_['email_fax']              = 'Fax';
$_['email_shipping_address'] = 'Shipping Address';
$_['email_shipping_method']  = 'Shipping Method';
$_['email_payment_address']  = 'Payment Address';
$_['email_payment_method']   = 'Payment Method';
$_['email_comment']          = 'Your Order Comments';
$_['email_thanks_again']     = 'Thanks again for choosing %s.';  
$_['email_product']          = 'Product';  
$_['email_model']            = 'Model';  
$_['email_quantity']         = 'Quantity';  
$_['email_price']            = 'Unit Price';  
$_['email_total']            = 'Total';
$_['email_message']          = 'Thank you for your interest in %s Products. Your order has been received and will be dealt with as quickly as possible.' . "\n\n" . 
                               'Order ID: #%s' . "\n" . 
                               'Invoice: %s ' . "\n";
                               'Date Ordered: %s' . "\n\n";
                               'The comments for your order are:' . "\n\n" . '%s' . "\n\n";
                               'Please reply to this email if you have any questions.' . "\n\n";
							   'If you selected to pay via Bank Deposit, account details are below:' . "\n";
							   'Account Name: My Company' . "\n";
							   'BSB: 000-000' . "\n";
							   'Account: 123456' . "\n";
							   'Note: The items will be sent as soon as payment has been received.' . "\n";
							   
$_['error_coupon']           = 'Error: Coupon is either invalid, expired or reached its usage limit!';	
$_['error_product']          = 'Error: You don\'t have any products in your shopping cart that this coupon can be used with!';			
Any assistance would be fantastic.
-Dave
Last edited by gibpat on Tue Jun 24, 2008 9:17 am, edited 1 time in total.

New member

Posts

Joined
Fri Jun 06, 2008 9:09 am

Post by bruce » Sun Jun 15, 2008 1:41 pm

If you are developing on a windows platform, download yourself a copy of notepad++. It is free and it has a "search in files" function that you will find most useful in answering this question and others like it when they come up. It searches from the start location, through subfolders too.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by gibpat » Mon Jun 16, 2008 9:42 am

sorry bruce, not quite sure how this is going to help, maybe i wasnt clear enough in the original message.

The confirmation email only sends with the following fields:
$_['email_thanks']          = 'Thank you for your interest in %s Products. Your order with details below has been received. Thank you.';
$_['email_order']            = 'Order ID: #%s';
$_['email_invoice']          = 'Invoice: %s';

Should alot more info not be sent out in the email? or does it have to be 'turned on' somewhere?

New member

Posts

Joined
Fri Jun 06, 2008 9:09 am

Post by Luvz2drv » Mon Jun 16, 2008 9:56 am

there are 2 things sent with the order email

a text version -- what you posted above

and the html version

Global Moderator

Posts

Joined
Fri Mar 21, 2008 10:58 am

Post by gibpat » Wed Jun 18, 2008 12:02 pm

Luvz2drv wrote: there are 2 things sent with the order email

a text version -- what you posted above

and the html version
Ok, im still really confused, could you please elaborate?

New member

Posts

Joined
Fri Jun 06, 2008 9:09 am

Post by Luvz2drv » Wed Jun 18, 2008 3:47 pm

not realy..  email as a standard can be send in 1 of 2 ways  HTML or Plain Text

open cart sends both.

Global Moderator

Posts

Joined
Fri Mar 21, 2008 10:58 am

Post by bruce » Wed Jun 18, 2008 9:42 pm

Read catalog\controller\checkout_confirm.php really carefully.

the html part of the email message is built with an html template in the same way as other displayed pages.
the text part of the email message is built from the language file email_message string.

Code: Select all

		$order->set('email_html', $email->fetch('content/checkout_email.tpl'));
		$order->set('email_text', $language->get('email_message', $config->get('config_store'), $order->getReference(), $url->ssl('account_invoice', FALSE, array('reference' => $order->getReference())), date($language->get('date_format_long')), strip_tags($session->get('comment'))));

you should now be able to add your extra info to the html template from the controller similar to

Code: Select all

		$email->set('payment_method', $payment->getTitle($session->get('payment_method')));
and add values near the $payment_method in the template file

The values in the email_text are created by $language->get by replacing each %s in the email_message string with the 2nd, 3rd... parameters in positional order. You can put %s where you want to add extra data and pass it via a new parameter.

eg above:
The 1st  %s is replaced by $config->get('config_store')
The 2nd %s is replaced by $order->getReference()
etc

good luck

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by gibpat » Mon Jun 23, 2008 1:14 pm

Cheers Bruce,
Just to get it straight what your telling me i need to do is manually add the options from catalog\language\english\controller\checkout_confirm.php into the catalog\controller\checkout_confirm.php

Is that correct?


-edit-
I AM SO CONFUSSED! :p
Last edited by gibpat on Tue Jun 24, 2008 9:01 am, edited 1 time in total.

New member

Posts

Joined
Fri Jun 06, 2008 9:09 am

Post by gibpat » Wed Jun 25, 2008 7:33 am

Well Im an idiot!
All the info was being displayed fine, problem was i use squirrelmail set to read in plain text... once i viewed in html everything was there.

Thanks For all your help guys!

New member

Posts

Joined
Fri Jun 06, 2008 9:09 am

Post by gibpat » Thu Jun 26, 2008 8:41 pm

bruce wrote: If you are developing on a windows platform, download yourself a copy of notepad++. It is free and it has a "search in files" function that you will find most useful in answering this question and others like it when they come up. It searches from the start location, through subfolders too.

Mate I gotta thank you for suggesting this program, just spent an hour trying to solve a problem this little beauty fixed in about 20seconds.

Cheers :D

New member

Posts

Joined
Fri Jun 06, 2008 9:09 am

Post by lev » Fri Jun 27, 2008 10:39 pm

I am working on an email_template class that will allow you to create templates just like information pages and customize actions so that for any given action (purchase made, user registered), you can specify which template to use. I will keep you guys posted and will add to contributions once complete.

lev
New member

Posts

Joined
Wed Apr 30, 2008 10:47 pm

Post by keyjo » Sat Jun 28, 2008 12:27 am

lev wrote: I am working on an email_template class that will allow you to create templates just like information pages and customize actions so that for any given action (purchase made, user registered), you can specify which template to use. I will keep you guys posted and will add to contributions once complete.
Great Lev...

I think it would help a lot of people, including me...  ;D  ;D  ;D  ;D  ;D

Looooooking forward to it...  :o  ;)
:D :D :D

New member

Posts

Joined
Tue Jun 03, 2008 12:18 am
Who is online

Users browsing this forum: No registered users and 2 guests