Forums / Setting Up Categories, Products, Attributes / Document - General category with no products

Document - General category with no products

Locked

Views: 1,356

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
6 Jun 2007, 7:04 AM
#1
keefyt avatar

keefyt

New Zenner

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

Document - General category with no products

Hi everyone,

I've been lurking around for a month or so, getting loads of useful information (along with the owner's manual) to help me setup Zen Cart. Everything has been going pretty smoothly so far.

We're setting up a store, which will be providing a host of free information in addition to products. I started setting up categories with the Document - General Product Type, so that we would have a separate "Documents" section for the free information. However rather than have the information be a "product" within these categories, we started putting the information we want to get over into the category description page. It looks pretty good so far, I just design the page in Dreamweaver and then copy the code into the description and it displays just fine. (There was one weirdness where if we want to combine that description with some products, i.e. relevant to the free information, you need to have at least 2 products listed or else the description is not displayed at all).

Anyway, on to my question, if we have one of these categories displaying information but not containing any products, the text "There are no products to list in this category" is displayed at the bottom of the screen. Is there anyway to prevent this from being displayed in 0 product categories ? Or ideally in Document General categories ? The text is fine in the actual store part, although we don't plan, long term, having any empty categories.

Thanks in advance, and if this is a simple RTFM on pg. xx, my apologies. I've been looking for anything related to this on and off for about a month now.

Keith.

7 Jun 2007, 7:07 AM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Document - General category with no products

Two points.

In Configuration > Layout Settings, you can disable "Skip 1-prod Categories" which will allow categories with only one product to show without going immediately to the product.

Since you expect to have empty document cats but not generally any empty product cats, I think you will be ok removing that text.
In Tools > Developers Toolkit, enter a chunk of the text in the lower left corner, select all files and search. This will show you the file and line number where the text is defined; in that file, delete the text, being sure to leave the two single quotes '', and it will no longer display.

7 Jun 2007, 8:13 PM
#3
keefyt avatar

keefyt

New Zenner

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

Re: Document - General category with no products

Hi Glenn,

Great, thanks for the response. Looks good now, I even threw the index.php in my override directory. :smile:

Thanks also for the tip regarding the 1 product categories, much obliged.

Keith.

21 Jun 2007, 11:01 PM
#4
keefyt avatar

keefyt

New Zenner

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

Re: Document - General category with no products

Hi again Glenn(or anyone else :smile:)

We came across a related issue today. If we link a product to one of these document categories and that category has sub-categories, the sub-category list is not displayed. Is there a setting to change this so that the sub-category list always displays, or would we need to code this change ?

Thanks again

Keith.

22 Jun 2007, 1:06 AM
#5
gjh42 avatar

gjh42

Black Belt

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

Re: Document - General category with no products

I'm afraid that's a structural limitation of Zen Cart. Categories can hold either products or subcategories, not both. It is possible to get around this (as you have found), but this can cause weird results on searches, pricing, etc. and display of subcategories and products together is not supported.

You would need to link the product to a subcategory that has no subs.

22 Jun 2007, 5:42 PM
#6
keefyt avatar

keefyt

New Zenner

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

Re: Document - General category with no products

Hi again Glenn,

Thanks once more for your response. We're going to move the products to be in a sub-cat without any other sub-cats. It won't be quite as relevant as in the other one but it will still work.

Thanks again

Keith.