Zen Cart Logo
Forums / General Questions / How do I add a field to initial product category display page?

How do I add a field to initial product category display page?

Views: 870

Results 1 to 7 of 7
21 Feb 2013, 4:16 PM
#1
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

How do I add a field to initial product category display page?

I'm using 1.3.9h

Right now, when you go to the category listing (/store/index.php?main_page=index&cPath=1)

You see an image with the title of the product underneath it.

I'd like to add a field for a short description and have that appear under the title so you't have:

Image
Product Title
Short product description

Can that be done?

21 Feb 2013, 4:52 PM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: How do I add a field to initial product category display page?

If you are actually talking about products in the listing page (where all the products in one category are shown), the description already shows unless your template or settings have disabled it.

If you are talking about subcategories in a top category listing, it could be done with some minor PHP and CSS coding, making sections in the category description for the short version and the full version (to be displayed on the category's own page). You would give each section a <div class="shortDesc"> or <div class="longDesc"> wrapper and add rules to your stylesheet to display and hide each based on the surroundings. You would need to add to the SQL query that builds the category listing to retrieve the description as well as the name and image.

Seeing the page you want to change will let us give the right advice.

21 Feb 2013, 5:09 PM
#3
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: How do I add a field to initial product category display page?

Ah, I believe I am talking talking about products on the listing page:

http://www.quinceandco.com/store/index.php?main_page=index&cPath=1

And I suspect the description field has been hidden or removed -- I inherited this site, so I'm not positive.

However, I don't want the full description to show here -- just a few words, which is why I'm thinking an additional field would be needed for that information.

21 Feb 2013, 5:26 PM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: How do I add a field to initial product category display page?

Let's hope that the previous developer used admin settings where available instead of hard-coding everything... they seem to have changed lots of things in the template code already.

What are yur settings in Configuration > Product Listing > Show Description, etc?

You can set how many characters of the description to display in the listing; it will be neatly truncated to whole words followed by ...

21 Feb 2013, 5:39 PM
#5
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: How do I add a field to initial product category display page?

"Display Product Description" is set to 125. But since nothing's showing, I'm guessing they removed that field (as you note, they made a lot of changes in the template).

But even if I bring that back, I'd still like to have data that's unique from the overall description. I'm assuming I need a separate field for that?

21 Feb 2013, 5:51 PM
#6
gjh42 avatar

gjh42

Black Belt

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

Re: How do I add a field to initial product category display page?

You can do that - there is at least one mod in Plugins for additional product fields or descriptions - or you could use a coding method like I described above to display different descriptions in different places without messing with the database or SQL queries. It has been described in forum threads with details. One of the requirements can be found by searching for zen_clean_html (look for old posts - 2 or 3 years ago).

21 Feb 2013, 5:57 PM
#7
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: How do I add a field to initial product category display page?

Thank you very much! I'll check out those options.

John