Zen Cart Logo
Forums / General Questions / Category Images Not Displaying

Category Images Not Displaying

Locked

Views: 2,847

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
3 Aug 2007, 12:33 PM
#1
high2k avatar

high2k

Zen Follower

Join Date:
May 2006
Location:
Scotland
Posts:
198
Plugin Contributions:
0

Category Images Not Displaying

I'm reposting this as I've had no luck in finding a solution and am now desperate as it's holding back the launch of the site.
For some reason my category images have stopped displaying on http://www.syntecchemicals.co.uk/catalog
I've tried deleting the images from server and reuploading, uploading to a different directory, uploading new images, but to no avail.
It's almost as if something in admin is 'switched off', but I've been through every reference to category images that I can find and can't see anything untoward.
I'm really hpong someone can help on this one as it's driving me demented!

3 Aug 2007, 1:39 PM
#2
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Category Images Not Displaying

  1. Where are your category images stored?

  2. What have you got set for Subcategory Image Width & Height in admin > configuration > images ?

5 Aug 2007, 3:58 PM
#3
brandtim avatar

brandtim

Zen Follower

Join Date:
Apr 2006
Posts:
250
Plugin Contributions:
0

Re: Category Images Not Displaying

The category images aren't in your HTML at all....

In your includes/templates/iC_AcadameV1.2/templates/tpl_index_product_list.php, make sure you have this line:

<div id="categoryImgListing" class="categoryImg"><?php echo zen_image(DIR_WS_IMAGES . $categories_image, '', CATEGORY_ICON_IMAGE_WIDTH, CATEGORY_ICON_IMAGE_HEIGHT); ?></div> 

BrandTim

6 Aug 2007, 7:54 AM
#4
high2k avatar

high2k

Zen Follower

Join Date:
May 2006
Location:
Scotland
Posts:
198
Plugin Contributions:
0

Re: Category Images Not Displaying

Yes, this line is present and correct, but still no category images:dontgetit

6 Aug 2007, 4:37 PM
#5
ajeh avatar

ajeh

Oba-san

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

Re: Category Images Not Displaying

Check your settings in the Configuration ... Product Listing ... for:

Include Product Listing Sub Categories Image
Do you want to include the Sub Categories Image on the Product Listing?

true
false

Include Product Listing Top Categories Image
Do you want to include the Top Categories Image on the Product Listing?

true
false

Show SubCategories on Main Page while navigating
Show Sub-Categories on Main Page while navigating through Categories

0= off
1= on

And check what the missing image is in Configuration ... Images ...

Product Image - No Image picture
Use automatic No Image when none is added to product
Default = no_picture.gif

Currently your template is using the image:
/catalog/images/pixel_trans.gif

where ever you see these blank images ...

What happens if you switch to Classic Template? Does this correct the issue?

6 Aug 2007, 5:36 PM
#6
high2k avatar

high2k

Zen Follower

Join Date:
May 2006
Location:
Scotland
Posts:
198
Plugin Contributions:
0

Re: Category Images Not Displaying

What happens if you switch to Classic Template? Does this correct the issue?

Now there's something really obvious that I never thought of doing! I've just changed to classic template and the images are there. I'm not quite sure how to remedy it though as I'm not clear what I've done wrong??

6 Aug 2007, 5:51 PM
#7
high2k avatar

high2k

Zen Follower

Join Date:
May 2006
Location:
Scotland
Posts:
198
Plugin Contributions:
0

Re: Category Images Not Displaying

Sorry. I take it all back. What happens when I switch to Classic template is that one of my banners appears where the category image should be - which is even wierder!!
I'm so confused...
My settings in Admin> Configuration> Product Listing are:-

Include Product Listing Sub Categories Image = false

Include Product Listing Top Categories Image = true

Show SubCategories on Main Page while navigating = 1

Product Image - No Image picture
Use automatic No Image when none is added to product = 1

6 Aug 2007, 6:23 PM
#8
high2k avatar

high2k

Zen Follower

Join Date:
May 2006
Location:
Scotland
Posts:
198
Plugin Contributions:
0

Re: Category Images Not Displaying

From looking at the source code on other sites that I've done where category images are displaying correctly, it seems to me that the following is missing from the problem site:-

