Results 1 to 7 of 7
  1. #1
    Join Date
    May 2007
    Location
    Brighton/Hove/Sussex
    Posts
    144
    Plugin Contributions
    0

    Default to display product only, no qty/price, syntax error= unexpected T_STRING

    Been adding products & customising over time, not yet promoted this section of site heavily, but...

    I have addded a number of products for sale, yet just made my first product (or attempted to) to show it but without price/stock, intended as a display only, as its sold via another product & in with a special.

    After doing this the error came up in my test!
    Parse error:syntax error, unexpected T_STRING in
    includes/languages/custom/english/shopping_cart.php on line 17

    Have not recently changed that file & cannot work out what variable is causing this new problem.
    If its related to 'display product' with no price or quantity set, then how can I still show some products without them being available to buy & incur the cart problem?

    Cannot find any specific thread on this topic.
    Shop on version 1.3.7 otherwise working great, waiting for 1.3.8 to settle down before a possible upgrade.
    Original store was 1.39:- TransportPostcards.co.uk/shop (redirecting out)
    Working on a fresh new store... 1.56a TransportPostcards.co.uk/store
    Appreciate Zen-Cart? - Always keep a banner link on your shop

  2. #2
    Join Date
    May 2007
    Location
    Brighton/Hove/Sussex
    Posts
    144
    Plugin Contributions
    0

    Default Re: to display product only, no qty/price, syntax error= unexpected T_STRING

    Quote Originally Posted by Dinnages View Post

    After doing this the error came up in my test!
    Parse error:syntax error, unexpected T_STRING in
    includes/languages/custom/english/shopping_cart.php on line 17
    Since my earlier posting I think its not connected, as I mentioned as I now have the one product without quantity & a SOLD OUT image has replaced the ad to cart.

    However, I still get the error message (in italics above) everytime anyone now goes to the shopping_cart.php
    So now no one can buy anything if they wanted to, so how the heck has this suddenly started being a problem?

    Totally baffled by that & as yet cannot work out whats on line 17 of the error.

    txt version of php file attached!
    Attached Files Attached Files
    Original store was 1.39:- TransportPostcards.co.uk/shop (redirecting out)
    Working on a fresh new store... 1.56a TransportPostcards.co.uk/store
    Appreciate Zen-Cart? - Always keep a banner link on your shop

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

    Default Re: to display product only, no qty/price, syntax error= unexpected T_STRING

    Have you tried deleting that file from your server and putting a fresh copy of the original uncustomized version into your custom folder?
    Then see if it works.
    Then customize it slowly ... one change at a time, testing carefully after each line to be sure things are fine ... until done.
    .

    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.

  4. #4
    Join Date
    May 2007
    Location
    Brighton/Hove/Sussex
    Posts
    144
    Plugin Contributions
    0

    Default Re: to display product only, no qty/price, syntax error= unexpected T_STRING

    Quote Originally Posted by DrByte View Post
    Have you tried deleting that file from your server and putting a fresh copy of the original uncustomized version into your custom folder?
    Then see if it works.
    Then customize it slowly ... one change at a time, testing carefully after each line to be sure things are fine ... until done.
    Thanks for picking up the plea for help DrByte.
    I just cannot understand how it has got changed, not tinkered with that file itself ever to my recollection unless through the admin panel itself.

    Shall locate an original & go from there.
    Still yet to get the shop cart working as I like it as still selling through my former pages with each item having a 'buy-now' button coding.
    When it does start generating some cash Id donate, but where does the money go?
    Original store was 1.39:- TransportPostcards.co.uk/shop (redirecting out)
    Working on a fresh new store... 1.56a TransportPostcards.co.uk/store
    Appreciate Zen-Cart? - Always keep a banner link on your shop

  5. #5
    Join Date
    May 2007
    Location
    Brighton/Hove/Sussex
    Posts
    144
    Plugin Contributions
    0

    Default Re: to display product only, no qty/price, syntax error= unexpected T_STRING

    Found just my added text for the page around line 17 was a problem, no coding had been altered, and it seemed to work after trying to change this;

    'Low-Order Fee'
    from single quotes to using codes;
    - Low-Order Fee -

    but worked with this;
    <i>Low-Order Fee</i>
    Nothing else was different!

    All those at an early stage need sometimes is guide to the right place.
    Thanks
    Original store was 1.39:- TransportPostcards.co.uk/shop (redirecting out)
    Working on a fresh new store... 1.56a TransportPostcards.co.uk/store
    Appreciate Zen-Cart? - Always keep a banner link on your shop

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

    Default Re: to display product only, no qty/price, syntax error= unexpected T_STRING

    Gordon-

    PHP (the language Zen Cart is written in) is very picky about quotes - when used in a language definition the must be escaped - Escaping means putting a backslash in front of the single quote so that it is read correctly.

    Example:

    'Low-Order Fee'

    becomes:

    \'Low-Order Fee\'
    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.

  7. #7
    Join Date
    May 2007
    Location
    Brighton/Hove/Sussex
    Posts
    144
    Plugin Contributions
    0

    Default Re: to display product only, no qty/price, syntax error= unexpected T_STRING

    Thanks for that added thought.
    I have studied html & javascript enough to be able to write pages in notepad on the fly (no books to hand) have yet to master CSS, & have 2 books on PHP & thats a bit baffling hence I came to Zen-Cart for the leg up for a working & customisable cart.

    Again it was just a very simple error, & so often many are.
    I shall now repost the other query elsewhere.
    Thanks folks
    Original store was 1.39:- TransportPostcards.co.uk/shop (redirecting out)
    Working on a fresh new store... 1.56a TransportPostcards.co.uk/store
    Appreciate Zen-Cart? - Always keep a banner link on your shop

 

 

Similar Threads

  1. Replies: 20
    Last Post: 21 Nov 2010, 02:48 AM
  2. syntax error, unexpected T_STRING in ipn_main_handler.php
    By saplanet in forum Upgrading from 1.3.x to 1.3.9
    Replies: 5
    Last Post: 3 Oct 2010, 01:52 AM
  3. Replies: 9
    Last Post: 5 Feb 2010, 01:12 AM
  4. Replies: 8
    Last Post: 5 Mar 2009, 06:40 PM
  5. Replies: 6
    Last Post: 21 Sep 2008, 04:48 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR