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?
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
Re: Main page text on subcategories with subcategories
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
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.
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....????
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?
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???
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.
Re: Main page text on subcategories with subcategories
Quote:
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.