Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Category Image to display next to description

Category Image to display next to description

Locked

Views: 1,546

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
6 Sep 2007, 2:28 AM
#1
lavergara avatar

lavergara

New Zenner

Join Date:
Jul 2007
Posts:
16
Plugin Contributions:
0

Category Image to display next to description

When I created a new categories under Catalog > Categories/Products, I added a Categories Description and a Category Image. When I select that link from the Category sidebox I get the Categories Description on the top and the list of products beneath it but the Category Image is not showing. I dont want these to be the category navigation image kind. I would like this image to go next to my categories description. I though this was something I could turn on from the admin but no luck. What do I need to do? :unsure:

6 Sep 2007, 4:00 AM
#2
lavergara avatar

lavergara

New Zenner

Join Date:
Jul 2007
Posts:
16
Plugin Contributions:
0

Re: Category Image to display next to description

I think i figured it out. I added the following line to my tpl_index_product_list.php next to my categories description and floated left.

<?php echo zen_image(DIR_WS_IMAGES . zen_get_categories_image($current_category_id), zen_get_categories_name($current_category_id) ) ?>

I suppose this one would work to:

<?php echo zen_image(DIR_WS_IMAGES . $categories_image, '', CATEGORY_ICON_IMAGE_WIDTH, CATEGORY_ICON_IMAGE_HEIGHT); ?>

Is there another way? also how can I size the image equaly since some are longer in width than height.

6 Sep 2007, 4:17 AM
#3
lavergara avatar

lavergara

New Zenner

Join Date:
Jul 2007
Posts:
16
Plugin Contributions:
0

Re: Category Image to display next to description

Ok. I actually answered all my questions. Here is what I came up with:

In the tpl_index_product_list.php, I changed what was in between the // categories_description to the following:

// categories_description
if ($current_categories_description != '') {
?>

<div class="categoryimg"><?php if ($categories_image = zen_get_categories_image($current_category_id)) { ?> <?php echo zen_image(DIR_WS_IMAGES . $categories_image, '', CATEGORY_ICON_IMAGE_WIDTH, CATEGORY_ICON_IMAGE_HEIGHT); ?> <?php } ?> </div> <div id="indexProductListCatDescription" class="content"><?php echo $current_categories_description; ?></div> <?php } // categories_description ?>

Then I floated "categoryimg" left added some padding to the right then because some of my images where different sizes I went to Configuration > Images and changed the Category Icon Image Width - Product Info Pages to 126 and Category Icon Image Height- Product Info Pages to 109.