Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Main page in categories.

Main page in categories.

Locked

Views: 1,914

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
20 Jul 2007, 5:40 PM
#1
robinwickens avatar

robinwickens

New Zenner

Join Date:
Oct 2006
Posts:
36
Plugin Contributions:
0

Main page in categories.

Can anybody please tell me how to stop the main page showing when I click on a main category that only has sub-categories?

It doesn't happen with sub-categories - it just shows a list of sub-categories.

So why doesn't a top level category?

I for one find it annoying to scroll down to the bottom of the page to find the sub-categories and I at first thought that I was still on the home page, I'm sure a lot of my visitors do too!

Any ideas?

If it's any help I am using Purpleshades template and better/tabbed lite.

20 Jul 2007, 7:21 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Main page in categories.

A link to your site and an indication as to which category you're referring to would be helpful, so that we can see exactly what you're seeing.

20 Jul 2007, 7:48 PM
#3
robinwickens avatar

robinwickens

New Zenner

Join Date:
Oct 2006
Posts:
36
Plugin Contributions:
0

Re: Main page in categories.

http://informationhaven.co.uk/shop/

It happens in all categories that have sub-categories, which at the moment is all but one!

Videos does not have sub-categories and this is how I would like the others to appear.

20 Jul 2007, 7:49 PM
#4
robinwickens avatar

robinwickens

New Zenner

Join Date:
Oct 2006
Posts:
36
Plugin Contributions:
0

Re: Main page in categories.

If this cannot easily be resolved I will have to create top categories for everything?

20 Jul 2007, 8:06 PM
#5
gjh42 avatar

gjh42

Black Belt

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

Re: Main page in categories.

Where did you insert this HTML? You personally had to have entered at least some of it, and I think it is in the wrong file.

<div class="row"><span class="left">The total number of products in our catalogue is  </span><span class="rigth">Object</span></div><br> <p>Have we got news for YOU!</p>...
20 Jul 2007, 8:16 PM
#6
robinwickens avatar

robinwickens

New Zenner

Join Date:
Oct 2006
Posts:
36
Plugin Contributions:
0

Re: Main page in categories.

This is a subject that is being covered by Ajey and has no bearing as this particular problem that we are discussing existed before my post to Ajey.

20 Jul 2007, 8:30 PM
#7
gjh42 avatar

gjh42

Black Belt

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

Re: Main page in categories.

Actually, it is relevant, as this is part of what appears on every page with subcats. tpl_index_categories.php I believe is the file that handles this, though it may be calling in this info from another file.

I guess this part of tpl_index_categories.php is responsible for displaying the offending text, though why it is displaying it is the big question:```php

<?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?> <div id="indexCategoriesMainContent" class="content"><?php /** * require the html_define for the index/categories page */ include($define_page); ```
20 Jul 2007, 8:38 PM
#8
gjh42 avatar

gjh42

Black Belt

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

Re: Main page in categories.

DEFINE_MAIN_PAGE_STATUS looks like the key to this...

20 Jul 2007, 8:53 PM
#9
robinwickens avatar

robinwickens

New Zenner

Join Date:
Oct 2006
Posts:
36
Plugin Contributions:
0

Re: Main page in categories.

You've lost me because you are quoting things that I do not understand, but I will try, be gentle with me.

The code on the main page is entered through main page define, and is now working properly through a php include/echo.

I have not altered any base code.

You are correct in that this is a big problem, to me anyway.

I have a work-around in that all I can think of is to replace my sub-categories with top level categories.
That will cure my immediate problem but not in the way that I would like.

It is nice however to present a problem that may not have appeared before, I like a challenge!
I have been trying to get this shop off the ground for five years and every day presents a new challenge!
Bless!

20 Jul 2007, 9:35 PM
#10
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Main page in categories.

The behaviour that you are experiencing is not how Zen Cart normally works.

You must have changed some of the code to insert your bookmarking links, and like gjh42, I rather suspect that you have accidentally swept the code that inserts the main page text into your changes.

Unfortunately these changes are to code that is on your server, so we can only see the results, not the amended code that is generating them.

I would compare your tpl_categories_index.php with the one that comes in the Zen Cart release package to find and account for the differences.

21 Jul 2007, 7:05 AM
#11
robinwickens avatar

robinwickens

New Zenner

Join Date:
Oct 2006
Posts:
36
Plugin Contributions:
0

Re: Main page in categories.

Where do I find tpl_categories_index.php?

Cant find it in templates or by search.:wacko:

21 Jul 2007, 7:17 AM
#12
gjh42 avatar

gjh42

Black Belt

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

Re: Main page in categories.

/includes/templates/template_default/templates/tpl_index_categories.php.
Copy this file to /includes/templates/your_template/templates/tpl_index_categories.php and edit this copy of it.

21 Jul 2007, 7:30 AM
#13
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Main page in categories.

But I'm beginning to think that file is a red herring. It doesn't appear to ever be executed, or even be capable of being executed. Investigating ...

In the meantime, which file did you change to include your social bookmarks?

21 Jul 2007, 7:42 AM
#14
robinwickens avatar

robinwickens

New Zenner

Join Date:
Oct 2006
Posts:
36
Plugin Contributions:
0

Re: Main page in categories.

Great, thank you.

I commented out lines 34 - 41 and it is now working as I would like.

:clap:

21 Jul 2007, 7:48 AM
#15
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Main page in categories.

Yes. Not a red herring. There's some cunning code that switches execution from index_default to index_categories when in categories.

Though I am still puzzled as to why your display was different to that of a default Zen Cart.

21 Jul 2007, 8:08 AM
#16
robinwickens avatar

robinwickens

New Zenner

Join Date:
Oct 2006
Posts:
36
Plugin Contributions:
0

Re: Main page in categories.

kuroi:

But I'm beginning to think that file is a red herring. It doesn't appear to ever be executed, or even be capable of being executed. Investigating ...

In the meantime, which file did you change to include your social bookmarks?

Total products seems to be working OK.

Social bookmarking code is on main page define.

All now OK!