Post by perezosogato » Mon Oct 31, 2011 10:11 am

hi guys,

how to add the customer name to the email ?
As we all know that the order update email starts with a greeting, but it is supposed to have the customer name ??
Such as,
" Dear John Smith,

Thank you for your interest in Your Store products. Your order has been received and will be processed once payment has been confirmed.

..."

but how to add the Dear John Smith ( customer name ) to the email as an addressing ?

Thank you.

New member

Posts

Joined
Sun Jul 24, 2011 1:03 am

User avatar
Active Member

Posts

Joined
Thu Nov 11, 2010 6:11 pm
Location - New Zealand (Tokomaru, Palmerston North)

Post by uksitebuilder » Mon Oct 31, 2011 5:21 pm

If you are talking about the Confirmation Order, then it's a little more than just echoing some php and probably means nothing to the OP if they dont know PHP code

edit catalog/language/english/mail/order.php

find

Code: Select all

$_['text_new_greeting']         = 'Thank you for your interest in %s products. Your order has been received and will be processed once payment has been confirmed.';
change to

Code: Select all

$_['text_new_greeting']         = 'Dear %s,<br /><br />Thank you for your interest in %s products. Your order has been received and will be processed once payment has been confirmed.';
edit: catalog/model/checkout/order.php

find

Code: Select all

