Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Editing index.php


Recommended Posts

I have installed everything fine, but when I try to edit the text on the main page, i get and error "Parse error: parse error, unexpected T_STRING in /home/audiox/public_html/shop/index1.php on line 13" What do I need to do to not get this error? I only edit the text in the define('TEXT_MAIN', 'This is a default setup of the osCommerce project...');

Link to comment
Share on other sites

Do a search for T-STRING in the knowledge base - I believe this is caused by saving a language file into the wrong folder.


I just ran into this same problem. So I did a search in hte KB and found nothing. I had edited both the languages/english/default.php and hte shipping.php in the same folder. I uploaded both. The shipping.php edits were successful. The default.php edits were not. I got an error:


Parse error: parse error, unexpected T_STRING in /home/woodwork/public_html/catalogue/includes/languages/english/default.php on line 20


It was line 22 and went back to delete a stroke of the spacebar (or maybe from hittin ghte enter key) while editing in Notepad. Uploading again shows the error for line 14. I can't see anything wrong with it.


Any ideas? TIA. Below is the code for the default page:


 Copyright (c) 2002 osCommerce
 Modified for use by YourShopCart.com sections Copyright (c) 2002 - 2003
 YourShopCart Version 1.0

 Released under the GNU General Public License

define('TEXT_MAIN', '<p><font face="Verdana, Arial, Helvetica, sans-serif">WoodworkingWorkshop.com offers an extensive collection of woodworking plans and projects in paper and booklet format, in many areas of interest. We also soon be offering a large selection of downloadable PDF woodworking plans. PDF woodworking plans are the newest format and are gaining in popularity, mostly because the delivery is a lot faster that the traditional paper woodworking plans that arrive by mail. You simply download the plan after purchasing right to your computer and print to your printer. You could be woodworking within minutes. As well, some of our scrollsaw patterns that will be soon offering will be in JPG format whereby they will be emailed to you soon after your purchase.</font></p><p><font face="Verdana, Arial, Helvetica, sans-serif">We represent a wide cross section of woodworking designers and publishers. Featuring beginner, intermediate and advanced level projects, there's a woodworking plan for almost everyone. Plans can be purchased individually or save money and purchase in combo deals as offers by certain designers and publishers.</font></p>

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' || $HTTP_GET_VARS['manufacturers_id']) {

 define('HEADING_TITLE', 'Online Products');

 define('TABLE_HEADING_IMAGE', '');

 define('TABLE_HEADING_MODEL', 'Part Number');

 define('TABLE_HEADING_PRODUCTS', 'Product Name');

 define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');

 define('TABLE_HEADING_QUANTITY', 'Quantity');

 define('TABLE_HEADING_PRICE', 'Price Each');

 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', 'All');

} elseif ($category_depth == 'top') {

 define('HEADING_TITLE', ' ');

} elseif ($category_depth == 'nested') {

 define('HEADING_TITLE', 'Categories');



Link to comment
Share on other sites

Well, after much much trying and re-trying and searching via Google and the lame Knowledge Base I've discovered what the problem was.


I had to go back a strip lien 14, the

define('TEXT_MAIN', 'Woodworkersworkshop......');


and replace it with


define('TEXT_MAIN', '');


Upload and hurray the page came back. I then reinserted the text, uploaded the file and it bugged out again. So...it had to be something in the text. Stripped all the html tags and finally figured it out....


..... osC doesn?t like apostrophes!!!!!!!! <_<


So whenever you need an apostrophe, replace it with the keystroke ALT-0146 (hold down teh ALT key and enter zero,146).


Page works fine now. I should have known because other parts of my site run on php and I knew in there that apostrophes are ?outlawed?. :D


So can you tell I'm a newbie?!?! :blush: ...at least to php code

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...