Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fatal error:


TaylorMadeScrap

Recommended Posts

I was trying to omit the language box on the right side column... I just wanted to leave it out, (but not delete) incase i need it later.... When I did it I got this error:

 

Fatal error: Cannot instantiate non-existent class: language in /var/www/html/oscommerce/includes/boxes/languages.php on line 24

 

 

Here is a copy of what I did:

<?php

/*

$Id: languages.php,v 1.15 2003/06/09 22:10:48 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

?>

<!-- languages //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_LANGUAGES);

 

new infoBoxHeading($info_box_contents, false, false);

 

if (!isset($lng) || (isset($lng) && !is_object($lng))) {

// include(DIR_WS_CLASSES . 'language.php');

$lng = new language;

}

 

$languages_string = '';

reset($lng->catalog_languages);

while (list($key, $value) = each($lng->catalog_languages)) {

$languages_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> ';

}

 

$info_box_contents = array();

$info_box_contents[] = array('align' => 'center',

'text' => $languages_string);

 

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- languages_eof //-->

 

Do you see where I messed up? Thanks for you help in advance!

Link to comment
Share on other sites

To eliminate the language box from showing in your column_right.php, just open that file (not languages), find the part just before the bottom that reads

  if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
   include(DIR_WS_BOXES . 'languages.php');
   include(DIR_WS_BOXES . 'currencies.php');
 }

and comment the include for languages like so:

  if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
//    include(DIR_WS_BOXES . 'languages.php');
   include(DIR_WS_BOXES . 'currencies.php');
 }

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...