Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Main page content showing on category pages

Main page content showing on category pages

Views: 1,248

Results 1 to 9 of 9
1 Dec 2011, 4:10 PM
#1
sethf avatar

sethf

Zen Follower

Join Date:
Sep 2011
Posts:
228
Plugin Contributions:
0

Main page content showing on category pages

Hi

If you go here:

pcselect.co.za/index.php?main_page=index&cPath=201

...you will notice that is says: "Congratulations! You have successfully installed your Zen Cart™ E-Commerce Solution."

...and also has the slideshow.

Both of these should not be there and I can't figure out why they are showing on a category page. The slideshow is only suppose to display on the home page. Instead, the heading and the slideshow display on all category pages.

Just the subcategory heading and the subcategories should be shown on category pages.

This only started happening recently. It could have been a mod or something that changed some values.

How can I remove these from the category page?

Thank you for your help.
S

1 Dec 2011, 4:25 PM
#2
sethf avatar

sethf

Zen Follower

Join Date:
Sep 2011
Posts:
228
Plugin Contributions:
0

Re: Main page content showing on category pages

Ok, the problem is here:

/includes/templates/template_default/templates/tpl_index_categories.php

Line #17 : <h1 id="indexCategoriesHeading"><?php echo HEADING_TITLE; ?></h1>

and here:

/includes/templates/template_default/templates/tpl_index_categories.php

Line #34 : <div id="indexCategoriesMainContent" class="content"><?php


There seems to be an override somewhere... or the IDs are pulling the wrong info from somewhere.

Can anyone help me to make sure that these div IDs pull the write info?

Thanks
S

1 Dec 2011, 7:05 PM
#3
sethf avatar

sethf

Zen Follower

Join Date:
Sep 2011
Posts:
228
Plugin Contributions:
0

Re: Main page content showing on category pages

Anyone have any idea about what could be causing these tags to get the wrong info?

1 Dec 2011, 7:53 PM
#4
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Main page content showing on category pages

My question is if you know what and where it is then why don't you just delete it and move on?

You are using a template that has tables. You will no doubt have all kinds of abnormal code.

1 Dec 2011, 8:05 PM
#5
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Main page content showing on category pages

Core zencart does not behave in the many very odd ways you are describing in this - and several other - posts.

If one tinkers long enough with the code, without really understanding what the consequences will be, then the errors one gets can only be of their own making.

It's great that you have the courage to dive in and try things, but the rest of us here are neither magicians, nor psychics. If you take a chainsaw to your code files, and then report that what should be appearing on the home page is now flashing up on some category page, how are we supposed to even begin to surmise what you have been doing?

1 Dec 2011, 10:03 PM
#6
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Main page content showing on category pages

Exactly, I think I would be more interested trying to figure out why my javascript slider it too large and pushing out my right column! And why my header was too wide that I have to scroll to the right to see everything.

:no:

2 Dec 2011, 7:26 AM
#7
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Main page content showing on category pages

You have 2 php files that you are talking about:
in your custom template;

templates>tpl_index_default.php and common>tpl_main_page.php

If you use your languages file to define text main or your templates>tpl_index_default.php your code will only show on the index page.

If however, you use the other file common>tpl_main_page.php your code will show on all the pages.

You may want to keep a log of the changes you have made and back up files so you can track changes.

2 Dec 2011, 9:56 AM
#8
sethf avatar

sethf

Zen Follower

Join Date:
Sep 2011
Posts:
228
Plugin Contributions:
0

Re: Main page content showing on category pages

usernamenone:

Exactly, I think I would be more interested trying to figure out why my javascript slider it too large and pushing out my right column! And why my header was too wide that I have to scroll to the right to see everything.

:no:

Well, my slider is pushing out the right column because it shouldn't be there! :P

What screen res are you running at? My header is more than fine on 1280 x 1024.

usernamenone:

You have 2 php files that you are talking about:
in your custom template;

templates>tpl_index_default.php and common>tpl_main_page.php

If you use your languages file to define text main or your templates>tpl_index_default.php your code will only show on the index page.

If however, you use the other file common>tpl_main_page.php your code will show on all the pages.

You may want to keep a log of the changes you have made and back up files so you can track changes.

Thanks. I will look into it.

2 Dec 2011, 12:26 PM
#9
sethf avatar

sethf

Zen Follower

Join Date:
Sep 2011
Posts:
228
Plugin Contributions:
0

Re: Main page content showing on category pages

I restored tpl_index_categories.php in /includes/templates/template_default/templates back to default and everything is working. I am still going to test it for errors.

Before restoring default:

?>
<div class="centerColumn" id="indexCategories">
<?php if ($show_welcome == false) { ?>
<h1 id="indexCategoriesHeading"><?php echo HEADING_TITLE; ?></h1>

<?php if (SHOW_CUSTOMER_GREETING == 0) { ?>
<h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2>
<?php } ?>

After restoring default:

?>
<div class="centerColumn" id="indexCategories">
<?php if ($show_welcome == true) { ?>
<h1 id="indexCategoriesHeading"><?php echo HEADING_TITLE; ?></h1>

<?php if (SHOW_CUSTOMER_GREETING == 1) { ?>
<h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2>
<?php } ?>

:smile: