dmschool Posted December 5, 2003 Posted December 5, 2003 I'm having a problem with the Index.php (/includes/languages/english/index.php), having just installed my store and wishing to personalise it. I have been through the Forum Posts and also the Wiki Documentation. I am using the current version 2.2 of OsCommerce. I know I have done something stupid in the index.php file (I have made a backup of original), but for the life of me I can't see what I have done wrong. If someone could just point me in the right direction, I would be most appreciative. My edited index.php file: <?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', 'Tranquil Earth is a small business based in Westlake, Queensland, Australia.<br><br>We have access to a small number of reputable suppliers and therefore we can closely monitor all of our products, to offer you the highest quality goods at competitive prices.<br><br><b>We are committed to offer you a fabulous selection of products and even better customer service.</b><br><brShould you not be completely satisfied with any of our products, <b>except herbs</b>, you can exchange them, or ask for a full refund <b>within 14 days>/b>. But please tell us why you're not happy with the product. Thats the only way we can rectify the problem at this end.<br><br>We are constantly adding new product lines to our range so if you cannot find what you want on this site, please let us know and we will advise if we can find it for you and add it to our stock.<br><br><b>5% of all sales are donated to The Wilderness Society</b>'); define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s'); define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); define('TABLE_HEADING_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'); } ?> I receive the following error on my shop page: Parse error: parse error in /home2/dmschool/public_html/shoppe/includes/languages/english/index.php on line 13 My shop address: My Webpage Line 13 is the beginning of the above code: define('TEXT_MAIN', 'Tranquil ... Please help URGENTLY! Kind Regards, Penny
Guest Posted December 5, 2003 Posted December 5, 2003 PHP recognizes the character ' as a special character. If you want a ' to appear in your text, you must put a \ in front of it. So: "tell us why you're not happy " from the code you posted needs to say: "tell us why you\'re not happy " Check the line that says: define('HEADING_TITLE', 'Let\'s See What We Have Here'); Notice that there is a \ before the ' in the word "Let's" Make sure you put that \ before every ' and " in your text. Brackets and parentheses like () or {} or [] need to have that as well. You can make your life easier with this by getting a free piece of software called PHPEdit. Search for it on Google. This will color-code all of your text to help you know what's what and make it easier to catch mistakes like that.
crash3903 Posted December 5, 2003 Posted December 5, 2003 Hi Penny try this define('TEXT_MAIN', 'Tranquil Earth is a small business based in Westlake, Queensland, Australia.<br><br>We have access to a small number of reputable suppliers and therefore we can closely monitor all of our products, to offer you the highest quality goods at competitive prices.<br><br><b>We are committed to offer you a fabulous selection of products and even better customer service.</b><br><br>Should you not be completely satisfied with any of our products, <b>except herbs</b>, you can exchange them, or ask for a full refund <b>within 14 days</b>. But please tell us why you\'re not happy with the product. Thats the only way we can rectify the problem at this end.<br><br>We are constantly adding new product lines to our range so if you cannot find what you want on this site, please let us know and we will advise if we can find it for you and add it to our stock.<br><br><b>5% of all sales are donated to The Wilderness Society</b>'); see if that works? Regards Mark Regards Mark A Reynolds
dmschool Posted December 5, 2003 Author Posted December 5, 2003 Thank you very much Chris & Mark, I knew it was a stupid mistake, just couldn't see it myself. It now works just fine. Cheers!
crash3903 Posted December 5, 2003 Posted December 5, 2003 your welcome quote in my sig is true sometimes eh :blink: regards mark Regards Mark A Reynolds
e-gadgets Posted December 8, 2003 Posted December 8, 2003 Parse error: parse error in /var/www/html/oscommerce2/includes/languages/english/index.php on line 12 here is what its setup to somthing is obvisly rong <?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 © 2003 osCommerce Released under the GNU General Public License */define('TEXT_MAIN','welcome to e-gadgets.cjb.net your leading provider for everthing electronic, define('New products we offer', 'New Products For %s'); define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); define('TABLE_HEADING_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'); } ?>
crash3903 Posted December 8, 2003 Posted December 8, 2003 Penny Word of advice I know this is not the place to say this but lose the background - it makes for hard reading and so may not comply with the standards for partially sighted people - change it for a solid background of a similar colour check this out for the uk regards mark Regards Mark A Reynolds
Guest Posted December 9, 2003 Posted December 9, 2003 This one helped me too. I was having a time in this world with the TEXT MAIN.... I used these suggestions and viola... GREAT, it worked. Thank you also.
beardeddone Posted December 9, 2003 Posted December 9, 2003 Parse error: parse error in /var/www/html/oscommerce2/includes/languages/english/index.php on line 12 here is what its setup to somthing is obvisly rong <?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 ? 2003 osCommerce Released under the GNU General Public License */define('TEXT_MAIN','welcome to e-gadgets.cjb.net your leading provider for everthing electronic, define('New products we offer', 'New Products For %s'); define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); define('TABLE_HEADING_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'); } ?> This */define('TEXT_MAIN','welcome to e-gadgets.cjb.net your leading provider for everthing electronic, Should be */ define('TEXT_MAIN','welcome to e-gadgets.cjb.net your leading provider for everthing electronic, you can add anything before the -----></span> '); But the </span> '); needs to be there too Best Regards
Mr Fast Posted January 21, 2004 Posted January 21, 2004 Is it working already? Check the end of your file before saving. Is there a extra line after the end code (?>). Remove it and it wil work!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.