Forums / Templates, Stylesheets, Page Layout / Adding descriptions to subcategory listing page

Adding descriptions to subcategory listing page

Locked

Views: 2,412

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
23 Mar 2010, 6:04 PM
#1
johnlutz avatar

johnlutz

New Zenner

Join Date:
Oct 2008
Posts:
9
Plugin Contributions:
0

Adding descriptions to subcategory listing page

I am trying to add a snippet of the category description to the subcategory listing page, but I cannot for the life of me find the sql that pulls that in. On the category_row.php page, there is a $category variable with the sub category info in it, but I can't tell which page is building this variable so I can add to it. Please help. Thanks.

23 Mar 2010, 7:17 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Adding descriptions to subcategory listing page

Not clear what or where you are seeking this??

A link and additional description would help

Zen-Venom Get Bitten

23 Mar 2010, 8:16 PM
#3
johnlutz avatar

johnlutz

New Zenner

Join Date:
Oct 2008
Posts:
9
Plugin Contributions:
0

Re: Adding descriptions to subcategory listing page

http://www.bestuniformsinc.com/index.php?main_page=index&cPath=67

This is a category page displaying 3 subcategories. The category description that is normally displayed on the category page after you click the category: I want that description to show up on this subcategory page along with the thumbnail and name. Make sense?

23 Mar 2010, 8:40 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Adding descriptions to subcategory listing page

I want that description to show up on this subcategory page along with the thumbnail and name. Make sense?
No, not really - because I already see 3 sub-cat images and descriptions
image=category_thumb_commbars.jpg
Des= Blackinton Commendation Bars
image = category_thumb_designabadge.jpg
des = Blackinton Design-A-Badge
img = blackinton_quick_ship_category_thumb.jpg
des = Blackinton Quick Custom Badges

Zen-Venom Get Bitten

24 Mar 2010, 1:56 PM
#5
johnlutz avatar

johnlutz

New Zenner

Join Date:
Oct 2008
Posts:
9
Plugin Contributions:
0

Re: Adding descriptions to subcategory listing page

No, those "descriptions" you are seeing are the category name, not the "description". If you click on Blackinton Quick Custom Badges, you will see the "description" that I am talking about underneath the category title and before the products. Looks something like this:

Choose from 13 select Blackinton badge styles

Customize your lettering, finish and center seal

etc...

I would like this description to show up on the previous subcategory listing page. Make more sense now?

24 Mar 2010, 2:05 PM
#6
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Adding descriptions to subcategory listing page

What you're looking for happens in /includes/modules/pages/index/main_template_vars.php starting at line 76. The SQL statements currently don't pull the categories' description.

24 Mar 2010, 2:39 PM
#7
johnlutz avatar

johnlutz

New Zenner

Join Date:
Oct 2008
Posts:
9
Plugin Contributions:
0

Re: Adding descriptions to subcategory listing page

Thank you lat9. That is what I needed.

24 Mar 2010, 2:43 PM
#8
johnlutz avatar

johnlutz

New Zenner

Join Date:
Oct 2008
Posts:
9
Plugin Contributions:
0

Re: Adding descriptions to subcategory listing page

One more question. Can you use the overide system somehow for this page?

I created a folder within the modules/mytemplate/pages/index/main_template_vars.php and a folder within modules/pages/index/mytemplate/main_template_vars.php and neither worked. Only modifying the modules/pages/index/main_template_vars.php seemed to work.

Thanks.

24 Mar 2010, 8:57 PM
#9
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Adding descriptions to subcategory listing page

I found the following link via Google that provides an override method to allow overrides of the page-specific main_template_vars.php file(s):

http://www.zen-cart.com/forum/showthread.php?t=69895

28 Dec 2010, 7:53 PM
#10
tkpope avatar

tkpope

New Zenner

Join Date:
Jul 2009
Posts:
37
Plugin Contributions:
0

Re: Adding descriptions to subcategory listing page

I'm running v1.3.9h
My test site is at: http://fixyourprofile.com/fasteners/

I would like to have category descriptions displayed on subcategories. I would like the descriptions for "tapping screws", etc. to appear next to the subcategory pictures on this page (and all subcategory pages): http://fixyourprofile.com/fasteners/threaded-products

The only add-on I have installed is Ceon URI Mapping (SEO).

Thanks in advance.

Sean
+<|:-)

29 Dec 2010, 6:46 AM
#12
gjh42 avatar

gjh42

Black Belt

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

Re: Adding descriptions to subcategory listing page

The category_row.php solution in posts 7 & 16 of that thread is limited in functionality; it will break down if your database has table prefixes or you use multiple languages. I have just posted a more comprehensive method using main_template_vars.php in that thread.