aroha Posted July 28, 2008 Share Posted July 28, 2008 I want to have a horizontal nav with six main categories listed. i.e Women's | Men's | Kid's .... when one selects one of the parent categories only the child sub categories should be displayed in the category block module... i don't want to see unrelated categories from every parent... does this make sense? is this possible?as an example check http://www.gap.com or http://www.urbanoutfitters.com Link to comment Share on other sites More sharing options...
daYmo Posted October 15, 2008 Share Posted October 15, 2008 I also need that kind of navigation....It's already done with prestashop on http://www.fep.com/But no help....need to re-develop it ourselves.When I'll be finished I'll let you know Link to comment Share on other sites More sharing options...
daYmo Posted October 20, 2008 Share Posted October 20, 2008 I forgot to post my solution ... Here it is.To display only sub categories on the left you'll have to do edit you /module/blockcategories/blockcategories.php file //construct categories tree if(isset($_GET['id_category']) || isset($_GET['id_product'])) // only display subcategories { $rootCateg = new Category (intval($_GET['id_category']), intval($params['cookie']->id_lang)); while($rootCateg->id_parent != 1) { $rootCateg=new Category($rootCateg->id_parent); } $blockCategTree = $rootCateg->recurseLiteCategTree(intval(Configuration::get('BLOCK_CATEG_MAX_DEPTH'))); $isDhtml = (Configuration::get('BLOCK_CATEG_DHTML') == 1 ? true : false); $smarty->assign('currentCategoryId', intval($_GET['id_category'])); $smarty->assign('blockCategTree', $blockCategTree); $smarty->assign('branche_tpl_path', _PS_MODULE_DIR_.'blockcategories/category-tree-branch.tpl'); $smarty->assign('isDhtml', $isDhtml); return $this->display(__FILE__, 'blockcategories.tpl'); } else // don't display category block return null; Link to comment Share on other sites More sharing options...
aroha Posted October 20, 2008 Author Share Posted October 20, 2008 i'm going to try it now and see how i go.thanks for sharing buddy. Link to comment Share on other sites More sharing options...
Presta-TR Posted December 3, 2008 Share Posted December 3, 2008 How is the use please!and look this : http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu-bullet.htmwhat is the way for this menü use from CATEGORIES!!!too thanks Link to comment Share on other sites More sharing options...
daYmo Posted December 3, 2008 Share Posted December 3, 2008 Hi,I don't really get your need Presta-TR ? You mean : how to use this menu(http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu-bullet.htm) instead of the default tree menu ? Let me know & I'll tell you how to do.See ya Link to comment Share on other sites More sharing options...
daYmo Posted December 5, 2008 Share Posted December 5, 2008 Here you are. So….> RESTRICTIONS :1. it is ok for 2 levels but I did go further for a 3rd level… not that much work needed for a 3rf.2. it doesn’t take into account the current category> INSTALLATION1. Unzip the following module in your modules directory2. In your BO > Modules : Uninstall BlockCategories module3. Install Categories block with drop down menu4. Go into BO > Modules > Positions so as to put it whereever you want in your left column.See ya================UPDATE 27 March 2009 : NO RESTRICTIONS ANYMORE.module available here : http://www.prestashop.com/forums/viewthread/8272/#36984 Link to comment Share on other sites More sharing options...
myrabbitvibrators Posted January 21, 2009 Share Posted January 21, 2009 I tried the attached file but it seems to be missing something, on my site it displays the categories with a blue highlight and nothing else can you please take a look at it for me, the site its http://www.myrabbitvibrators.com/Thanks Link to comment Share on other sites More sharing options...
daYmo Posted January 21, 2009 Share Posted January 21, 2009 Hi,what's your running Prestashop version ? See ya Link to comment Share on other sites More sharing options...
myrabbitvibrators Posted January 21, 2009 Share Posted January 21, 2009 Our site is running version Version 1.1.0.5 - 0.046s of PrestaShop Link to comment Share on other sites More sharing options...
Haytham Posted April 29, 2009 Share Posted April 29, 2009 Hi,I don't really get your need Presta-TR ? You mean : how to use this menu(http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu-bullet.htm) instead of the default tree menu ? Let me know & I'll tell you how to do.See ya Hi Mr . can you please help me to use this menu !! Link to comment Share on other sites More sharing options...
daYmo Posted April 29, 2009 Share Posted April 29, 2009 Sure !I put the module here : http://www.prestashop.com/forums/viewthread/8272/#36984 Link to comment Share on other sites More sharing options...
Guest Posted July 20, 2010 Share Posted July 20, 2010 I forgot to post my solution ... Here it is.To display only sub categories on the left you'll have to do edit you /module/blockcategories/blockcategories.php file //construct categories tree if(isset($_GET['id_category']) || isset($_GET['id_product'])) // only display subcategories { $rootCateg = new Category (intval($_GET['id_category']), intval($params['cookie']->id_lang)); while($rootCateg->id_parent != 1) { $rootCateg=new Category($rootCateg->id_parent); } $blockCategTree = $rootCateg->recurseLiteCategTree(intval(Configuration::get('BLOCK_CATEG_MAX_DEPTH'))); $isDhtml = (Configuration::get('BLOCK_CATEG_DHTML') == 1 ? true : false); $smarty->assign('currentCategoryId', intval($_GET['id_category'])); $smarty->assign('blockCategTree', $blockCategTree); $smarty->assign('branche_tpl_path', _PS_MODULE_DIR_.'blockcategories/category-tree-branch.tpl'); $smarty->assign('isDhtml', $isDhtml); return $this->display(__FILE__, 'blockcategories.tpl'); } else // don't display category block return null; Where should I paste this code please? into which line please? thank you ! 1 Link to comment Share on other sites More sharing options...
Recommended Posts