Forums / Basic Configuration / Category description and multiple images

Category description and multiple images

Views: 1,311

Results 1 to 8 of 8
20 Nov 2011, 9:48 AM
#1
zuzer avatar

zuzer

New Zenner

Join Date:
Aug 2011
Posts:
9
Plugin Contributions:
0

Category description and multiple images

Looky here please
http://shop.stru.cc/index.php?main_page=product_info&cPath=11_12&products_id=28

The category 'Kitchen' has a description, which works great with a single image but with multiple images of the product all you get is a 'kitchen' link instead of the description. I tried both top and subcategories, same result. Also, the category image becomes a link to the very same page.

http://shop.stru.cc/index.php?main_page=index&cPath=11

Top and sub - 'kitchen' is still w/o description.

I use the classic template v1.3.9.h
Thx for any help.
Zuzer

20 Nov 2011, 10:27 AM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Category description and multiple images

Before you continue working on the CLASSIC template, please usnderstand that you should be working on a CUSTOM template.

The CLASSIC template should not be changed, as it is used as a diagnostic tool.

20 years a Zencart User

20 Nov 2011, 12:55 PM
#3
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Category description and multiple images

If I understand the question, Zencart doesn't display the category description on the product info pages. There's no option I know of in admin to make it do so, so if it's important, you would have to modify the code for that page.

20 Nov 2011, 2:46 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Category description and multiple images

Once you have your templates sorted out, you could customize the code by adding to your templates and overrides a copy of:
/includes/modules/category_icon_display.php

to your templates and overrides directory:
/includes/modules/your_template_dir/category_icon_display.php

and adding to the code the code in RED:

$category_icon_display_name = zen_get_categories_name((int)$current_category_id);
$category_icon_display_image = zen_get_categories_image((int)$current_category_id);
$categories_icon_display_description = zen_get_category_description((int)$current_category_id, (int)$_SESSION['languages_id']);

Then copy the template file:
/includes/templates/template_default/tpl_modules_category_icon_display.php

to your templates and overrides directory:
/includes/templates/your_template_dir/tpl_modules_category_icon_display.php

and adding the code in RED:

<div align="<?php echo $align; ?>" id="categoryIcon" class="categoryIcon"><?php echo '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $_GET['cPath'], 'NONSSL') . '">' . $category_icon_display_image . $category_icon_display_name .  '</a>'; ?></div>
<div id="categoryDescription class="categoryDescription"><?php echo $categories_icon_display_description; ?></div>

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!

21 Nov 2011, 7:32 AM
#5
zuzer avatar

zuzer

New Zenner

Join Date:
Aug 2011
Posts:
9
Plugin Contributions:
0

Re: Category description and multiple images

schoolboy:

Before you continue working on the CLASSIC template, please usnderstand that you should be working on a CUSTOM template.

The CLASSIC template should not be changed, as it is used as a diagnostic tool.

ok but if you have a look at it i already changed it so i guess there's no helping it: it's already a custom template. my question was about something else but thanks for replying anyways.

21 Nov 2011, 7:36 AM
#6
zuzer avatar

zuzer

New Zenner

Join Date:
Aug 2011
Posts:
9
Plugin Contributions:
0

Re: Category description and multiple images

stevesh:

If I understand the question, Zencart doesn't display the category description on the product info pages. There's no option I know of in admin to make it do so, so if it's important, you would have to modify the code for that page.

no, if you have a look at the link and/or my description of the problem, zencart does not display the category description on the category page. thanks for replying, anyways.

21 Nov 2011, 7:39 AM
#7
zuzer avatar

zuzer

New Zenner

Join Date:
Aug 2011
Posts:
9
Plugin Contributions:
0

Re: Category description and multiple images

Ajeh:

Once you have your templates sorted out, you could customize the code by adding to your templates and overrides a copy of:
/includes/modules/category_icon_display.php

to your templates and overrides directory:
/includes/modules/your_template_dir/category_icon_display.php

and adding to the code the code in RED:

$category_icon_display_name = zen_get_categories_name((int)$current_category_id);
$category_icon_display_image = zen_get_categories_image((int)$current_category_id);
$categories_icon_display_description = zen_get_category_description((int)$current_category_id, (int)$_SESSION['languages_id']);

> 
> Then copy the template file:
> /includes/templates/template_default/tpl_modules_category_icon_display.php
> 
> to your templates and overrides directory:
> /includes/templates/your_template_dir/tpl_modules_category_icon_display.php
> 
> and adding the code in RED:
> ```
<div align="<?php echo $align; ?>" id="categoryIcon" class="categoryIcon"><?php echo '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $_GET['cPath'], 'NONSSL') . '">' . $category_icon_display_image . $category_icon_display_name .  '</a>'; ?></div>
<div id="categoryDescription class="categoryDescription"><?php echo $categories_icon_display_description; ?></div>

thx a lot, i'll try this

21 Nov 2011, 4:34 PM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Category description and multiple images

no, if you have a look at the link and/or my description of the problem, zencart does not display the category description on the category page.Zen Cart by default does display the category description on the product listing ("category") page. You must have something customized.