Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

whats wrong with this code??? anyone???


Recommended Posts

I killed my website yet again! All I was trying to do was edit the index.php page to take out the "Whats new here" words and the little icon to the right of it. After that failed I copied pasted the original code back but it still wont work. I get a error:

 

Parse error: parse error, unexpected T_STRING in /home/virtual/site330/fst/var/www/html/includes/languages/english/index.php on line 13

 

 

Can anyone tell me whats wrong with this code so i can fix my site?? (If you know how to edit the code to work without the "Whats new here" words and without the little icon... I'd reallyyyyyyyyyyyyyyyyyy appreciate it. I'm so new to oscommerce and php... be gentle. crying.gif Any info. you can offer would be helpful because for some reason I keep killing my site even after returning the original code.

 

blink.gif

 

Code:

 

<?php

/*

$Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright ? 2003 osCommerce

*/

 

define('TEXT_MAIN', '');

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

Released under the GNU General Public License

 

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

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

 

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {

define('HEADING_TITLE', 'Let's See What We Have Here');

define('TABLE_HEADING_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', '<b>Show:</b>');

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') {

define('HEADING_TITLE', 'What's New Here?');

} elseif ($category_depth == 'nested') {

define('HEADING_TITLE', 'Categories');

}

?>

Link to comment
Share on other sites

Move

 

Released under the GNU General Public License

back to where it should be, above the */

 

  osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
define('TEXT_MAIN', '');
define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');
define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');
define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

Link to comment
Share on other sites

And please don't double post.

 

 

:'( i sorry... It was in the wrong forum initially.

 

I'm just so lost... I did those changes and it's still not working... now it says Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/virtual/site330/fst/var/www/html/includes/languages/english/index.php on line 33

 

I just dont understand what that means and I dont know how/where to get an editor so I know which line is line 33 so I can narrow the problem down.

 

:'( can anyone offer any other ideas? Here is my new code: I really do appreciate the help.. you all are so kind... I feel so stupid but I'm trying so hard to learn this stuff. Thanks for your patience. :'( Luv, Jan

 

<?php

/*

$Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

Released under the GNU General Public License

*/

 

define('TEXT_MAIN', '');

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') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {

define('HEADING_TITLE', 'Let\'s See What We Have Here');

define('TABLE_HEADING_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', '<b>Show:</b>');

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') {

define('HEADING_TITLE', 'Let\'s See What We Have Here'); } elseif ($category_depth == 'nested') {

define('HEADING_TITLE', 'Categories');

}

?>

Link to comment
Share on other sites

:-" Me again!

 

I found a file with the index.php code from the other day... i replaced it with that and all is working again... I still dont have the stupid words "whats new here" and that little graphic taken off.. but until I learn more I guess even that is beyond me. I appreciate your help and your time.

 

:blink: Newbie

Link to comment
Share on other sites

:-"  Me again!

 

I found a file with the index.php code from the other day...  i replaced it with that and all is working again... I still dont have the stupid words "whats new here" and that little graphic taken off..  but until I learn more I guess even that is beyond me.  I appreciate your help and your time.

 

:blink:  Newbie

 

 

try changing

 

define('TEXT_BUY', 'Buy 1 '');

define('TEXT_NOW', '' now');

 

with

 

define('TEXT_BUY', 'Buy 1 ');

define('TEXT_NOW', ' now');

Treasurer MFC

Link to comment
Share on other sites

try changing

 

define('TEXT_BUY', 'Buy 1 '');

define('TEXT_NOW', '' now');

 

with

 

define('TEXT_BUY', 'Buy 1 ');

define('TEXT_NOW', ' now');

 

Thank you Amanda! Now that I see that I will know to keep an eye out for it in the future... kinda like the "What\'s" thing... Thank you Peter for your help with that!

 

I was able to get rid of the words finally.... it was simple once I found the original code. For some reason when i copied and pasted the code .. it changed some stuff in the code... I know I didn't add the extra little ' (that i know of :blink: )

 

Is there a program that i can copy/paste the original code into before making changes in case my changes dont work (something that wont mess up the code)?

 

Again.. thank you!!!

Link to comment
Share on other sites

Thank you Amanda!  Now that I see that I will know to keep an eye out for it in the future... kinda like the "What\'s" thing... Thank you Peter for your help with that!

 

I was able to get rid of the words finally.... it was simple once I found the original code.  For some reason when i copied and pasted the code .. it changed some stuff in the code... I know I didn't add the extra little '  (that i know of  :blink:  )

 

Is there a program that i can copy/paste the original code into before making changes in case my changes dont work (something that wont mess up the code)? 

 

Again..  thank you!!!

 

I know you didn\'t change that code because I have seen many others with the same problem in this forum. The only thing I can tell you is NOT to use the editor in OSC, it is known for it's strange behaviour.

Simply use your wordpad editor for these things.

Treasurer MFC

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...