Show menu based on category
How can I check if someone has selected a certain category or subcategory in a category? What I'm trying to do is basically make two different main category homepages. One for 'Product 1' and another for 'Product 2'.
If user clicks on the main category menu on the actual store welcome page for 'Product 1' then I dont want to show the main menu anymore I just want to show some menus that are relavant to this category instead. Same for 'Product 2'. Is this possible? Anyone have a module? |
Re: Show menu based on category
copy customer/home.tpl to customer/home2.tpl
change your customer/home.tpl: Code:
{if $main eq "catalog" && $current_category.categoryid eq "Custom_category_id"} It will be displayed only for one custom category. |
Re: Show menu based on category
Victor thanks - how can I limit a number of subcategories to be displayed under the main category for a menu? Say for instance I'm using what you provided me above for category_id = 1. How can I limit number of subcategories to '5' and if possible make them random? I know php, but smarty is kickin my a$$. Thanks
|
Re: Show menu based on category
Also how can I make sure that this new homepage appears for all subcategories under this main category?
|
Re: Show menu based on category
Can you describe the result you want to achieve as I don't catch it
|
Re: Show menu based on category
What I'm trying to do is have a totally seperate area for a category and this area will be shown for all subcategories under this. Basically like another homepage for a cetain product with different menus and search options that relate to this category. Is this possible? THX Victor for your assistance.
|
Re: Show menu based on category
add in your include/categories.php
right before the lines Code:
this code: Code:
/*custom home.tpl mod*/ your customer/home.tpl should be like this: Code:
{if $area2 ne ''} |
Re: Show menu based on category
Victor thank you. When your using clean urls the (cat) number doesnt get passed at least that you can see. How can I pickup the category number when using clean urls for the categories to know which category id im in?
Thanks :) |
Re: Show menu based on category
Do you need to know current category id in templates or in php script?
For templates it is Code:
{$current_category.categoryid} |
Re: Show menu based on category
Ok issue im having. Is I added everything you said Victor. But what I want is right now Im showing a new menu that lists all subcategories for main category "DVDs" but once you click on one of those subcategories in the new menu all the subcategories disappear in this menu. How can I make these subcategories remain throughout this specific main category "DVDs" and subcategories? I just want a static menu for this section that shows all the subcategories all the time if they are in the main category "DVDs" section. I hopt his makes sense.
|
All times are GMT -8. The time now is 11:22 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.