iCoaching Posted June 26, 2011 Share Posted June 26, 2011 We have a category with some subcategories. When you click on the category, the template generates a list of the subcategories with images. As soon as you click on a subcategory, the list disappears. I would like to program the template in a way that within a subcategory, the list shows the subcategories of the parent category.How do I achieve that? The subcategories list is generated with the following code. I would have to extend this code and do something like {if isset($parentcategory has $subcategories)} {foreach subcategory of parentcategory} getimage getcategorylink blabla Does someone know how to do this??Here's the current code: {if isset($subcategories)} <!-- Subcategories --> {l s='Subcategories'} {foreach from=$subcategories item=subcategory} getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}"> {if $subcategory.id_image} getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} {/if} getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'} {/foreach} {/if} Link to comment Share on other sites More sharing options...
idm1 Posted July 19, 2011 Share Posted July 19, 2011 Hi,I am trying to achieve the same thing! did you find a solution? Link to comment Share on other sites More sharing options...
vivek tripathi Posted August 1, 2011 Share Posted August 1, 2011 which prestashop version you are using its by default feature in prestashop 1.4+ 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