osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Parse error on Line 13

This is a discussion on Parse error on Line 13 within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; I have been trying to modify my oscommerce shoppong cart default setup page for over a week. I've been to ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Modification Help

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack (1) Thread Tools
  1 links from elsewhere to this Post. Click to view. #1  
Old 04-12-2004, 12:12 PM
Lurker
 
Join Date: Apr 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
backapparel
Default Parse error on Line 13

I have been trying to modify my oscommerce shoppong cart default setup page for over a week. I've been to several discussion forums, and still can't figure out why I get a parse error on line 13 every time I try to modify the define('TEXT_MAIN',") even when I replace everything back as it was, I still get a parse error on line 13. Here is the code can any body help me?

<?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','This is a default setup of the osCommerce project, products shown are for demonstrational purposes, <b>any products purchased will not be delivered nor will the customer be billed</b>. Any information seen on these products is to be treated as fictional.<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</td><td class="main" valign="top"><b>Error Messages</b><br><br>If there are any error or warning messages shown above, please correct them first before proceeding.<br><br>Error messages are displayed at the very top of the page with a complete <span class="messageStackError">background</span> color.<br><br>Several checks are performed to ensure a healthy setup of your online store - these checks can be disabled by editing the appropriate parameters at the bottom of the includes/application_top.php file.</td></tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td><td class="main" valign="top"><b>Editing Page Texts</b><br><br>The text shown here can be modified in the following file, on each language basis:<br><br><nobr class="messageStackSuccess">[path to catalog]/includes/languages/' . $language . '/' . FILENAME_DEFAULT . '</nobr><br><br>That file can be edited manually, or via the Administration Tool with the <nobr class="messageStackSuccess">Languages->' . ucfirst($language) . '->Define</nobr> or <nobr class="messageStackSuccess">Tools->File Manager</nobr> modules.<br><br>The text is set in the following manner:<br><br><nobr>define('TEXT_MAIN', '<span class="messageStackSuccess">This is a default setup of the osCommerce project...</span>');</nobr><br><br>The text highlighted in green may be modified - it is important to keep the define() of the TEXT_MAIN keyword. To remove the text for TEXT_MAIN completely, the following example is used where only two single quote characters exist:<br><br><nobr>define('TEXT_MAIN', '');</nobr><br><br>More information concerning the PHP define() function can be read <a href="http://www.php.net/define" target="_blank"><u>here</u></a>.</td></tr>
<tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/3.gif') . '</td><td class="main" valign="top"><b>Online Documentation</b><br><br>Online documentation can be read at the <a href="http://wiki.oscommerce.com" target="_blank"><u>osCommerce Wiki Documentation Effort</u></a> site.<br><br>Community support is available at the <a href="http://forums.oscommerce.com" target="_blank"><u>osCommerce Community Support Forums</u></a> site.</td></tr></table><br>If you wish to download the solution powering this shop, or if you wish to contribute to the osCommerce project, please visit the <a href="http://www.oscommerce.com" target="_blank"><u>support site of osCommerce</u></a>. This shop is running on osCommerce version <font color="#f0000"><b>' . PROJECT_VERSION . '</b></font>.');

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');
}
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 04-13-2004, 08:17 AM
jpf's Avatar
jpf jpf is online now
Moderator

 
Join Date: Sep 2003
Location: Manitoba, Canada
Posts: 1,562
Thanks: 1
Thanked 84 Times in 71 Posts
Rep Power: 10
jpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of light
Default

I see:
define('TEXT_MAIN',

in your file SEVERAL TIMES! That would be your problem. Make sure your using a REAL text editor (not Notepad/Write/Word/edit.com.... They don't handle unix files very well and often add lines to a file which php does not like).

Try an editor like NoteTab or UltraEdit. I have lately been using Code Builders' HTML Builder XP - it's free (not a crippled or demo version) and is quite good.
__________________
JPF - osCMax Fourm Moderator
Try out our osCMax at: Live Catalog Demo
Limited access Admin: Live Admin Demo
Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 09-24-2004, 11:02 AM
Lurker
 
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ericaneu
Default

So... what you're saying is that there should only be one define text_main tag in the whole works? I'm having the same problem.

Thanks
Erica
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 09-24-2004, 11:21 AM
Member
 
Join Date: Aug 2004
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
wenzlerpaul
Default

Hi Erica,

Just to give you further idea,

1) JPF's response is perfectly correct, do not use any of those built in editor in Windows, use real editors like ultraedit (I personally use this) and those that JPF had mentioned

2) Yes, TEXT_MAIN should only be one, it also creates conflict even if you have set the codes correctly.

3) when you see a single quote inside the TEXT_MAIN, you should do it like this sample (e.g. people\'s instead of people's)

4) on the html codings, eliminate all double quotes that you see, sample below;

<table border="0" width="100%" cellspacing="5" cellpadding="2"> into

<table border=0 width=100% cellspacing=5 cellpadding=2>

Double quotes can cause a lot of trouble in php if you do not know how to handle them correctly.

Hope it helps,
Paul

Mabuhay
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.oscmax.com/forums/oscommerce-2-2-modification-help/2357-parse-error-line-13-a.html

Posted By For Type Date
Anyone use OS Commerce? - Open Minded Forums This thread Refback 04-11-2007 10:11 PM

Similar Threads

Thread Thread Starter Forum Replies Last Post
Parse error: parse error, unexpected T_NEW, expecting ')' oscnoob osCMax v1.7 Discussion 0 04-02-2005 02:27 PM
New Installation Parse error: parse error, unexpected T_STRI Anonymous osCMax v1.7 Installation 5 07-09-2004 06:06 AM
Fix for Parse Line 13 errors Plastic osCMax v1.7 Discussion 0 04-26-2004 05:17 PM
Parse error: parse error for product_listing.php midwestwebsites osCMax v1.7 Discussion 1 09-16-2003 01:21 PM
Parse error: parse error, unexpected T_STRING? HELP... hanool osCommerce 2.2 Modification Help 1 09-10-2003 10:38 AM


All times are GMT -8. The time now is 11:42 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax