Zen Cart Logo
Forums / Basic Configuration / Main page text on subcategories with subcategories

Main page text on subcategories with subcategories

Locked

Views: 3,273

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
30 Mar 2007, 10:47 PM
#1
sitehatchery avatar

sitehatchery

New Zenner

Join Date:
Mar 2007
Posts:
77
Plugin Contributions:
0

Main page text on subcategories with subcategories

On the home page, you can display the main_page text. The problem is that if you drill down one level to a sub category that has no products, but rather has additional subcategories, the main_page text still appears instead of just the intro text that you assign to that category.

In admin, there is no way to adjust this setting.

For example:

Home: main_page text
---Shirts: main_page text at top (not desirable) + Shirts text
-----Black Shirts: Black Shirts Text
------Product a
------Product c
------...

How can I control the text on the Shirts level so that it does not include the main_page text?

30 Mar 2007, 11:49 PM
#2
kobra avatar

kobra

Black Belt

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

Re: Main page text on subcategories with subcategories

Post a url to your site - main_page.php should only be parsed on the main page

31 Mar 2007, 5:32 AM
#4
kobra avatar

kobra

Black Belt

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

Re: Main page text on subcategories with subcategories

What ae the differenes between the INTERACTIVE ART, AQ DIGITAL QUEST, ART, COLLECTIBLES, FOR HOME OR OFFICE and others??

These are all listed under categories and you can add text to the category description as I see that you have for some. Have you inadvertantly added the main page text to some of these? As a cat with none should display like your COLLECTIBLES does.

Or did you omit the category title? as INTERACTIVE ART does not display the title like COLLECTIBLES

3 Apr 2007, 3:28 AM
#5
sitehatchery avatar

sitehatchery

New Zenner

Join Date:
Mar 2007
Posts:
77
Plugin Contributions:
0

Re: Main page text on subcategories with subcategories

The client is still adding products and descriptions to the site. Once the additions have been made, there will be more than one product in each category.

I didn't add the home page text to the sub categories. However, when the categories have subcategories with no products under them, the home page text is displayed. I can add text under it, but I cannot remove the home page text.

Notice that the only thing in these categories are subcategories and not products.

This happens to the following categories:
AQ ART

AQ INTERACTIVE ART

ARTZQUEST KIDS

It does not occur on categories that have products directly under them.

3 Apr 2007, 4:55 AM
#6
kobra avatar

kobra

Black Belt

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

Re: Main page text on subcategories with subcategories

I looked at this and even set up a cat with empty sub cats and can not reproduce what you have....????

3 Apr 2007, 5:04 AM
#7
sitehatchery avatar

sitehatchery

New Zenner

Join Date:
Mar 2007
Posts:
77
Plugin Contributions:
0

Re: Main page text on subcategories with subcategories

I'm not sure what it was. However, I solved the problem by replacing the following code on line 34 of tpl_index_categories.php:

<?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?>

with this:

<?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2 && !$_GET['cPath']) { ?>

Now it works.

However, it doesn't seem very secure to me to use cPath without validating it. But, I don't see anywhere in the Zen-Cart where cPath is validated. Isn't that a security issue?

3 Apr 2007, 5:09 AM
#8
kobra avatar

kobra

Black Belt

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

Re: Main page text on subcategories with subcategories

Messing with code to fix something that should not be broke is not the best plan - While it may seem most expeditious.
Are there other files that have been edited for function???

4 Apr 2007, 5:09 AM
#9
sitehatchery avatar

sitehatchery

New Zenner

Join Date:
Mar 2007
Posts:
77
Plugin Contributions:
0

Re: Main page text on subcategories with subcategories

No function files have been changed to my knowledge. I did add some contributions, but none were related to the product listing.

4 Apr 2007, 6:43 AM
#10
kobra avatar

kobra

Black Belt

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

Re: Main page text on subcategories with subcategories

I solved the problem by replacing the following code on line 34 of tpl_index_categories.php:
This was the file that I was referring to where you state that you edited it.

12 Apr 2010, 12:59 PM
#11
laiwis avatar

laiwis

New Zenner

Join Date:
Apr 2007
Posts:
11
Plugin Contributions:
0

Re: Main page text on subcategories with subcategories

sitehatchery:

I'm not sure what it was. However, I solved the problem by replacing the following code on line 34 of tpl_index_categories.php:

<?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?>

with this:

<?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2 && !$_GET['cPath']) { ?>

Now it works.

However, it doesn't seem very secure to me to use cPath without validating it. But, I don't see anywhere in the Zen-Cart where cPath is validated. Isn't that a security issue?

or this

http://www.zen-cart.com/forum/showthread.php?t=63242&page=2