Difference between revisions of "Customisation - E-mail - Text Values"

From Zen Cart(tm) Wiki
Jump to: navigation, search
m (Corrected link to overrides system)
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
 
== Overview ==
 
== Overview ==
  
There are several places in the Zen Cart code where e-mails to the customer are constructed. To create a consistent feel for all your communication with the customer, you will want to make sure you modify all these places whenever you modify one. Don't forget to use the [[Customisation - Templates|template overrides system]] wherever possible when making your changes.
+
There are several places in the Zen Cart™ code where e-mails to the customer are constructed. To create a consistent feel for all your communication with the customer, you will want to make sure you modify all these places whenever you modify one. Don't forget to use the [[Customisation - Templates|template overrides system]] wherever possible when making your changes.
  
  
 
== Language files ==
 
== Language files ==
 
+
Almost every bit of text displayed in your shop or sent in an e-mail comes from a constant defined in a language file. (There are a few items, such as text you enter in the Define Pages Editor, which are stored in the database.) These files are located in the <em style="font-family:Courier;font-style:normal;">includes/languages/</em> path. At a minimum, you will see the file <em style="font-family:Courier;font-style:normal;">english.php</em> and the folder <em style="font-family:Courier;font-style:normal;">english/</em> here. If you have multiple languages in your store, you will see additional files and folders for your other languages.
Every bit of text displayed in your shop or sent in an e-mail comes from a constant defined in a language file. These files are located in the <em style="font-family:Courier;font-style:normal;">includes/languages/</em> path. At a minimum, you will see the file <em style="font-family:Courier;font-style:normal;">english.php</em> and the folder <em style="font-family:Courier;font-style:normal;">english/</em> here. If you have multiple languages in your store, you will see additional files and folders for your other languages.
 
  
  
Line 18: Line 17:
  
 
== E-mail extras ==
 
== E-mail extras ==
 
 
There is another language file you need to use when altering text for your e-mails: <em style="font-family:Courier;font-style:normal;">includes/languages/english/email_extras.php</em>. This file contains several text values common to all e-mails sent from your store.
 
There is another language file you need to use when altering text for your e-mails: <em style="font-family:Courier;font-style:normal;">includes/languages/english/email_extras.php</em>. This file contains several text values common to all e-mails sent from your store.
  
  
 
== Editing language files ==
 
== Editing language files ==
 
 
To change the text displayed in your e-mails, edit the corresponding language file. You can change an existing text, or add a new one (if you've added it to [[Customisation - E-mail - Format|your e-mail structure]]). You add or change text values using <em style="font-family:Courier;font-style:normal;">define()</em> statements:
 
To change the text displayed in your e-mails, edit the corresponding language file. You can change an existing text, or add a new one (if you've added it to [[Customisation - E-mail - Format|your e-mail structure]]). You add or change text values using <em style="font-family:Courier;font-style:normal;">define()</em> statements:
  
  
 
<pre>define(EMAIL_LOVELY_YOU_DROPPED_BY,'We are just so immeasurably delighted that you stopped by our store today!');</pre>
 
<pre>define(EMAIL_LOVELY_YOU_DROPPED_BY,'We are just so immeasurably delighted that you stopped by our store today!');</pre>
 
 
And that's all there is to it!
 
  
  
 
== More information on PHP constants ==
 
== More information on PHP constants ==
 
 
If you'd like to know more about defining and using constants in PHP, visit [http://php.net the PHP website].
 
If you'd like to know more about defining and using constants in PHP, visit [http://php.net the PHP website].

Latest revision as of 18:30, 26 July 2006

Overview

There are several places in the Zen Cart™ code where e-mails to the customer are constructed. To create a consistent feel for all your communication with the customer, you will want to make sure you modify all these places whenever you modify one. Don't forget to use the template overrides system wherever possible when making your changes.


Language files

Almost every bit of text displayed in your shop or sent in an e-mail comes from a constant defined in a language file. (There are a few items, such as text you enter in the Define Pages Editor, which are stored in the database.) These files are located in the includes/languages/ path. At a minimum, you will see the file english.php and the folder english/ here. If you have multiple languages in your store, you will see additional files and folders for your other languages.


For every "working" file in your store, there is a language file with the same name. If you want to change the value of a constant on one of your pages, just find the language file of the same name. For example, if you want to change some text on the "Contact Us" page (main_page=contact_us), you will need to edit the file includes/languages/english/contact_us.php.


Idea.png Work smart:
Don't forget to use the template overrides system when making your changes.


E-mail extras

There is another language file you need to use when altering text for your e-mails: includes/languages/english/email_extras.php. This file contains several text values common to all e-mails sent from your store.


Editing language files

To change the text displayed in your e-mails, edit the corresponding language file. You can change an existing text, or add a new one (if you've added it to your e-mail structure). You add or change text values using define() statements:


define(EMAIL_LOVELY_YOU_DROPPED_BY,'We are just so immeasurably delighted that you stopped by our store today!');


More information on PHP constants

If you'd like to know more about defining and using constants in PHP, visit the PHP website.