Is anyone familiar with syntax? - HotUKDeals
We use cookie files to improve site functionality and personalisation. By continuing to use HotUKDeals, you accept our cookie and privacy policy.
Get the HotUKDeals app free at Google Play

Search Error

An error occurred when searching, please try again!

Login / Sign UpSubmit

Is anyone familiar with syntax?

£0.00 @
Hi all ive messed up with trying to edit some wording on my website and im getting a syntax error does anyone know anything bout this that could point out to me where ive gone wrong? TIA :-D Read More
loupomm Avatar
9y, 8m agoPosted 9 years, 8 months ago
Hi all

ive messed up with trying to edit some wording on my website and im getting a syntax error

does anyone know anything bout this that could point out to me where ive gone wrong?

TIA :-D
loupomm Avatar
9y, 8m agoPosted 9 years, 8 months ago
Options

All Comments

(21) Jump to unreadPost a comment
Comments/page:
#1
Let me see... what exactly is the problem?
#2
I get this message after trying to change the text on my main page:

Parse error: syntax error, unexpected T_STRING in then the name of the index page i was trying to edit

dreamhost have emailed this:

Here at
Dreamhost, we keep automatic snapshots (or backups) of all your files.
You can access them by manually changing the directory into the hidden
".snapshot" folder set up within each of your folders.

There are usually six subfolders within the .snapshot folder, each with
backups from different times:

hourly.0/ (one hour ago)
hourly.1/ (two hours ago)
nightly.0/ (one day ago)
nightly.1/ (two days ago)
weekly.0/ (one week ago)
weekly.1/ (two weeks ago)

but i do not see where i can find them

thanks by the way :)
#3
If you show me the page with the error I can help more... it's probably a missing or surplus " ; or )
#4
how can i do that, as it just displays the error above, theres nothing else on the page?
#5
or do you mean the syntax?

sorry im not that good at this kinda stuff lol
#6
if you give me the url I can go and look.. or you can paste the part of the code you edited in this thread
#7
ok well this is the code:

/**
* @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: index.php 3027 2006-02-13 17:15:51Z drbyte $
*/

define('TEXT_MAIN','This is the main define statement for the page for english when no template defined file exists. It is located in: /includes/languages/english/index.php');

// Showcase vs Store
if (STORE_STATUS == '0') {
define('TEXT_GREETING_GUEST', 'Welcome Guest! Would you like to log yourself in?');
} else {
define('TEXT_GREETING_GUEST', 'Welcome, please enjoy our online showcase.');
}

define('TEXT_GREETING_PERSONAL', 'Hello %s! Would you like to see our newest additions?');

define('TEXT_INFORMATION', 'Define your main Index page copy here.');

//moved to english
//define('TABLE_HEADING_FEATURED_PRODUCTS','Featured Products');

//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') || (zen_check_url_get_terms()) ) {
// This section deals with product-listing page contents
define('HEADING_TITLE', 'Available Products');
define('TABLE_HEADING_IMAGE', 'Product 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', 'Filter Results by:');
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') {
// This section deals with the "home" page at the top level with no options/products selected
/*Replace this text with the headline you would like for your shop. For example: 'Welcome to My SHOP!'*/
define('HEADING_TITLE', 'Congratulations! You have successfully installed your Zen Cart™ E-Commerce Solution.');
} elseif ($category_depth == 'nested') {
// This section deals with displaying a subcategory
/*Replace this line with the headline you would like for your shop. For example: 'Welcome to My SHOP!'*/
define('HEADING_TITLE', 'Welcome to our store,it's free,so knock yourself out!');
}
?>

it was the last section, the welcome text
#8
try adding [COLOR="Red"]/[/COLOR] or [COLOR="Red"]\[/COLOR] infront of all the [COLOR="Red"]'[/COLOR] in the sentance you added.
#9
ok i'll try that now, thank you
#10
Very quick glance at the code:

define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');
define('TEXT_SHOW', 'Filter Results by:');
define('TEXT_BUY', 'Buy 1 \[COLOR=Red]''[/COLOR]);
define('TEXT_NOW', '\' now');

Why are there two single primes, '' there, where else has just a single ' ?

That'd be what i'd change 1st anyways.
Delete one of the two ''
#11
to make it clearer...

define('HEADING_TITLE', 'Welcome to our store, it[COLOR="Red"]/[/COLOR]'s free,so knock yourself out!');

or

define('HEADING_TITLE', 'Welcome to our store, it[COLOR="Red"]\[/COLOR]'s free,so knock yourself out!');
#12
boydent999
Very quick glance at the code:

define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');
define('TEXT_SHOW', 'Filter Results by:');
define('TEXT_BUY', 'Buy 1 \[COLOR=Red]''[/COLOR]);
define('TEXT_NOW', '\' now');

Why are there two single primes, '' there, where else has just a single ' ?

That'd be what i'd change 1st anyways.
Delete one of the two ''


Well spotted, lol... that could well be the problem, I was just looking at the last part with the welcome text, i assumed that's all that had been changed... :P
#13
nope :-( , that just changes the error to 'an unexpected /'
#14
boydent999
Very quick glance at the code:

define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');
define('TEXT_SHOW', 'Filter Results by:');
define('TEXT_BUY', 'Buy 1 \[COLOR=Red]''[/COLOR]);
define('TEXT_NOW', '\' now');

Why are there two single primes, '' there, where else has just a single ' ?

That'd be what i'd change 1st anyways.
Delete one of the two ''


ok i'll change that thank you :)
#15
nope still no luck, think i might have to uninstall and re install
1 Like #16
have you tried re-uploading it binary mode?
1 Like #17
Just as a simple test then, undo the 2 changes that TheDoc and i have suggested
Change:
define('HEADING_TITLE', 'Welcome to our store,it's free,so knock yourself out!');

to be
define('HEADING_TITLE', 'Hello');

Just summat simple with no unnecessary text in there......
#18
ok ty i'll try that, yes ive tried Binary
#19
Sorry guys, had to sort kids out, dreamhost have rectified it for me, thanks for the help, still not ameded the text, too scared to try again :)

lol

rep left
#20
No need to be scared, this is how you learn - carry on editing but make one change at a time and always keep a local copy of code that you know works which makes it easy for you to rollback if you make a mistake. As long as you only make one change at a time you'll always know where the problem is and be able to fix it or at least get more precise help.

John
#21
Good shout John :)

Post a Comment

You don't need an account to leave a comment. Just enter your email address. We'll keep it private.

...OR log in with your social account

...OR comment using your social account

Thanks for your comment! Keep it up!
We just need to have a quick look and it will be live soon.
The community is happy to hear your opinion! Keep contributing!