Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change category and manufacturer images to text?


skeedo

Recommended Posts

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.

 

:?:

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...