Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Adding Description to Category Images

Adding Description to Category Images

Locked

Views: 760

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
2 Jan 2009, 3:48 AM
#1
malhyp avatar

malhyp

New Zenner

Join Date:
Dec 2008
Posts:
28
Plugin Contributions:
0

Adding Description to Category Images

is there an option in ZenCart Configuration panel or Add on that allows you to show a description under the main category and sub category images?

I know that when you click onto a category it takes you to a page with the description but I wanted to know if we could include a small description on the 1st page.

At the moment you only see an image and category name under it.

2 Jan 2009, 8:01 AM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Adding Description to Category Images

Nice! That wouldn't work as is because it is formulated to work from the product info page, but it could be tweaked to do the job neatly.```php

<p><?php echo zen_get_category_description(zen_get_products_category_id((int)$_GET['products_id']), (int)$_SESSION['languages_id']) ?></p> ```This part zen_get_products_category_id((int)$_GET['products_id']) finds the category id from the product id. In the category index page, there is no product to work from; you will need to find the variable that holds the value of the category id being processed at the moment (the existing code will loop through the subcats to prepare their displays).

The current open category can have its description displayed at the top of the page by admin setting; this bit of code can output the descriptions for all of its subcats on the page.