$template->data['text_greeting'] = sprintf($language->get('text_new_greeting'), html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8'));
change to

Code: Select all

$template->data['text_greeting'] = sprintf($language->get('text_new_greeting'), $order_info['payment_firstname']. ' ' . $order_info['payment_lastname'], html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8'));
find

Code: Select all

$text  = sprintf($language->get('text_new_greeting'), html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8')) . "\n\n";
change to

Code: Select all

$text  = sprintf($language->get('text_new_greeting'), $order_info['payment_firstname']. ' ' . $order_info['payment_lastname'], html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8')) . "\n\n";

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by Maansy » Mon Oct 31, 2011 7:50 pm

This should be how any email sent out from the store. I believe it's more professional when greeting using the customer's name.
Maybe Daniel will just throw it in while at it ;)

ALL Templates :: 1.5.1+ Templates :: 50%-75% PRICE DROP ONLY at OpencartStuff.com


User avatar
Active Member

Posts

Joined
Thu Jun 24, 2010 6:04 am


Post by perezosogato » Mon Oct 31, 2011 10:52 pm

uksitebuilder wrote:If you are talking about the Confirmation Order, then it's a little more than just echoing some php and probably means nothing to the OP if they dont know PHP code

edit catalog/language/english/mail/order.php

find

Code: Select all

$_['text_new_greeting']         = 'Thank you for your interest in %s products. Your order has been received and will be processed once payment has been confirmed.';
change to

Code: Select all

$_['text_new_greeting']         = 'Dear %s,<br /><br />Thank you for your interest in %s products. Your order has been received and will be processed once payment has been confirmed.';
edit: catalog/model/checkout/order.php

find

Code: Select all

$template->data['text_greeting'] = sprintf($language->get('text_new_greeting'), html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8'));
change to

Code: Select all

$template->data['text_greeting'] = sprintf($language->get('text_new_greeting'), $order_info['payment_firstname']. ' ' . $order_info['payment_lastname'], html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8'));
find

Code: Select all

$text  = sprintf($language->get('text_new_greeting'), html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8')) . "\n\n";
change to

Code: Select all

$text  = sprintf($language->get('text_new_greeting'), $order_info['payment_firstname']. ' ' . $order_info['payment_lastname'], html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8')) . "\n\n";
Need i edit all the code ?? or just one is okay ? ;)

New member

Posts

Joined
Sun Jul 24, 2011 1:03 am

Post by Jeremy Fisk » Tue Nov 01, 2011 2:57 am

Another great post from uksitebuilder...

I have compiled it into a vqmod... please download and try out... (Please note that i haven't had time to try it out myself yet...

Chears

jem

Attachments

Adds Customer Name to Email...


Hand Dryers

Bookstore Mod
QuickShop Module
Restricted Access - Compulsory Login
Template Override - Category Specific (vQmod)
Template Override - Brand Specific (vQmod)
How did you find out about us register question mod
Compulsory Login vQmod
Brands In Top Menu
zoom - Product Image - Auto on hover


User avatar
Active Member

Posts

Joined
Thu Nov 11, 2010 6:11 pm
Location - New Zealand (Tokomaru, Palmerston North)

Post by perezosogato » Tue Nov 01, 2011 9:06 am

uksitebuilder wrote:If you are talking about the Confirmation Order, then it's a little more than just echoing some php and probably means nothing to the OP if they dont know PHP code

edit catalog/language/english/mail/order.php

find

Code: Select all

$_['text_new_greeting']         = 'Thank you for your interest in %s products. Your order has been received and will be processed once payment has been confirmed.';
change to

Code: Select all

$_['text_new_greeting']         = 'Dear %s,<br /><br />Thank you for your interest in %s products. Your order has been received and will be processed once payment has been confirmed.';
edit: catalog/model/checkout/order.php

find

Code: Select all

$template->data['text_greeting'] = sprintf($language->get('text_new_greeting'), html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8'));
change to

Code: Select all

$template->data['text_greeting'] = sprintf($language->get('text_new_greeting'), $order_info['payment_firstname']. ' ' . $order_info['payment_lastname'], html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8'));
find

Code: Select all

$text  = sprintf($language->get('text_new_greeting'), html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8')) . "\n\n";
change to

Code: Select all

$text  = sprintf($language->get('text_new_greeting'), $order_info['payment_firstname']. ' ' . $order_info['payment_lastname'], html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8')) . "\n\n";
Hi uksitebuilder,

I followed the steps.
the customer address dislayed, but the invoice the the text footer was changed in the order confirm email. please find the attachment for reference.
hope to hear from you soon.

Attachments

confirm email.jpg

confirm email.jpg (108.43 KiB) Viewed 5260 times


New member

Posts

Joined
Sun Jul 24, 2011 1:03 am

User avatar
Active Member

Posts

Joined
Thu Nov 11, 2010 6:11 pm
Location - New Zealand (Tokomaru, Palmerston North)

Post by perezosogato » Tue Nov 01, 2011 9:53 am

Jeremy Fisk wrote:try the vqmod... (on your original files)
Hi Jem,

thank you, i am trying on your solution and will let you know the result. ;)
thank you very much for your helps.

New member

Posts

Joined
Sun Jul 24, 2011 1:03 am

Post by Jeremy Fisk » Tue Nov 01, 2011 10:13 am

Please note that "my solution" is only UKSITEBUILDER's in a vqmod so that you don't have to edit any core files... and it eliminates any chances of coding errors... (providing that there are no errors in my vqmod)

Chears

jem

Hand Dryers

Bookstore Mod
QuickShop Module
Restricted Access - Compulsory Login
Template Override - Category Specific (vQmod)
Template Override - Brand Specific (vQmod)
How did you find out about us register question mod
Compulsory Login vQmod
Brands In Top Menu
zoom - Product Image - Auto on hover


User avatar
Active Member

Posts

Joined
Thu Nov 11, 2010 6:11 pm
Location - New Zealand (Tokomaru, Palmerston North)

Post by rocket » Tue Nov 01, 2011 5:56 pm

Before I get stuck into using this, by chance, will this also add the customer name to the order confirmation email I receive?
I'm looking at setting this up so I have the customers name but I also want to add their email address to my order confirmation. Can someone help tell me which files I need to edit and what to put? If its a separate issue, I'll start a new thread.
Thanks

User avatar
New member

Posts

Joined
Sat Oct 22, 2011 12:09 am

Post by uksitebuilder » Tue Nov 01, 2011 9:46 pm

If you mean the email you receive, then there is also a vqmod for changing the system to send you a duplicate HTML email of what the customer receives when they order

Use that with this one and it will also add their name to the email greeting

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by rocket » Tue Nov 01, 2011 10:38 pm

uksitebuilder wrote:If you mean the email you receive, then there is also a vqmod for changing the system to send you a duplicate HTML email of what the customer receives when they order

Use that with this one and it will also add their name to the email greeting
I tried using the vQmod but I mine won't load anything! Tried it once for an import/export extension but nothing worked, had to manually code instead.
I didn't want to have all the details a customer gets as that was too much info, but I figured out a way to get what I wanted to work here http://forum.opencart.com/viewtopic.php?f=20&t=44841
Thanks anyway, now need to fix my vQmod!

User avatar
New member

Posts

Joined
Sat Oct 22, 2011 12:09 am

Post by perezosogato » Wed Nov 02, 2011 11:50 am

Jeremy Fisk wrote:try the vqmod... (on your original files)
hi Jem,

i got the same result that the customized footer does not display. see the attachment.
please help, thank.

Attachments

confirm email.jpg

confirm email.jpg (108.43 KiB) Viewed 5213 times


New member

Posts

Joined
Sun Jul 24, 2011 1:03 am

Post by SandCarver » Wed Apr 18, 2012 4:56 am

Thanks Jeremy and UKSiteBuilder for teaming up and making this change a quick one!

Checkout Our OpenCart powered Stores
Sandcarving Systems | Glass Banks


Newbie

Posts

Joined
Wed Nov 17, 2010 11:14 pm

Post by IP_CAM » Mon May 26, 2014 7:15 am

Great Solutuion, saved me much time! Thank you, uksitebuilder!
Ernie
OpenShop v1.7 (OC v.1.5.6.1-2-3-4)
---
$_['text_new_greeting'] = 'Dear %s,<br><br>Thank you for your interest in and order by %s . Your order .....
$_['text_new_greeting'] = 'Hallo %s,<br><br>Vielen Dank für Ihr Interesse und Ihre Bestellung bei %s. Wir haben .....
---
Image

ipc.li/shop/

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by ocaddons » Mon May 26, 2014 10:16 am

@perezosogato

Did you install the vqmod for your store? If it is installed, i prefer to send you a xml file for adding the customer name into the email without touching the core code.

Image
Image

EMail: support@ocaddons.com


User avatar
New member

Posts

Joined
Fri Dec 27, 2013 10:21 am

Who is online

Users browsing this forum: Amazon [Bot] and 137 guests