Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Adding Category Image to Main Category Items Page

Adding Category Image to Main Category Items Page

Locked

Views: 3,830

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
4 Aug 2006, 7:12 PM
#1
chinchilla2 avatar

chinchilla2

Banned

Join Date:
Dec 2005
Posts:
21
Plugin Contributions:
0

Adding Category Image to Main Category Items Page

Hopefully my post title helps to describe the problem. Unfortunately I'm on a test server and have no actual website for anyone to look at. I did try searching but either I'm not hitting upon the correct keyword/keywords or this hasn't been addressed yet for 1.3.0.2

What I'm trying to do is get the category image to appear on the category item listing page where the address bar would have index.php?main_page=index&cPath=1 which lists all the items for category 1.

I've got the category images showing on the main and product pages, but can't seem to track down the right template for the category listing page. I'm wanting to have it either to the left of the category title or over to the far right of the page up near the top above the category description.

If someone could point me to the correct template to edit, I would really appreciate it.

Thank you in advance.

4 Aug 2006, 8:17 PM
#2
chinchilla2 avatar

chinchilla2

Banned

Join Date:
Dec 2005
Posts:
21
Plugin Contributions:
0

Re: Adding Category Image to Main Category Items Page

I'm sorry, don't mean to bump my own thread here, but I have discovered the correct page to edit to get the icon code up on the index.php?main_page=index&cPath=1 page. It happens to be the tpl_index_product_list.php template. Why the word "list" in there didn't slap me while I was looking is anyone's guess.

However I've run into another problem along the way. When I insert the code copied directly from the tpl_product_info_display.php page, I get the "Missing Image" gif instead of the graphic I uploaded when creating the category, which should be a basket of fruit. This displays correctly on both the main index and the product page when the appropriate switches are set, however, no luck on my new and certainly not yet improved product listing page.

Here is my current code for product_list...

<div class="centerColumn" id="indexProductList">

<h1 id="productListHeading"><?php echo $breadcrumb->last(); ?></h1>
<!-- MODIFIED FOR TEMPLATE - charlow -->
<?php
/**
 * display the category icons
 */
require($template->get_template_dir('/tpl_modules_category_icon_display.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_icon_display.php'); ?>
<?php } ?>
<!-- END MODIFICATION FOR TEMPLATE - charlow -->

<?php
  if ($do_filter_list) {
  $form = zen_draw_form('filter', zen_href_link(FILENAME_DEFAULT), 'get') . '<label class="inputLabel">' .TEXT_SHOW . '</label>';
?>

If the entire page code is needed, please let me know and I'll post it. Thanks again.

5 Aug 2006, 2:29 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Adding Category Image to Main Category Items Page

When you "edit" the category ... by clicking the green E ... you can change the category's name ... but you can also see the filename of its image .... what is that set to ?
Does that match the name of the file you uploaded?

10 Aug 2006, 6:55 PM
#4
genabit avatar

genabit

Zen Follower

Join Date:
May 2004
Posts:
104
Plugin Contributions:
0

Re: Adding Category Image to Main Category Items Page

DrByte:

When you "edit" the category ... by clicking the green E ... you can change the category's name ... but you can also see the filename of its image .... what is that set to ?
Does that match the name of the file you uploaded?
Dr. Byte,

I'm having a similar problem in a store I just upgraded, subcategory images show but not category images...

the url is http://www.jacksbargainbin.com/
Please look at the candles category.

Thanks in advance,

Michael

10 Aug 2006, 6:59 PM
#5
ajeh avatar

ajeh

Oba-san

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

Re: Adding Category Image to Main Category Items Page

If you mean show the Categories Image above the products_listing ... they are not coded to show ...

I have several threads that explain how to show the categories_image that you might search for ... based on:

categories_image

It should bring up quite a selection to help you on this ... :smile:

10 Aug 2006, 7:18 PM
#6
genabit avatar

genabit

Zen Follower

Join Date:
May 2004
Posts:
104
Plugin Contributions:
0

Re: Adding Category Image to Main Category Items Page

thanks ajeh, I already did a workaround by adding the image to the category description.

when you click on a product it displays the category image....but not just clicking on the main category.

My guess is that this is a big issue in that subcategories have images but not categories.... just does not make a lot of sense that you have to have a subcategory to show an image..... I guess everyone has their own preferences as to how their stores look.

Thanks again

10 Aug 2006, 7:43 PM
#7
ajeh avatar

ajeh

Oba-san

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

Re: Adding Category Image to Main Category Items Page

The category image can be displayed on the product _info pages with a switch ...

The products_listing does not show the categories_image unless you customize the code for it ... only a Category with SubCategories shows the images by default on the products_listing ...

16 Aug 2006, 11:05 AM
#8
stopinder avatar

stopinder

New Zenner

Join Date:
Jul 2006
Posts:
3
Plugin Contributions:
0

Re: Adding Category Image to Main Category Items Page

I'm a newbie. Ive added a category and its image on a local server for the purpose of practice without any problem. I now want to do the same on a remote server. I add the category name and browse to the image that I want to use. When I click save, that image appears at the bottom of the page as it should but when I go to the online catelogue, the category name appears, but no image. Can anyone please help?