Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Subcategories not showing in center

Subcategories not showing in center

Locked

Views: 8,668

Results 1 to 20 of 29
This thread is locked. New replies are disabled.
26 Oct 2009, 9:14 PM
#1
neparker avatar

neparker

New Zenner

Join Date:
Apr 2009
Posts:
79
Plugin Contributions:
0

Subcategories not showing in center

I have a category with several subcategories, but the subcategories aren't being listed in the center of the page. So if the customer clicks on a subcategory, the center is empty, but the subcategories are listed under the category on the left. How can I make the subcategories appear in the center too?

26 Oct 2009, 9:32 PM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Subcategories not showing in center

You should mention that you also have products directly in those categories; that is the cause of your problem, and nobody can solve it without knowing that. Starting another thread won't get you different answers.

26 Oct 2009, 9:36 PM
#3
neparker avatar

neparker

New Zenner

Join Date:
Apr 2009
Posts:
79
Plugin Contributions:
0

Re: Subcategories not showing in center

Well, I have now since removed them. So yea, it is a seperate problem.

26 Oct 2009, 10:03 PM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Subcategories not showing in center

In that case, what do you have for Configuration > Product Listing > Show SubCategories on Main Page while navigating ?

26 Oct 2009, 10:07 PM
#5
neparker avatar

neparker

New Zenner

Join Date:
Apr 2009
Posts:
79
Plugin Contributions:
0

Re: Subcategories not showing in center

It's set to 1.

26 Oct 2009, 10:12 PM
#6
gjh42 avatar

gjh42

Black Belt

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

Re: Subcategories not showing in center

Then I don't know what else could be happening there, sorry.
Seeing your site live might help, if your template has been hard-coded for this.

26 Oct 2009, 10:35 PM
#7
neparker avatar

neparker

New Zenner

Join Date:
Apr 2009
Posts:
79
Plugin Contributions:
0

Re: Subcategories not showing in center

I've double and triple checked to make sure I didn't have anything in the category where I have subcategories just in case that was the problem, not sure what else the problem could be...

my site is http://stufftoscrap.com/store

Any help would be appreciated since I can't have products in categories and subcategories, I'd at least like to be able to have the subcategories listed in the center.

Thanks.

26 Oct 2009, 10:39 PM
#8
neparker avatar

neparker

New Zenner

Join Date:
Apr 2009
Posts:
79
Plugin Contributions:
0

Re: Subcategories not showing in center

Also, now that I have the subcategories, I can't do a sale for that category. Any suggestions? Do I have to click each subcategory that instead of just the main category?

26 Oct 2009, 10:44 PM
#9
gjh42 avatar

gjh42

Black Belt

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

Re: Subcategories not showing in center

View source shows this:

<!-- BOF: Display grid of available sub-categories, if any --> <!-- hsyong remove categories thumbnails --> <!-- EOF: Display grid of available sub-categories -->

which indicates that your template's maker disabled the function permanently. It should be possible to find the file and replace code from a stock version. I have to leave now and can't take any more time tonight - will be back tomorrow.

26 Oct 2009, 10:52 PM
#10
neparker avatar

neparker

New Zenner

Join Date:
Apr 2009
Posts:
79
Plugin Contributions:
0

Re: Subcategories not showing in center

Thanks for looking into this and helping me, I will look forward for your assistance tomorrow. Thanks again!

27 Oct 2009, 11:00 PM
#11
neparker avatar

neparker

New Zenner

Join Date:
Apr 2009
Posts:
79
Plugin Contributions:
0

Re: Subcategories not showing in center

I was wondering if you found a stock version that I could copy whatever code or source is needed to make my subcategories show up in the center.

gjh42:

View source shows this:

<!-- BOF: Display grid of available sub-categories, if any --> <!-- hsyong remove categories thumbnails --> <!-- EOF: Display grid of available sub-categories -->

which indicates that your template's maker disabled the function permanently. It should be possible to find the file and replace code from a stock version. I have to leave now and can't take any more time tonight - will be back tomorrow.

28 Oct 2009, 7:48 AM
#12
gjh42 avatar

gjh42

Black Belt

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

Re: Subcategories not showing in center

