andycatax Posted May 4, 2009 Posted May 4, 2009 i Have installed Categories Description it it works great but i would like to add a html header bax as well as the Categories Description at the bottom of the page, i have coded it up as based on the Categories Description but adding a new database table here is the code i have added, from what i can tell the information is not inputting into the database. I have added the code below of the chages admin/catergoies.php $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'] . ']') . '<br>' . TEXT_CATEGORIES_DESCRIPTION . '<br>' . tep_draw_textarea_field('categories_description[' . $languages[$i]['id'] . ']', 'soft', 35, 4) . '<br>' . TEXT_CATEGORIES_HEADER . '<br>' . tep_draw_textarea_field('categories_header[' . $languages[$i]['id'] . ']', 'soft', 35, 4); $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'])) . '<br>' . TEXT_CATEGORIES_HEADER . '<br>' . tep_draw_textarea_field('categories_header[' . $languages[$i]['id'] . ']', 'soft', 35, 4, tep_get_category_header($cInfo->categories_id, $languages[$i]['id'])); Admin/ Includes/Functions/general.php function tep_get_category_header($category_id, $language_id) { $category_query = tep_db_query("select categories_header 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_header']; } and index.php $category_query = tep_db_query("select cd.categories_name, cd.categories_description, cd.categories_header from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'"); $category = tep_db_fetch_array($category_query); as you can see i have added to the categories_description categories_header I know its probably something real simple for you guys but i am a novice having a stab in the dark really!. Thanks for any help Andy Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.