<div id="categoryImgListing" class="categoryImg"><img src="images/categories/cat_ladies.jpg" alt="" width="188" height="150" /></div>

However, this does not get me any closer to understanding how I fix the problem!

6 Aug 2007, 6:29 PM
#9
ajeh avatar

ajeh

Oba-san

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

Re: Category Images Not Displaying

If you do a search in the Tools ... Developers Tool Kit ... in the bottom input box and search the Catalog for:
categoryImgListing

What files come up?

6 Aug 2007, 6:39 PM
#10
ajeh avatar

ajeh

Oba-san

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

Re: Category Images Not Displaying

Also check the files:
/includes/templates/template_default/templates/tpl_index_categories.php
/includes/templates/your_template_dir/templates/tpl_index_categories.php

has something changed to not call the right image? Or is something forcing the pixel image to be used?

7 Aug 2007, 6:59 AM
#11
high2k avatar

high2k

Zen Follower

Join Date:
May 2006
Location:
Scotland
Posts:
198
Plugin Contributions:
0

Re: Category Images Not Displaying

Ajeh:

If you do a search in the Tools ... Developers Tool Kit ... in the bottom input box and search the Catalog for:
categoryImgListing

What files come up?

templates/iC_AcadameV1.2/templates/tpl_index_product_list.php
templates/template_default/templates/tpl_index_categories.php
templates/template_default/templates/tpl_index_product_list.php

7 Aug 2007, 7:06 AM
#12
high2k avatar

high2k

Zen Follower

Join Date:
May 2006
Location:
Scotland
Posts:
198
Plugin Contributions:
0

Re: Category Images Not Displaying

Ajeh:

Also check the files:
/includes/templates/template_default/templates/tpl_index_categories.php
/includes/templates/your_template_dir/templates/tpl_index_categories.php

has something changed to not call the right image? Or is something forcing the pixel image to be used?

Neither of these files have been touched since install and the images were displaying just fine until recently

8 Aug 2007, 4:27 PM
#13
redpaint avatar

redpaint

New Zenner

Join Date:
Jun 2007
Posts:
10
Plugin Contributions:
0

Re: Category Images Not Displaying

Hi,

We're also experiencing the exact same problem. Top level category images are not displaying on sub category / product index pages. We have checked the settings listed earlier in this post.

Andy

8 Aug 2007, 5:08 PM
#14
ajeh avatar

ajeh

Oba-san

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

Re: Category Images Not Displaying

Have you an URL where we can peek at this? :smile:

9 Aug 2007, 2:05 AM
#15
tom2u avatar

tom2u

New Zenner

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

Re: Category Images Not Displaying

add the following code after LINE 43 at the file -\includes\templates\YOUR TEMPLATE\sideboxes\tpl_categories.php

// categories_image
$categorySelect = str_replace('cPath=','',$box_categories_array[$i]['path']);
$categories_image = zen_get_categories_image($categorySelect);
$myCategoryImage = zen_image(DIR_WS_IMAGES . $categories_image, 'Click for details', '275', '275');
//

$content .= $myCategoryImage;
$content .= '<br /> <br />' . "\n";
// end adding image code

i hope this is the right solution, i do the same thing. can refer to the site

http://www.tom2u.com

see if this is the categories image you want.

hope it help...thank you

9 Aug 2007, 1:06 PM
#16
redpaint avatar

redpaint

New Zenner

Join Date:
Jun 2007
Posts:
10
Plugin Contributions:
0

Re: Category Images Not Displaying

Hi, solved the problem, might not be the most elegant solution but here we go:

comment out the original if{ statement on line 22 in tpl_index_product_list.php (IN YOUR TEMPLATE FOLDER) then paste the following below it:

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
// REDPAINT MODIFICATION TO SHOW TOP CATEGORY IMAGE
define(TOP_CATEGORY_ID,substr($cPath, 0, strpos($cPath, '_')));
$top_image_exists = zen_get_categories_image(TOP_CATEGORY_ID);
if(!empty($top_image_exists)) {
$categories_image = zen_get_categories_image(TOP_CATEGORY_ID);
// END MODIFICATION
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~

That's it. Although you may need some CSS styling to get it to look how you want it. Hope this helps others.