sumario Posted May 30, 2006 Posted May 30, 2006 Hi, What i am looking for is the ability to give each catergoy a description, which will then appear when you go to a catergory above the product list for that catergory. If there is a way to do this, please point me in the right direction. Thank you.
kgt Posted May 30, 2006 Posted May 30, 2006 http://www.oscommerce.com/community/contributions,2343 Contributions Discount Coupon Codes Donations
sumario Posted May 30, 2006 Author Posted May 30, 2006 Hi again, This works well but one problem. It works perfectly when creating a new catergory and inputting a description. the description appears as well. But, i get an error when i try to edit any catergory. Even if it has a description i still get the same error. This is the error (it appears in the admin panel when i try to edit the cat) Fatal error: Call to undefined function: tep_get_category_description() in /home/bedmaker/public_html/cart/catalog/admin/categories.php on line 914 This is line 914 from that file: $category_desc_inputs_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_textarea_field('categories_description[' . $languages[$i]['id'] . ']', '', 20, 5, tep_get_category_description($cInfo->categories_id, $languages[$i]['id'])); Can any one help me to fix this issue? Thankyou.
kgt Posted May 30, 2006 Posted May 30, 2006 Looks like maybe you skipped a part in the instructions where you add tep_get_category_description() to includes/functions/general.php. Contributions Discount Coupon Codes Donations
sumario Posted May 30, 2006 Author Posted May 30, 2006 nope i did that... but better to be safe then sorry.
Guest Posted May 30, 2006 Posted May 30, 2006 Hi Sumear, By the sounds of it you have not fully installed the contribution. The fourth part of the install required you to insert the function that is missing - tep_get_category_description. HTH Philip
sumario Posted May 30, 2006 Author Posted May 30, 2006 Step was done correclty, pasted the code on the bottom before the ?>. just to test i pasted it in the middle of the file and the same error appeared. This is the code that needs to be in that file: function tep_get_category_description($category_id, $language_id) { $category_query = tep_db_query("select categories_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . $category_id . "' and language_id = '" . $language_id . "'"); $category = tep_db_fetch_array($category_query); return $category['categories_description']; }
kgt Posted May 30, 2006 Posted May 30, 2006 Step was done correclty, pasted the code on the bottom before the ?>. just to test i pasted it in the middle of the file and the same error appeared. This is the code that needs to be in that file: function tep_get_category_description($category_id, $language_id) { $category_query = tep_db_query("select categories_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . $category_id . "' and language_id = '" . $language_id . "'"); $category = tep_db_fetch_array($category_query); return $category['categories_description']; } I had a typo in my path - I missed the admin directory. You did add it to admin/includes/functions/general.php too, correct? Contributions Discount Coupon Codes Donations
sumario Posted May 30, 2006 Author Posted May 30, 2006 i fixed it just before you replied.... i started thinking. did the author meant the other file in admin? i tired and it work :P So that should be changed. its admin/includes no catalog/includes :D Thanks.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.