si3sta Posted July 18, 2012 Share Posted July 18, 2012 Hi, Im building a shop that doesn´t have many products so im trying to show on the menu the first categories and the list of products on each category. Im trying to adapt the code on product-list.tpl into category-tree-branch.tpl but i dont know if is better idea to change the function getTree on blockcategories.php I dont know if would be easier to create a subcategory and check if the the subcategory have only one product and go to the product page instead a category page with a list of just one element It´s my first pretashop and im alittle bit lost, please help! Link to comment Share on other sites More sharing options...
si3sta Posted July 18, 2012 Author Share Posted July 18, 2012 i forgot to tell that im using prestashop 1.4.8.2 thanks Link to comment Share on other sites More sharing options...
math_php Posted July 18, 2012 Share Posted July 18, 2012 Hi, For this you really must have very few products. Easier way would be to show the entire tree (without to have to click on each sub categories). You can also use this solution http://www.prestashop.com/forums/topic/178299-multiple-product-pages-in-home-page/page__fromsearch__1 Else if you really are stuck to your solution, make a copy of blockcategories module, rename it and make the change you need. Link to comment Share on other sites More sharing options...
si3sta Posted July 18, 2012 Author Share Posted July 18, 2012 thanks, im working on the new module to show the producs. But if anyone have any tip would be great. Link to comment Share on other sites More sharing options...
si3sta Posted July 18, 2012 Author Share Posted July 18, 2012 im trying to debug the module with firePhp but it doesnt get the vars from function and classes, any idea? Link to comment Share on other sites More sharing options...
kia Posted July 26, 2012 Share Posted July 26, 2012 I want to display products belonging to each category on the left menu, I have few products, have you find the good way to modify blockcategories.php and blockcategories.tpl? I'm new in prestashop and i'm looking for the better way to do it? thanks for your help Link to comment Share on other sites More sharing options...
si3sta Posted July 26, 2012 Author Share Posted July 26, 2012 I have created a module from blockcategories. If you clic on a category with only one product, will show the product page. otherwise if the category have more than one product goes to the category page with the list of products. For me is working ok but im new on PHP and Prestashop so if you find anything wrong please let me know here is the module, just install it from the admin panel blockcatproduct.zip 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