You should still have the original versions of all files in /template_default/ folders, or plain /includes/modules/ or language folders, as long as your template was built correctly using the template override system.

You can quickly find the file that needs repair with Tools > Developers Toolkit. Paste
hsyong remove categories thumbnails
in the lower left box, select all files and search. This should be a /your_template/ file; look in the same path in /template_default/ or non-template folder to find the original code.

3 Nov 2009, 11:25 PM
#13
neparker avatar

neparker

New Zenner

Join Date:
Apr 2009
Posts:
79
Plugin Contributions:
0

Re: Subcategories not showing in center

When I find this original code.... where do I add it? And will this mess up the template I'm using at all?

3 Nov 2009, 11:27 PM
#14
neparker avatar

neparker

New Zenner

Join Date:
Apr 2009
Posts:
79
Plugin Contributions:
0

Re: Subcategories not showing in center

This is what I found in the tpl_index_categories.php

Line #65 : <!-- hsyong remove categories thumbnails -->

What do I do next to make it so the subcategories show in the center?

4 Nov 2009, 9:01 AM
#15
gjh42 avatar

gjh42

Black Belt

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

Re: Subcategories not showing in center

The stock tpl_index_categories.php has this:```php

<?php } else { ?> <h1 id="indexCategoriesHeading"><?php echo $breadcrumb->last(); ?></h1> <?php } ?> <?php if (PRODUCT_LIST_CATEGORIES_IMAGE_STATUS_TOP == 'true') { // categories_image if ($categories_image = zen_get_categories_image($current_category_id)) { ?> <div id="categoryImgListing" class="categoryImg"><?php echo zen_image(DIR_WS_IMAGES . $categories_image, '', SUBCATEGORY_IMAGE_TOP_WIDTH, SUBCATEGORY_IMAGE_TOP_HEIGHT); ?></div> <?php } } // categories_image ?> ```Try replacing whatever is missing in your copy.
4 Nov 2009, 2:31 PM
#16
neparker avatar

neparker

New Zenner

Join Date:
Apr 2009
Posts:
79
Plugin Contributions:
0

Re: Subcategories not showing in center

I did, and it worked, thanks so much!!!

7 Nov 2009, 10:55 PM
#17
neparker avatar

neparker

New Zenner

Join Date:
Apr 2009
Posts:
79
Plugin Contributions:
0

Re: Subcategories not showing in center

I got the subcategories to show up in the center doing what you said, however, now they are on the main page too, all of them. I only want them to show up in the center when the customer clicks on that category.

How can I get the subcategories to not be listed on the main page, only when they click on that category that has subcategories.

See store to see what I'm talking about http://stufftoscrap.com/store

10 Nov 2009, 8:48 AM
#18
gjh42 avatar

gjh42

Black Belt

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

Re: Subcategories not showing in center

Configuration > Layout Settings > Categories - display on main page > set to false.

10 Nov 2009, 2:57 PM
#19
neparker avatar

neparker

New Zenner

Join Date:
Apr 2009
Posts:
79
Plugin Contributions:
0

Re: Subcategories not showing in center

thank you so much! it's perfect now! :)

26 Nov 2009, 6:30 PM
#20
boardmangraham avatar

boardmangraham

New Zenner

Join Date:
Oct 2009
Posts:
6
Plugin Contributions:
0

Re: Subcategories not showing in center

gjh42.. All I can say is: YOURE A LEGEND!

You dont know how long I have spend trying to find the answer for this, and now with your help ive finally fixed it!

For anybody who struggles at all with what code to add in the above posts, all you have to do is:

Replace:

<!-- BOF: Display grid of available sub-categories, if any --> <!-- hsyong remove categories thumbnails --> <!-- EOF: Display grid of available sub-categories -->

With:

<!-- BOF: Display grid of available sub-categories, if any --> <?php if (PRODUCT_LIST_CATEGORY_ROW_STATUS == 0) { // do nothing } else { // display subcategories /** * require the code to display the sub-categories-grid, if any exist */ require($template->get_template_dir('tpl_modules_category_row.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_row.php'); } ?> <!-- EOF: Display grid of available sub-categories -->

Save the changes and youre all fixed!

Thanks again gjh42, youve made my day!