Zen Cart Logo
Forums / Customization from the Admin / How to show a specific category on main page

How to show a specific category on main page

Locked

Views: 10,406

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
3 Nov 2007, 6:37 PM
#1
loquela avatar

loquela

New Zenner

Join Date:
Feb 2007
Posts:
7
Plugin Contributions:
0

How to show a specific category on main page

I would like to show the sub-categories of a specific Top Level category on the Main Page. How can I do this?
*

There seems to be a clue here:

Configuration > Layout Settings > Categories - Always Show on Main Page:

Default category can be set to Top Level or a Specific Top Level

How do I set the default category to a Specific top level? :frusty:
*

4 Nov 2007, 1:42 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to show a specific category on main page

Be sure to set that Category in the next question:

Main Page - Opens with Category
0= Top Level Categories
Or enter the Category ID#
Note: Sub Categories can also be used Example: 3_10

4 Nov 2007, 4:00 PM
#3
loquela avatar

loquela

New Zenner

Join Date:
Feb 2007
Posts:
7
Plugin Contributions:
0

Re: How to show a specific category on main page

Many thanks Ajeh,

But this now seems to dissable the ability to show Featured Products and/or New Products in the Main Page centre column.

I would like to have two boxes in the centre column the first showing the Featured Products and the second showing the sub cats as described above. Is this possible?

4 Nov 2007, 4:30 PM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: How to show a specific category on main page

Admin > Configuration > Index Listing has settings for a variety of situations, like
Show Featured Products on Main Page - Category with SubCategories.

I'm not sure if you can get the Featured centerbox above the subcat display... I recall seeing code to handle this type of function, but not sure in which file.

4 Nov 2007, 4:42 PM
#5
loquela avatar

loquela

New Zenner

Join Date:
Feb 2007
Posts:
7
Plugin Contributions:
0

Re: How to show a specific category on main page

Thanks Glenn,

If I set 'Main Page - Opens with Category' to 0, top level categories show and Features Products appear fine. But if I set 'Main Page - Opens with Category' to display a sub category, the Featured Products do not display. Is there a way around this?

4 Nov 2007, 4:53 PM
#6
gjh42 avatar

gjh42

Black Belt

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

Re: How to show a specific category on main page

Look at the Index Listing settings mentioned above.

4 Nov 2007, 5:17 PM
#7
loquela avatar

loquela

New Zenner

Join Date:
Feb 2007
Posts:
7
Plugin Contributions:
0

Re: How to show a specific category on main page

Thanks Glenn,
Index Listing > Show Featured Prroducts on Main Page is set to display. As mentioned above Featured Products do display fine when Layout Settings > Main Page Opens With Category = 0, but when I set this to a sub category the Featured Products no longer appear.

4 Nov 2007, 6:13 PM
#8
loquela avatar

loquela

New Zenner

Join Date:
Feb 2007
Posts:
7
Plugin Contributions:
0

Re: How to show a specific category on main page

I currently have the following settings:

  • Index Listing > Show New Product on Main Page (2)
  • Index Listing > Show Featured Products on Main Page (3)
  • Index Listing > Show New Product on Main Page - Categories with Sub Categories (2)
  • Index Listing > Show Featured Product on Main Page - Categories with Sub Categories (3)If I now do this:

Layout Settings > Main Page Opens With Category (0)

Index page centre column displays fine:

  • Top level categories
  • New Products
  • Featured ProductsBut if I do this:

Layout Settings > Main Page Opens With Category (17)

All that is displayed are the category 17 contents, no New Products and no Featured Products.

I checked the tpl_index_categories.php that is called when you set a new default category in Layout Settings > Main Page Opens With Category, and the code for displaying Featured Products and New Products appears to be in tact:

 
 
<?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_SPECIALS_PRODUCTS') { ?>
 
<?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?>
<?php } ?>
<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_UPCOMING') { ?>

Can anybody explain why Featured Products and New Products are not displaying in tpl.index_categories.php?? :frusty:

4 Nov 2007, 6:58 PM
#9
gjh42 avatar

gjh42

Black Belt

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

Re: How to show a specific category on main page

tpl.index_categories.php is not involved in the problem you describe.

Configuration > Index Listing > Show Featured Products - below Product Listing

applies to the product listing page.

4 Nov 2007, 8:19 PM
#10
loquela avatar

loquela

New Zenner

Join Date:
Feb 2007
Posts:
7
Plugin Contributions:
0

Re: How to show a specific category on main page

tpl.index_categories.php is not involved in the problem you describe.
Yes it is.

Layout Settings > Main Page Opens With Category COLOR=red[/COLOR] uses tpl.index_default

But if you change the default category:

Layout Settings > Main Page Opens With Category (number of sub cat) calls tpl.index_categories instead

And for some reason, this page is refusing to display Featured Products and New Products centre boxes.

Configuration > Index Listing > Show Featured Products - below Product Listing applies to the product listing page.

This is very true, but I am not interested in configuring the product listing page, I am trying to configure the index page centre column to show a specific category plus the Featured Products center box.

4 Nov 2007, 8:34 PM
#11
gjh42 avatar

gjh42

Black Belt

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

Re: How to show a specific category on main page

So does category 17 have subcats or products?

7 Nov 2007, 3:22 PM
#12
gjh42 avatar

gjh42

Black Belt

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

Re: How to show a specific category on main page

Just for interest, have you set
Show Featured Products - below Product Listing
to true?

From your initial descriptions, I got the impression that you were trying to display a subcategory (with products) on the home page. It appears that you are actually trying to display a top category which has subcategories, which does indeed use tpl_index_categories.php. I don't know why that would not be showing the boxes set for it.

13 Sep 2008, 9:32 PM
#13
jasonhoblin avatar

jasonhoblin

New Zenner

Join Date:
Sep 2008
Location:
SoCal
Posts:
1
Plugin Contributions:
0

Re: How to show a specific category on main page

i searched the faqs.
i searched the forum.
i clicked everything i could in admin...
... two hours later...

how do i display a specific category on the product pages?
not the new, not the featuerd, not the special... a specifica catgory to show up on the product listing pages.

i have two catagorys. 1=dvds, 2=clothing

i want a horizontal display of the clothing catagory on all the product pages. ideally, only on the first catagory, but if they duplicate on the second category fine.

can anyone say the items under Layout Settings, All Listings, Index Listing, and the four sub sections under Products Types are not just a blur of settings with overlaping functions and vague jargon. a simple task like display a catagory should not require this much effort. (i won't even comment on file structure.)

this should be simple, but zen is the absolute worst organization of menus i have even seen in a shopping cart or CMS system. that would be priority one! zen cart wold cut down on 20-30% of support if they organized the admin menus in a well thought out, user friendly hierarchy.

anyway, just ranting. any help is appreciated. thanks

13 Sep 2008, 9:46 PM
#14
gjh42 avatar

gjh42

Black Belt

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

Re: How to show a specific category on main page

There is no function in Zen Cart to display a category on another category's page. That would require substantial custom coding.

My only comment on the admin menus is that they are a gradual accretion of legacy code (much from OSCommerce), and are scheduled for a complete makeover after critical customer-side upgrades have been accomplished. See the Development Roadmap subforum at the top of the main forum menu.