Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2007
    Posts
    120
    Plugin Contributions
    0

    Default Dear Mr 'Name'... How to change

    Hi, I'm currently getting create account confirmation emails with Dear Mr /Ms. 'Name'. The code in create_account.php is:

    define('EMAIL_GREET_MR', 'Dear Mr. %s,' . "\n\n");

    define('EMAIL_GREET_MS', 'Dear Ms. %s,' . "\n\n");

    define('EMAIL_GREET_NONE', 'Dear %s' . "\n\n");

    What should be replaced/added where %s is?

    Thanks....

  2. #2
    Join Date
    Nov 2006
    Location
    Papworth, Cambridgeshire, UK
    Posts
    731
    Plugin Contributions
    3

    Default Re: Dear Mr 'Name'... How to change

    That would be true of /includes/languages/english/create_account.php, which is where the text used on any page e.g. the Create Account page is defined.

    That text is used in the matching filename in the /includes/modules folder, i.e. /includes/modules/create_account.php which does the actual grunt work of producing the page or anything else required. e.g. an email to the customer and admin.

    In there, you will find

    if (ACCOUNT_GENDER == 'true') {
    if ($gender == 'm') {
    $email_text = sprintf(EMAIL_GREET_MR, $lastname);
    } else {
    $email_text = sprintf(EMAIL_GREET_MS, $lastname);
    }
    } else {
    $email_text = sprintf(EMAIL_GREET_NONE, $firstname);

    which translates to 'replace %s with firstname or lastname as entered, as appropriate'

  3. #3
    Join Date
    Aug 2007
    Posts
    120
    Plugin Contributions
    0

    Default Re: Dear Mr 'Name'... How to change

    Quote Originally Posted by Chuckl View Post
    That would be true of /includes/languages/english/create_account.php, which is where the text used on any page e.g. the Create Account page is defined.

    That text is used in the matching filename in the /includes/modules folder, i.e. /includes/modules/create_account.php which does the actual grunt work of producing the page or anything else required. e.g. an email to the customer and admin.

    In there, you will find

    if (ACCOUNT_GENDER == 'true') {
    if ($gender == 'm') {
    $email_text = sprintf(EMAIL_GREET_MR, $lastname);
    } else {
    $email_text = sprintf(EMAIL_GREET_MS, $lastname);
    }
    } else {
    $email_text = sprintf(EMAIL_GREET_NONE, $firstname);

    which translates to 'replace %s with firstname or lastname as entered, as appropriate'
    Ah, I should probably explain that I'm trying to tidy up an old version of zen (1.26) so there isn't an includes/modules/create_account.php file.... I know it should be upgraded but not up to me at the mo...

  4. #4
    Join Date
    Aug 2007
    Posts
    120
    Plugin Contributions
    0

    Default Re: Dear Mr 'Name'... How to change

    I did find some of the code you displayed in includes/modules/pages/create_account/header_php.php as in:

    Line #724 : $email_text = sprintf(EMAIL_GREET_MR, $lastname);

  5. #5
    Join Date
    Nov 2006
    Location
    Papworth, Cambridgeshire, UK
    Posts
    731
    Plugin Contributions
    3

    Default Re: Dear Mr 'Name'... How to change

    Indeed , I was about to tell you to look in /includes/modules/pages/create_account/header_php.php.
    That is where it lived prior to version 1.3

  6. #6
    Join Date
    Aug 2007
    Posts
    120
    Plugin Contributions
    0

    Default Re: Dear Mr 'Name'... How to change

    But if that text is already there in includes/modules/pages/create account/header_php.php why does the email keep saying Dear Mr 'Name'?

  7. #7
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Dear Mr 'Name'... How to change

    The salutation is determined based on the gender of the customer, which they selected when they created their account.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #8
    Join Date
    Aug 2007
    Posts
    120
    Plugin Contributions
    0

    Default Re: Dear Mr 'Name'... How to change

    Sorry, my bad for probably not explaining properly..... it's the actual 'Name' that's the problem, in that it is actually writing 'Name' instead of the actual customer's surname....

  9. #9
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Dear Mr 'Name'... How to change

    Quote Originally Posted by warstormer View Post
    Sorry, my bad for probably not explaining properly..... it's the actual 'Name' that's the problem, in that it is actually writing 'Name' instead of the actual customer's surname....
    If you're using default Zen Cart code, then it should only ever display the actual surname from the logged-in-customer's information in the database and viewable from their My Account area.

    If you've installed some sort of custom code to expand on the email/newsletter features, I suppose there could be an error in the custom coding to cause something else to show up.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #10
    Join Date
    Aug 2007
    Posts
    120
    Plugin Contributions
    0

    Default Re: Dear Mr 'Name'... How to change

    Quote Originally Posted by DrByte View Post
    If you're using default Zen Cart code, then it should only ever display the actual surname from the logged-in-customer's information in the database and viewable from their My Account area.

    If you've installed some sort of custom code to expand on the email/newsletter features, I suppose there could be an error in the custom coding to cause something else to show up.
    I'm coming into this after the fact, but have been told that the template is probably by Template Monster. I've already practically given up trying to solve another problem (http://www.zen-cart.com/forum/showthread.php?t=74516) ... In this case files seem to be where they're supposed to be but frankly it's a mess...

 

 

Similar Threads

  1. Email says "Dear Newsletter Subscriber" instead of "Dear customer's name."
    By Thannaree in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 27 Nov 2011, 10:58 AM
  2. How do I change the URL sub-page name to the Category name?
    By gwtnow21 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 28 Jan 2011, 05:20 PM
  3. Newsletter - "Dear" Customer Name is Blank v1.3.9g
    By julie.t in forum General Questions
    Replies: 0
    Last Post: 30 Nov 2010, 04:09 PM
  4. How can I add "Dear" to customer status change email?
    By ebaobao in forum Managing Customers and Orders
    Replies: 0
    Last Post: 27 Aug 2010, 09:08 PM
  5. Replies: 3
    Last Post: 29 Jan 2008, 04:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg