jackgilbert Posted February 21, 2006 Posted February 21, 2006 Hi all, my son has created a oscommerce store and he's had a go at typing in some content on the main first index page. He's edited the code as follows: <?php /* $Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', 'Welcome to my catalog, I hope you find what you need here.') define('NEW PRODUCTS', 'New Products For %s'); define('UPCOMING PRODUCTS', 'Upcoming Products'); define('DATE EXPECTED', 'Date Expected'); if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) { define('HEADING_TITLE', 'Let's See What We Have Here'); define('TABLE_HEADING_IMAGE', ''); define('TABLE_HEADING_MODEL', 'Model'); define('TABLE_HEADING_PRODUCTS', 'Product Name'); define('TABLE_HEADING_MANUFACTURER', 'Manufacturer'); define('TABLE_HEADING_QUANTITY', 'Quantity'); define('TABLE_HEADING_PRICE', 'Price'); define('TABLE_HEADING_WEIGHT', 'Weight'); define('TABLE_HEADING_BUY_NOW', 'Buy Now'); define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.'); define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.'); define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: '); define('TEXT_SHOW', '<b>Show:</b>'); define('TEXT_BUY', 'Buy 1 ''); define('TEXT_NOW', '' now'); define('TEXT_ALL_CATEGORIES', 'All Categories'); define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers'); } elseif ($category_depth == 'top') { define('HEADING_TITLE', 'What's New Here?'); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); } ?> and when he uploads that index.php file to catalog/includes/languages/english it says the following note on the store index page: Parse error: parse error, unexpected T_STRING in /home/tignes/public_html/store/includes/languages/english/index.php on line 14 Please can someone help my son with this problem as me and my son are noob's at oscommerce. His store is THIS Thanks again, Jack
moonstone Posted February 21, 2006 Posted February 21, 2006 For a start, you need a semi-colon to mark the end of line. So for TEXT_MAIN, it should be: define('TEXT_MAIN', 'Welcome to my catalog, I hope you find what you need here.'); For TEXT_NOW, there are three single codes. Decide on what it should be, a blank (i.e. '') or now (i.e. 'now'): define('TEXT_NOW', '' now'); Same problem with TEXT_BUY
keltic Posted February 21, 2006 Posted February 21, 2006 Let's should be Let\ 's and What's should be What\'s You need to insert the backslashes to stop the apostrophe being recognised as PHP code.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.