osCommerce Knowledge Base
Language Text Definitions | Last Update: 15th July, 2005 Article ID: 53 |
- Introduction
- Email Text
- Add Email to Tell-a-Friend
- Add Text to Customer Purchase Emails
- General Email Changes
- General Text Edits
- Browser Text
- Heading Text
- Index Text
- Click to Enlarge Text
- Forgot your Password? Text
- Change Zip Code Placement
Introduction
Any language text definitions to define any of the catalog boxes and error messages in the osCommerce store are in the catalog/includes/languages/english.php file. The language definitions for the individual page files including the index.php page and other pages throughout the store have their text definitions in each of their named pages in the catalog/includes/languages/english/ folder or whichever language folder you are using.
Email Text
- Add Email to Tell-a-Friend
- Add Text to Customer Purchase Emails
- General Email Changes
- Add Email to Tell-a-Friend
The email of the store owner can be added to the tell-a-friend script so the store owner knows when an email is sent using the tell-a-friend form.
In catalog/tell_a_friend.php about line 80 and after this code:
tep_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address); ?>
You will add the additional code below:
// Mail a (silent) report to the web owner:
// get ip
if (getenv('HTTP_X_FORWARDED_FOR')) {
$ip=getenv('HTTP_X_FORWARDED_FOR');
} else {
$ip=getenv('REMOTE_ADDR');
}
// build report
$report = 'Here are the details of the T.A.F. submission by ' . $from_name . ' on ' . date("D M j G:i:s Y") . ':';
$report .= "nn" . 'Recipient details: ' . $HTTP_POST_VARS['friendname'] . ' - ' . $HTTP_POST_VARS['friendemail'];
$report .= "n" . 'Sender details: ' . $from_name . ' - ' . $from_email_address;
$report .= "n" . 'Sender ip address: ' . $ip;
$report .= "n" . 'Personal message: ' . "nn" . $HTTP_POST_VARS['yourmessage'];
$report .= "nn" . 'Product link: ' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCT_INFO . '?products_id=' . $HTTP_GET_VARS['products_id'];
// mail report
tep_mail('Tell A Friend', 'you@youraddress.com', '[ REPORT ] Tell a Friend Usage', stripslashes($report), '', $from_email_address);
Change you@youraddress.com to your email address.
NOTE: If you use MIME e-mail you should change all occurances of "n" to "<br>"
Add Text to Customer Purchase Emails
Additional text can be added to the email the customer receives after purchasing.
The catalog/checkout_process.php file establishes the mail variables and sets their values. The code change below will put a text message just below the store name with a line space between in the confirmation order email the customer receives.
Somewhere after the section that reads // lets start with the email confirmation about line 222 add:
// additional text message
$email_order .= "rnThank you for your order! rn Enjoy! rn" .
// end of additional text message
After this code:
// lets start with the email confirmation
$email_order = STORE_NAME . "n" .
This section will now look like this:
// lets start with the email confirmation
$email_order = STORE_NAME . "n" .
//
$email_order = "rnThank you for your order! rnrn Enjoy! rn" .
//
EMAIL_SEPARATOR . "n" .
The rn tag leaves no space between lines whereas the nn tag leaves one blank line.
General Customer Email Changes
When a customer registers at your store they receive an email giving them generic information about the function of the store they have just registered with. This language can be altered by editing the catalog/includes/languages/english/create_account.php file.
General Text Edits
- includes/languages/english/product_info.php
- includes/languages/english/product_reviews.php
- includes/languages/english/product_reviews_info.php
- includes/languages/english/product_reviews_write.php
- A quick search with your editor will find these files.
Browser Text
The top left of the browser window shows the name osCommerce. This can be altered to your site's name in catalog/includes/languages/english.php on approximately line 48.
// page title define('TITLE', 'osCommerce');
Heading Text
Any changes to the text "Top", "Catalog" in the navigation bar of your store can be edited in catalog/includes/languages/english.php. This is where all of the heading listings are shown.
Index Text
The change for the generic text that is on the default osCommerce store's introduction and welcome is altered in the catalog/includes/languages/english/index.php file. This index.php file will need to be changed in all of the language folders. The words "There are no products to list in this category." on the bar that comes up when you click a category is also changed in this file.
Click to Enlarge Text
The words "click to enlarge" under the product graphic pic are changed in 4 files in catalog/includes/languages/english folder which are:
Forgot your Password? Text
The words "Forgot your password? Click here" on the login screen? are changed in the catalog/includes/languages/english/login.php file.
Change Zip to Below State
In catalog/create_account.php around line 411 change the php icons of the zip to be placed after the state php icons by copying and pasting the icons into a new row.
