| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Changing Email Greeting to show First Name Only | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() When a customer places an order they will receive an email that contains their invoice and the following text:
Hello John Smith, Thank you for your order. Please come back soon! When the order status is changed to complete they will receive their order has been completed email that has the following text: Hi John Smith, Your order has been completed successfully. I would like to have just the Customers First Name show on all emails. I changed the code in salutation.tpl to the following and the First Name will show on Order Completed Emails but on the email that contains their invoice it will just show "Hello ," --------------------------------------------------- {* $Id: salutation.tpl,v 1.1 2010/05/21 08:32:15 joy Exp $ *} {strip} {if $salutation ne ""} {$lng.eml_dear|substitute:"customer":"`$customer.f irstname`"} {else} {if $firstname eq "" and $lastname eq ""} {$lng.eml_dear|substitute:"customer":"`$customer.f irstname`"} {else} {$lng.eml_dear|substitute:"customer":"`$customer.f irstname`"} {/if} {/if} {/strip}, ----------------------------------------------------- I did also try to change the Language variable in eml_dear but I am not sure what to use to call out the First Name. I tried "firstname", "customer.firstname", ect but nothing worked. Any help with this would be appreciated.
__________________
Hank X-Cart 4.4.2 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() Look at: /common_files/mail/html/order_customer.tpl
This line: <br />{include file="mail/salutation.tpl" title=$order.title firstname=$order.firstname lastname=$order.lastname} That should clear up what you need to do, if not just ask.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#3
|
|||||||
|
|||||||
![]() Hello,
Thank you for the reply. I looked at the code you indicated but I am not sure what you are pointing out. That is the same line of code that is also in common_files/mail/html/order_customer_complete and only the first name is showing on the completed emails. I am not sure if I am looking at this incorrectly but both of these files - order_customer and order_customer-complete are calling for the salutation.tpl file to be included in the email. Since I have the substitute code in the salutation.tpl file the first name should show on both emails.
__________________
Hank X-Cart 4.4.2 |
|||||||
#4
|
|||||||||
|
|||||||||
![]() No problem. See this code from salutation.tpl:
PHP Code:
In your example you are substituting "customer" with $customer.firstname. When passed from /common_files/mail/html/order_customer.tpl the $customer array is not set. $order is what it is pulling from, as you can see from the scrap of code I posted above. To accomplish your goal, I believe you only need to remove the reference to $title and $lastname in salutation.tpl. Like this: PHP Code:
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
|
#5
|
|||||||
|
|||||||
![]() That was it. Thank you for the help on this one. This has been on my to do list for some time so thanks again!
![]()
__________________
Hank X-Cart 4.4.2 |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|