skeedo Posted May 3, 2003 Posted May 3, 2003 I have a lot of categories and a lot of manufacturers, I was wondering what I could change to make my catalog just display the category and manufacturer name in text rather than an image. :?:
JenRed Posted May 4, 2003 Posted May 4, 2003 I found this on my hard drive with my other downloaded mods, but can't find it on the Contributions site. Maybe I just saved some text from the Forums here? Anyway it should work - I haven't tried it though. Replace Category images with Category Name only-------------------------------------------------------------------------- Open up catalog/includes/functions/general.php and add: Code: function tep_get_categories_name($cPath) { $categories_query = tep_db_query("SELECT categories_name FROM " . TABLE_CATEGORIES_DESCRIPTION . " WHERE categories_id = '" . $cPath . "'"); $products_category = tep_db_fetch_array($categories_query); return ($products_category['categories_name'] == "" ? "N/A" : $products_category['categories_name']); } Then, in catalog/default.php, find this line (approx line 270): Code: <td align="right" class="pageHeading"> <?php echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> Replace it with: Code: <td align="right" class="pageHeading"><?php echo tep_get_categories_name($cPath); ?></td> This will get rid of the category images, and replace with the categories name. Not right for everyone of course, but on some sites using the name only looks better. Jen I haven't lost my mind - I have it backed up on disk somewhere.
skeedo Posted May 4, 2003 Author Posted May 4, 2003 Thanks that worked great, any idea how to do it for Manufacturer?
JenRed Posted May 4, 2003 Posted May 4, 2003 Youcan just upload all the Manufacturer images as a 1 x 1 px transparent (or the colour of your background) gif and do it that way. Or simply comment out the bit that calls for the image to show up. Jen I haven't lost my mind - I have it backed up on disk somewhere.
skeedo Posted May 5, 2003 Author Posted May 5, 2003 Could I do something like <?php echo tep_get_manufacturers_name($cPath); ?> also? Thanks so much.
JenRed Posted May 5, 2003 Posted May 5, 2003 I have no idea! I can implement code that other people tell me about but that's about it... :) Hopefully somebody else here will know. Jen I haven't lost my mind - I have it backed up on disk somewhere.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.