Cool beans.
One thing at a time then. Let's start with replacing the category header text with an image.
First thing is to make space in your database for a second category image. Run this SQL:
Code:
ALTER TABLE `categories` ADD `categories_image_header` VARCHAR( 64 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL ;
Now you'll need to be able to add an image there.
If you haven't modified your admin/categories.php file and you're using ZC1.3.7, you can replace it with the attached file. If you have modified that file, I recommend using WinMerge to do a file compare. There are three new sections that need to be added.
Last is to make it display.
In your includes/templates/YOUR_TEMPLATE/templates/tpl_index_product_list.php file, replace this:
Code:
<h1 id="productListHeading"><?php echo $breadcrumb->last(); ?></h1>
with this:
Code:
<?php
$the_products_category = $db->Execute("select categories_image_header from " . TABLE_CATEGORIES . " where categories_id= '" . $current_category_id . "'");
$category_image_header = $the_products_category->fields['categories_image_header'];
if ($category_image_header) {
?>
<div id="categoryImgHeaderListing" class="categoryImgHeader"><?php echo zen_image(DIR_WS_IMAGES . $category_image_header, '', YOUR_WIDTH_HERE, YOUR_HEIGHT_HERE); ?></div>
<?php } else { ?>
<h1 id="productListHeading"><?php echo $breadcrumb->last(); ?></h1>
<?php } ?>
You'll need to alter the height and width to fit your design.
Let me know when you've got that working and we'll see about the brand images.
BrandTim
Bookmarks