XGhozt Posted May 3, 2010 Share Posted May 3, 2010 I was hoping someone could help me. I'm trying to create a module for the home page to display categories like this, in two columns:CATNAME [iCON]* subcat* subcat* subcatSo, that format, in 2 columns, which I could do. The only part I'm having trouble with is getting the subcategories to display under each category.I know that I can use something like this to display all the subcategories under the main category: $category = new Category(1); $subCategories = $category->getSubCategories(1); So, can I use something similar to this to display sub categories? I need to display all parent directories and list the sub categories below it on the home page.Any ideas? Link to comment Share on other sites More sharing options...
Burhan BVK Posted May 3, 2010 Share Posted May 3, 2010 Why don't you check the blockcategories module, duplicate it and change the style to fit your need. You just need to change the hookleftcolumn to hookhome. Link to comment Share on other sites More sharing options...
XGhozt Posted May 3, 2010 Author Share Posted May 3, 2010 If I do that, then how can I get the category image? I was basing it off a different module which had the image and the category there. I thought it would be easier to add in the subcategories. Link to comment Share on other sites More sharing options...
babyewok Posted July 20, 2010 Share Posted July 20, 2010 Hi, did you figure this out? I want to do something similar Link to comment Share on other sites More sharing options...
weit Posted January 16, 2011 Share Posted January 16, 2011 Hi, someone found a solution? Link to comment Share on other sites More sharing options...
babyewok Posted January 17, 2011 Share Posted January 17, 2011 Hi, yes I did manage to figure this out by adapting another module. When I have time, I will post the details... Link to comment Share on other sites More sharing options...
XGhozt Posted January 17, 2011 Author Share Posted January 17, 2011 I found this module: http://prestashop.joelgaujard.info/module-category/11-home-category-homecategory.htmlI used that and I was able to tweak it out enough to work exactly as I needed. The code is there to display products on the home page based on the category set in the admin panel. 1 Link to comment Share on other sites More sharing options...
dark_effie Posted February 16, 2011 Share Posted February 16, 2011 Hi,I made a new home category module from the other module which i tried to customized and i came up with a module that display categories with images. It looks dirty coz i havent delete some of unused codes but it's working fine in my site.Im using category_home (as my default image size). You can add this image size in Preferences-> Image at your Back End.Just try to check the attachment. homecategory.zip Link to comment Share on other sites More sharing options...
jarrii Posted January 9, 2012 Share Posted January 9, 2012 If I do that, then how can I get the category image? I was basing it off a different module which had the image and the category there. I thought it would be easier to add in the subcategories. Hello, did you find some solution? Link to comment Share on other sites More sharing options...
XGhozt Posted January 10, 2012 Author Share Posted January 10, 2012 Hello, did you find some solution? Yes, if you read the whole topic you'll see more than one solution posted. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now