Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

2x Categories Descriptions


Recommended Posts

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...