Results 1 to 10 of 10
  1. #1
    Join Date
    May 2011
    Location
    Sydney, Australia
    Posts
    32
    Plugin Contributions
    0

    Default Syntax Error on Line 13

    Hi Everyone

    I'm using Zen-Cart version 1.3.9h (new install) and my site was working fine last night except now I can't even view the main page because of this:

    [PHP Parse error: syntax error, unexpected T_STRING in /home/amabelle/public_html/shop/includes/languages/english/shopping_cart.php on line 13

    Below is the code:
    PHP Code:
    <?php
    /**
     * @package languageDefines
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: shopping_cart.php 3183 2006-03-14 07:58:59Z birdbrain $
     */

    define('NAVBAR_TITLE''Shopping Cart');
    define('HEADING_TITLE''Your Shopping Cart Contents');
    define('HEADING_TITLE_EMPTY''Your Shopping Cart');
    define('TEXT_INFORMATION''Products currently in your cart');
    define('TABLE_HEADING_REMOVE''Remove');
    define('TABLE_HEADING_QUANTITY''Qty.');
    define('TABLE_HEADING_MODEL''Model');
    define('TABLE_HEADING_PRICE','Unit');
    define('TEXT_CART_EMPTY''Your Shopping Cart is empty.');
    define('SUB_TITLE_SUB_TOTAL''Sub-Total:');
    define('SUB_TITLE_TOTAL''Total:');

    define('OUT_OF_STOCK_CANT_CHECKOUT''Products marked with ' STOCK_MARK_PRODUCT_OUT_OF_STOCK ' are out of stock or there are not enough in stock to fill your order.<br />Please change the quantity of products marked with (' STOCK_MARK_PRODUCT_OUT_OF_STOCK '). Thank you');
    define('OUT_OF_STOCK_CAN_CHECKOUT''Products marked with ' STOCK_MARK_PRODUCT_OUT_OF_STOCK ' are out of stock.<br />Items not in stock will be placed on backorder.');

    define('TEXT_TOTAL_ITEMS''Total Items: ');
    define('TEXT_TOTAL_WEIGHT''&nbsp;&nbsp;Weight: ');
    define('TEXT_TOTAL_AMOUNT''&nbsp;&nbsp;Amount: ');

    define('TEXT_VISITORS_CART''<a href="javascript:session_win();">[help]</a>');
    define('TEXT_OPTION_DIVIDER''&nbsp;-&nbsp;');
    ?>
    Any help or suggestions would be most appreciated!
    Thank you

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Syntax Error on Line 13

    Quote Originally Posted by Amabelle View Post
    Hi Everyone

    I'm using Zen-Cart version 1.3.9h (new install) and my site was working fine last night except now I can't even view the main page because of this:

    [PHP Parse error: syntax error, unexpected T_STRING in /home/amabelle/public_html/shop/includes/languages/english/shopping_cart.php on line 13
    Can you access the admin section of your store? If so, please navigate your way to

    /configuration/Stock/ and see what you have set for the "Mark product out of stock" entry.

    The default entry is "***". The problem you are experiencing could a a result of an unescaped 'illegal' character in the text string (such as an apostrophe).

    The code you posted doesn't appear to have any errors itself, which is what led me to this particular definition setting.

    I could also be way off the mark.

    Cheers
    Rod

  3. #3
    Join Date
    May 2010
    Location
    Cyberspace
    Posts
    376
    Plugin Contributions
    0

    Default Re: Syntax Error on Line 13

    Are you using the pre-built template or are you using a custom template ?

  4. #4
    Join Date
    May 2011
    Location
    Sydney, Australia
    Posts
    32
    Plugin Contributions
    0

    Default Re: Syntax Error on Line 13

    Hi RodG and Soniccc
    Thanks so much for responding, I do appreciate it!

    RodG - I'm able to get into the Admin section and did what you suggested. The default entry of "***" is still there and hasn't been touched. I've tried researching the rest of the site for possible answers and from what I can see, there are no odd apostrophes or other out of context characters.

    Soniccc - this is the default template that comes with 1.3.9h
    I have added the following modules:
    1. Auspost
    2. BackupZencart
    3. Navigation dropdown menu
    4. Paypal

    The rest of the site has just been altered with regards to colour, spacing etc.

  5. #5
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: Syntax Error on Line 13

    When you say "added PayPal" - How did you add it?
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  6. #6
    Join Date
    May 2011
    Location
    Sydney, Australia
    Posts
    32
    Plugin Contributions
    0

    Default Re: Syntax Error on Line 13

    Hi Kim,

    I went into the Admin->Modules->Payment->Paypal IPN and then clicked the "Install" button on the right and configured everything.
    I also did a test run and a client was able to buy a product last night so I thought I had done everything as specified in the tutorial?
    (http://www.zen-cart.com/wiki/index.php/PayPal )

  7. #7
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Syntax Error on Line 13

    Quote Originally Posted by Amabelle View Post
    The rest of the site has just been altered with regards to colour, spacing etc.
    It looks as though you've only made one change to:
    /includes/languages/english/shopping_cart.php, and this is thise line:
    define('TEXT_INFORMATION', 'Products currently in your cart');

    I don't see anything amiss with this line, but if I were you, before looking elsewhere, I'd replace this file with an unmodified copy and see if the problem goes away. If so, just re-edit this line, save the changes, and check again.. If its still ok, shrug your shoulders then forget about the exact cause.

    If replacing the apparent offending file with an origianl copy doesn't solve the issue then this is a red herring, and we'll need to start considering other possibilities (not that I can think of any at the moment).

    Cheers
    Rod

  8. #8
    Join Date
    May 2011
    Location
    Sydney, Australia
    Posts
    32
    Plugin Contributions
    0

    Default Re: Syntax Error on Line 13

    Hi RodG

    Thanks for that, I'll definitely give it a go. Sometimes the best thing to do is the most obvious, huh?

  9. #9
    Join Date
    May 2011
    Location
    Sydney, Australia
    Posts
    32
    Plugin Contributions
    0

    Default Re: Syntax Error on Line 13

    mmm so I tried replacing the file and it still didn't work and I think I botched things quite badly. Thankfully I had made backups (I do backups every month) so I'm just going to reinstall and see how I go.

    Thank you everyone for your help and suggestions!

  10. #10
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Syntax Error on Line 13

    Quote Originally Posted by Amabelle View Post
    I'm using Zen-Cart version 1.3.9h (new install)
    Quote Originally Posted by Amabelle View Post
    Hi Kim,

    I went into the Admin->Modules->Payment->Paypal IPN and then clicked the "Install" button
    With all due respect, if you're using v1.3.9h then there is no such option as a module named "PayPal IPN". If you're really using v1.3.9 then it's called "PayPal Website Payments Standard - IPN". If yours says "PayPal IPN" then you've got old language files mixed up in your site, and you should be fixing that before you do anything else.

    And, you really should be using PayPal Express Checkout instead of WPS/IPN, as EC is designed to work with online stores way better than the old architecture PayPal started with when the IPN idea was created.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Replies: 1
    Last Post: 25 Aug 2011, 05:58 AM
  2. Replies: 0
    Last Post: 18 Jun 2010, 03:19 PM
  3. Replies: 3
    Last Post: 13 Mar 2009, 05:20 PM
  4. SQL Syntax error: check for right syntax to use near '000000
    By gabyone in forum General Questions
    Replies: 2
    Last Post: 9 Feb 2008, 08:23 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR