Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

define HEADING_TITLE = Category Name?


Guest

Recommended Posts

Posted

Maybe it's just a matter of finding the variable for the Category Name, once you're there, but I think it's something more complicated like a query. With the default install, it says "Let's See What We Have Here," or "Categories" but I want it to say the category name. Maybe there's a contribution that you could point me towards?

 

Thanks for the help.

 

-undrline

Posted

Yes i would definately like the same help.

 

<?php

if ($category_depth == 'nested') {

$category_query = tep_db_query("select cd.categories_name, c.categories_image 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);

?>

 

seems to be the query

 

so far i have tried..but no worky

 

<?php echo $category['categories_name']; ?> <?php echo $category['cd.categories_name']; ?>

Posted

see my posts here : categories in heading

MS2 2.2 fr + Manufacturer copy (5 manufacturers - modified to make it works) + More pics 6 + FCK Editor + zones shipping (modified without weight) + My contribution : Shopping Cart Management for Unique Products

 

I apologize in advance for my poor English I'm French !

Posted

arr yeah cheers

 

this bit did it

 

<?php if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$category_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");

$category = tep_db_fetch_array($category_query);

if ($category['manufacturers_name'] != "") {echo $category['manufacturers_name'];} else { echo HEADING_TITLE;}

} else {

$category_query = tep_db_query("select cd.categories_name 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);

if ($category['categories_name'] != "") {echo $category['categories_name'];} else { echo HEADING_TITLE;}

}

?>

Posted

Here's what I added to the index.php somewhere around the same area after that IF statement...

 

<?php echo HEADING_TITLE; ?>: <?php echo $category['categories_name'] ?> </td>

 

HEADING_TITLE is defined as "Product Listing:". Seems to work well for me.

Posted

Wow, such activity! I actually figured it out myself - right after I posted - and replied to myself. I guess an admin or the system or something deleted my reply to myself: I know it's not good form.

 

I added a contribution . . . please see it here, and let me know if there are still questions.

 

Thanks everyone for paying attention.

 

-undrline

Archived

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

×
×
  • Create New...