Results 1 to 4 of 4

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 ...

      
  1. #1
    Lurker
    Join Date
    Apr 2004
    Posts
    2
    Rep Power
    0


    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');
    }
    ?>

  2. #2
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    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 - To contact, post on the forum or click here
    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!

  3. #3
    Lurker
    Join Date
    Sep 2004
    Posts
    1
    Rep Power
    0


    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

  4. #4
    Member
    Join Date
    Aug 2004
    Posts
    41
    Rep Power
    0


    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

LinkBacks (?)


Similar Threads

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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •