KJ666 Posted January 24, 2009 Share Posted January 24, 2009 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 More sharing options...
♥geoffreywalton Posted January 24, 2009 Share Posted January 24, 2009 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 More sharing options...
KJ666 Posted January 24, 2009 Author Share Posted January 24, 2009 Ummm, anyone know that what it says to place in when doing it on the txt file ?? Link to comment Share on other sites More sharing options...
KJ666 Posted January 24, 2009 Author Share Posted January 24, 2009 On the text file it does not say to add anything in to that file, where abouts does it go (does it need to go in there ?) Link to comment Share on other sites More sharing options...
KJ666 Posted January 25, 2009 Author Share Posted January 25, 2009 Anyody :(? Link to comment Share on other sites More sharing options...
KJ666 Posted January 25, 2009 Author Share Posted January 25, 2009 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 More sharing options...
KJ666 Posted January 26, 2009 Author Share Posted January 26, 2009 going up ? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.