Personalizing osCommerce - InfoBoxes, steps two and three (Page 6 of 6 )
Next, you need to define the links you have just created. Provided your site is produced in English, you’ll need to browse to the following directory:
var/www/html/catalog/includes/languages
and download the English.php file.
Open the file and add the following code pretty much anywhere:
// links box heading
define('BOX_HEADING_LINKS', 'Links');
That will give your box its heading. Now define the links themselves:
// Links box text
define('BOX_LINKS_CREATE_ACCOUNT', 'Create An Account');
define('BOX_LINKS_LOGIN', 'Login');
define('BOX_LINKS_LOGOFF', 'Logoff');
define('BOX_LINKS_MY_ACCOUNT', 'My Account');
define('BOX_LINKS_CART_CONTENTS', 'Cart Contents');
define('BOX_LINKS_CHECKOUT', 'Checkout');
define('BOX_LINKS_NEW_LINK', 'New link');
The text inside the single quotes is the text that is displayed in the box as the link, and the text in capitals is the action that occurs when the link is clicked. In order for this to work, you will need to associate the actions with a PHP file, this is done using the filenames.php file that is held in the following location:
var/www/html/catalog/includes
To associate an action with a page, simply add a line of code like this almost anywhere in the file:
define('FILENAME_NEW_LINK', new_link.php');
Save and upload the files to their original locations, and proceed directly to step three, inserting the box on a page. You’ll need to download and edit either the column_left.php or column_right.php file, depending on which side of the page you want the box to appear. Both of these files appear in the includes directory also. Open whichever is applicable and simply add the following statement:
require(DIR_WS_BOXES . 'links.php');
Save and upload the file, then open the catalog in your browser. Your box should be there in all its beautiful glory!
There are many more minor tweaks that can give your online store its individual personality, and the addition of a huge bank of downloadable modules and code to the community services can take things even further. I hope that I’ve given you enough information to get yourself going, and enough inspiration to use the application in the first place.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |