Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

index.php problem


greenelephantpainting

Recommended Posts

Hi,

 

I finally thought I knew a little. I started making progress on changing the text on the first page of my store. It was working fine. I at this point was only changing text not any of the codes.

 

Then after many changes and checking to see if it was working - and it was - I changed a small portion of the text in the stream below. All I changed was the text that says <b>Change text</b> The only part I changed was Change text (not the codes before or after it). This had worked earlier higher up on the page.

 

 

</td></tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td><td class="main" valign="top"><b>Change text</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

 

When I went back to view my store it came up with this error message:

 

Parse error: parse error, unexpected T_STRING in /home/gets9/public_html/includes/languages/english/index.php on line 13

 

Can anyone tell me how to fix my error?

 

Thanks so much.

 

April

Link to comment
Share on other sites

Hi,

 

I finally thought I knew a little. I started making progress on changing the text on the first page of my store. It was working fine. I at this point was only changing text not any of the codes.

 

Then after many changes and checking to see if it was working - and it was - I changed a small portion of the text in the stream below. All I changed was the text that says <b>Change text</b> The only part I changed was Change text (not the codes before or after it). This had worked earlier higher up on the page.

</td></tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td><td class="main" valign="top"><b>Change text</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

 

When I went back to view my store it came up with this error message:

 

Parse error: parse error, unexpected T_STRING in /home/gets9/public_html/includes/languages/english/index.php on line 13

 

Can anyone tell me how to fix my error?

 

Thanks so much.

 

April

 

"parse error, unexpected T_STRING in /home/gets9/public_html/includes/languages/english/index.php on line 13"

 

Copy all the code from the page you have edited and find line 13, then can you paste line 13 here and I may be able to help you (I think you had the same error I did)

Link to comment
Share on other sites

"parse error, unexpected T_STRING in /home/gets9/public_html/includes/languages/english/index.php on line 13"

 

Copy all the code from the page you have edited and find line 13, then can you paste line 13 here and I may be able to help you (I think you had the same error I did)

 

I believe this would be the 13th line. I counted the lines that were blank in the page I edited also.

 

define('TEXT_MAIN', 'This store is <b>NOT</b> operational at this time. Expected opening

Link to comment
Share on other sites

I believe this would be the 13th line. I counted the lines that were blank in the page I edited also.

 

define('TEXT_MAIN', 'This store is <b>NOT</b> operational at this time. Expected opening

 

That's only the beginning of the line; can you give us everything from there until the next closing bracket?

Link to comment
Share on other sites

That's only the beginning of the line; can you give us everything from there until the next closing bracket?

 

Here is the whole thing. The last change I made that didn't work is on line 16th and 17th lines of this text. The last word on the 16th line - Change - and the first word on the 17th line - text -.

 

define('TEXT_MAIN', 'This store is <b>NOT</b> operational at this time. Expected opening date is March 1, 2006. 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>Come in and Vist! </b><br><span class="messageStackError">You get a FREE gift with every purchase!</span> <br><br>My name is April and my friend is Trumpet (the green elephant) we started the, Green Elephant Store. We provide you with high quality hard-to-find plush toys at very reasonable prices.</span><br><br> Visit our store and check out our prices. </span><br><br>You will find it hard to leave until you have browsed through all of the wonderful plush toys and checked to see if that one item you have been looking for is here.</span><br><br> We love selling stuffed animals especially the baby toys. We receive so many emails from parents thanking us for providing them a chance to "replace" that toy their child loves but is lost or just plain worn out. </span><br><br> Recently one of our Valentine plush Opus was used by a customer to propose to his girlfriend. We are sure that Valentine Opus played a big part in her answer! </td></tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td><td class="main" valign="top"><b>Change text</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"

Link to comment
Share on other sites

Here is the whole thing. The last change I made that didn't work is on line 16th and 17th lines of this text. The last word on the 16th line - Change - and the first word on the 17th line - text -.

 

define('TEXT_MAIN', 'This store is <b>NOT</b> operational at this time. Expected opening date is March 1, 2006. 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>Come in and Vist! </b><br><span class="messageStackError">You get a FREE gift with every purchase!</span> <br><br>My name is April and my friend is Trumpet (the green elephant) we started the, Green Elephant Store. We provide you with high quality hard-to-find plush toys at very reasonable prices.</span><br><br> Visit our store and check out our prices. </span><br><br>You will find it hard to leave until you have browsed through all of the wonderful plush toys and checked to see if that one item you have been looking for is here.</span><br><br> We love selling stuffed animals especially the baby toys. We receive so many emails from parents thanking us for providing them a chance to "replace" that toy their child loves but is lost or just plain worn out. </span><br><br> Recently one of our Valentine plush Opus was used by a customer to propose to his girlfriend. We are sure that Valentine Opus played a big part in her answer! </td></tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td><td class="main" valign="top"><b>Change text</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"

 

Of course the lines changed when I posted this so now you can't go by what I said about the 16th and 17th lines - it depends how it comes up on your computer.

Link to comment
Share on other sites

OK, the problem seems to be the use of apostrophes in your text. You need to escape them with backslashes, like so:

 

\'

 

Replace this:

 

define('TEXT_MAIN', '<span class="messageStackSuccess">This is a default setup of the osCommerce project...</span>')

 

with this:

 

define(\'TEXT_MAIN\', \'<span class="messageStackSuccess">This is a default setup of the osCommerce project...</span>\')

 

and replace this:

 

define('TEXT_MAIN', '')

 

with this:

 

define(\'TEXT_MAIN\', \'\')

 

That should do the trick :)

Link to comment
Share on other sites

OK, the problem seems to be the use of apostrophes in your text. You need to escape them with backslashes, like so:

 

\'

 

Replace this:

 

define('TEXT_MAIN', '<span class="messageStackSuccess">This is a default setup of the osCommerce project...</span>')

 

with this:

 

define(\'TEXT_MAIN\', \'<span class="messageStackSuccess">This is a default setup of the osCommerce project...</span>\')

 

and replace this:

 

define('TEXT_MAIN', '')

 

with this:

 

define(\'TEXT_MAIN\', \'\')

 

That should do the trick :)

 

Thank you. I will try that. Thanks a lot.

Link to comment
Share on other sites

Thank you. I will try that. Thanks a lot.

 

I did the \ before the apostrophes and then the error said:

 

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/gets9/public_html/includes/languages/english/index.php on line 13

 

Parse error: parse error, unexpected T_STRING in /home/gets9/public_html/includes/languages/english/index.php on line 13

 

Sorry, I think I'm getting more lost.

 

April

Link to comment
Share on other sites

I did the \ before the apostrophes and then the error said:

 

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/gets9/public_html/includes/languages/english/index.php on line 13

 

Parse error: parse error, unexpected T_STRING in /home/gets9/public_html/includes/languages/english/index.php on line 13

 

Sorry, I think I'm getting more lost.

 

April

 

 

Hi,

 

Thanks for all the help. My boss came by and fixed my problem. It's great to have a boss that doesn't yell at you for not doing your work, but instead helps you with your extra curricular stuff instead.

 

AGAIN - THANK YOU FOR ALL YOUR RESPONSES - YOU ARE WONDERFUL!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...