Actinic Knowledge Base

How can I show only the first name in the emails rather than the full name - 'Dear John,' rather than 'Dear John Smith,'

You must be using the 'First Name/Last Name' option in 'Business Settings | Ordering | Shopper Name Handling'.  For the emails that are sent from the desktop, ie 'Order Received', 'Order Shipped' and 'Payment Received' you can do the following:

  • highlight an order on the 'Orders' tab
  • go to the 'Operations' menu and select 'Report Selection'
  • on the 'email' tab, highlight the 'Order Summary' report and click 'Preview'
  • click on the 'Manage Layouts' button in the top-right corner
  • highlight the relevant email and click 'Edit'
  • replace the 'ContactInvoiceName' variable with:

    <actinic:variable name="ContactInvoiceFirstName" />

  • click 'OK' and repeat for the other emails if required
  • click 'Done' when finished.
For the automatic confirmation email that is sent after a customer places an order you must make some changes to one of the perl files:
  • browse to your site folder and locate the 'OrderScript.pl' file (take a backup)
  • open the file with a text editor such as notepad
  • search for:

    $sName .= $$pBuyer{Name};

  • replace it with:

    $sName .= $$pBuyer{FirstName};

  • then search for:

    $sName .= $::g_BillContact{'NAME'};

  • and replace it with:

    $sName .= $::g_BillContact{'FIRSTNAME'};

  • if you are using the 'salutation' field but do not want to switch it off so that it appears on invoices etc then you need to comment out the lines directly before the two lines above using a '#' at the beginning so the will look like:

    #$sName = $$pBuyer{Salutation} ? $$pBuyer{Salutation} . ' ' : '';
    $sName .= $$pBuyer{FirstName};


    and

    #$sName = $::g_BillContact{'SALUTATION'} ? $::g_BillContact{'SALUTATION'} . ' ' : '';
    $sName .= $::g_BillContact{'FIRSTNAME'};


    This will stop it appearing as 'Dear Mr John'

  • close and save the file
  • update the site
Actinic is not able to provide any detailed support for script changes made. If you find that there is a problem, an original copy of the script can be found within the 'Original' folder in your installation. Copy this into your site folder or restore your backup.


Attachments

No attachments were found.

How would you rate this answer?



Thank you for rating this answer.


Article Details

Last Updated
6th of January, 2009

Would you like to...

Print this page Print this page

Email this page Email this page

Suggest changes Suggest changes

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Quick Edit

Export to PDF

User Opinions (0 votes)

No users have voted.

Related Articles

Suggest changes

Suggest changes for this article below. Please try and be as detailed as possible and explain why the change is required. Fields marked with an asterisk are required.

Please do not use this form to send in requests for support. You can go here to do that.

   Name:
   Email:
* Suggested Change:
* Enter the code below:
 

Continue