Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

YIKES! Error :(


LostInPHP

Recommended Posts

YIKES-O-RAMA! All was going well with my editing until I changed the welcome message.. I thought I was putting it in right, but when I saved the page and tried to view it I get this message at the top of the page

 

Parse error: parse error, unexpected T_STRING in /public_html/shoppingcart/includes/languages/english/default.php on line 13

 

Maybe I messed up something while entering the message here's my code

 

(Pardon my type-o's I was just rying to get the feel of the look of the text in place)

 

define('TEXT_MAIN', '<b>Welcome To Thistle Meadow Soaps <i>the</i> site for all your pampering needs<br>Whether your the King, Queen, Prince or Princess of your Castle we'll pamper you the way you deserve to be pampered....<br>Like Royality<i>!</i></b>');

define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');

define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');

define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

Help me I'm lost in PHP and I don't have a map!

Link to comment
Share on other sites

You have to escape the apostrophe.

 

Wrong:

 

define('TEXT_MAIN', '<b>Welcome To Thistle Meadow Soaps <i>the</i> site for all your pampering needs<br>Whether your the King, Queen, Prince or Princess of your Castle we'll pamper you the way you deserve to be pampered....<br>Like Royality<i>!</i></b>');

 

Right:

 

define('TEXT_MAIN', '<b>Welcome To Thistle Meadow Soaps <i>the</i> site for all your pampering needs<br>Whether your the King, Queen, Prince or Princess of your Castle we'll pamper you the way you deserve to be pampered....<br>Like Royality<i>!</i></b>');

 

This is pretty basic stuff. Have you read the docs at http://wiki.oscommerce.com ? That might help with other questions you might have. :wink:

Link to comment
Share on other sites

I've not been working in PHP very long ( an newbie myself), so I d/l a program called DZsoft php editor. They have a trial there and very inexpensive to buy. What has helped me in the very beginning on these kinds of issues, is that the text is color coded. When you make an error like that the text color changes from brown to light green giving you a red flag you have incorrect syntax. It changes instantly so it draws it to your attention. I still have my own problems (big ones), but this has helped with some really basic issues that I might normally overlook. By the way, there are more advanced editors out there, but this one is easy to use and not memory intensive. Hope this info is helpful to you.

 

Ruth in AZ

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...