Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2010
    Location
    Sydney, Australia
    Posts
    86
    Plugin Contributions
    0

    Default Can I Address only First name in Welcome Message?

    Hi,

    I've searched far and wide for any information or prior case where someone has wanted to address their customers via first name only in the welcome email after registration.

    I'd like the email to start with

    Hi <first name>,

    Contents of email here.


    I've found a similar thread here


    however my knowledge of coding isn't sufficient to change it around.

    Currently the code in the contact_us.php is

    define('EMAIL_SUBJECT', 'Welcome to ' . STORE_NAME);
    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");

    Any help would be appreciated
    relatively new to Zen Cart

  2. #2
    Join Date
    Jul 2010
    Location
    Sydney, Australia
    Posts
    86
    Plugin Contributions
    0

    Default Re: Can I Address only First name in Welcome Message?

    I tried changing that code around trying my luck... didn't work

    $name = $firstname . ' ' . $lastname;

    if (ACCOUNT_GENDER == 'true') {

    $email_text = sprintf('Hi %s', $firstname);

    } else {

    $email_text = sprintf('Hi %s', $firstname);

    }

    $html_msg['EMAIL_GREETING'] = str_replace('\n','',$email_text);
    $html_msg['EMAIL_FIRST_NAME'] = $firstname;
    $html_msg['EMAIL_LAST_NAME'] = $lastname;
    relatively new to Zen Cart

  3. #3
    Join Date
    Jul 2010
    Location
    Sydney, Australia
    Posts
    86
    Plugin Contributions
    0

    Default Re: Can I Address only First name in Welcome Message?

    Hi again,

    in includes>languages>english>create_account.php
    I made the following edit

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


    in admin/email_welcome.php

    // build the message content

    /* 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);
    // }
    $html_msg['EMAIL_GREETING'] = str_replace('\n','',$email_text);
    $html_msg['EMAIL_FIRST_NAME'] = $firstname;
    $html_msg['EMAIL_LAST_NAME'] = $lastname;


    However now when test it, the output is (where lastname = cde)

    Hi cde,

    Why isnt it showing first name yet?

    Regards,
    Adem
    relatively new to Zen Cart

 

 

Similar Threads

  1. Email Welcome - use customer's first name only
    By NJka in forum General Questions
    Replies: 5
    Last Post: 14 Dec 2010, 09:49 PM
  2. Can I address BOTH first/last name in email?
    By Feznizzle in forum Customization from the Admin
    Replies: 8
    Last Post: 22 Oct 2010, 04:40 PM
  3. Authorize.net avs match - can we set to only take first set of numbers in address?
    By peeceelee in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 16 Feb 2009, 07:19 PM
  4. switch the display of order of first name and last name on each address
    By weber in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 21 Nov 2008, 07:34 PM

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