Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

help fatal error


KJ666

Recommended Posts

Trying to use this add on http://addons.oscommerce.com/info/6250

and i get this in admin when trying to change categorys.

 

Fatal error: Call to undefined function tep_get_category_name() in /home/kjexotic/public_html/shop/admin/categories.php on line 905

 

It's this bit of code:

 

-Search,

	for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
	  $category_inputs_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory']  . '/images/' . $languages[$i]['image'],  $languages[$i]['name']) . ' ' .  tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']',  tep_get_category_name($cInfo->categories_id,  $languages[$i]['id']));
	}

	$contents[] = array('text' => '<br>' . TEXT_EDIT_CATEGORIES_NAME . $category_inputs_string);

Replace by:

	for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
	  $category_inputs_string .= '<br><br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'],  $languages[$i]['name']) . '<br>' . TEXT_CATEGORIES_NAME . '<br>' . tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']', tep_get_category_name($cInfo->categories_id, $languages[$i]['id'])) . '<br>' . TEXT_CATEGORIES_DESCRIPTION . '<br>' .  tep_draw_textarea_field('categories_description[' . $languages[$i]['id'] . ']', 'soft', 35, 4, tep_get_category_description($cInfo->categories_id, $languages[$i]['id']));

	}

	$contents[] = array('text' => $category_inputs_string);

Link to comment
Share on other sites

This code is in my /includes/functions/general.php

 

function tep_get_category_name($category_id, $language_id) {

$category_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$category_id . "' and language_id = '" . (int)$language_id . "'");

$category = tep_db_fetch_array($category_query);

 

return $category['categories_name'];

}

 

 

But apparently not yours....

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

I done it :)

 

Now i cant see it on the customer side of things, think it this code in wrong place:

	  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><?php echo $category['categories_description']; ?></td>

  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>

 

Where do you place that in index.php for it to show under the cat header, but above the products ??

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...