Forums / Templates, Stylesheets, Page Layout / category and sub cateogry images

category and sub cateogry images

Locked

Started by jt01 on 27 Jun 2006, 1:08 AM · Views: 1,128

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
27 Jun 2006, 1:08 AM
#1
jt01 avatar

jt01

New Zenner

Join Date:
Jun 2006
Posts:
1
Plugin Contributions:
0

category and sub cateogry images

I apolgize in advance if this is somewhere in the FAQ or the Forum, but I've been looking for 2 days and can't find anything...

When a user clicks on a cateogy, I list sub categories, and when the user clicks on a sub cateogry, I'd like for the image that I uploaded to associate with that sub category to show, as well as the descritpion that has been entered.

I can't see a way to show the sub-category image...

btw...I'd like the image to be a descent thumbail-sized image, and allow the user to click on that image for a larger view...

Can somebody please help me on this one? I'm stumped...

Thanks,
jt

27 Jun 2006, 2:10 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: category and sub cateogry images

To display the Categories Image on the Main Page ... you would need to customize two files:

Copy the original file:
/includes/templates/template_default/tpl_index_product_list.php

To your templates and overrides directory:
/includes/templates/your_template_dir/tpl_index_product_list.php

Change the line that I have commented to the new line below it:

<!-- <h1 id="productListHeading"><?php echo $breadcrumb->last(); ?></h1> -->
   <h1 id="productListHeading"><?php echo zen_image(DIR_WS_IMAGES . zen_get_categories_image($current_category_id), zen_get_categories_name($current_category_id), HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT, ' align="middle"' ) . '<br />' . $breadcrumb->last(); ?></h1>

Next copy the file:
/includes/templates/template_default/tpl_index_categories.php

To your template and overrides directory:
/includes/templates/your_template_dir/tpl_index_categories.php

Change the line that I have commented out to the new line below it:

<!-- <h1 id="indexCategoriesHeading"><?php echo $breadcrumb->last(); ?></h1> -->
<h1 id="indexCategoriesHeading"><?php echo zen_image(DIR_WS_IMAGES . zen_get_categories_image($current_category_id), zen_get_categories_name($current_category_id), HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT, ' align="middle"' ) . '<br />' . $breadcrumb->last(); ?></h1>

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!