I need to list sibling categories in the category page in a Prestashop theme. Currently it does show the sub-categories if any but not the sibling categories.
A quick answer would really be appreciated! Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For to start i would have created a override file in /override/controllers/, named CategoryController.php
And add this:
I this the basic way to do it, i have not tested it get. You need to find a way to not list current category in the list of siblings.
If the code works you will now have an array in category.tpl named category_siblings, you now need to for example copy the code in category.tpl that outputs the subcategories and replace the subcategories arra with the category_siblings array.