Yarksie Posted June 19, 2015 Share Posted June 19, 2015 Hello all. I am having some trouble with my prestashop site, I don't know how to hide selected categories in the category block module, I need the category to remain active but not show on the category block, they are named the same as other categories there but they serve a different purpose. I am using Prestashop 1.6.0.9. Link to comment Share on other sites More sharing options...
NemoPS Posted June 20, 2015 Share Posted June 20, 2015 You can try skipping them in the foreach loop. Theme folder, blockcategories.tpl{foreach from=$blockCategTree.children item=child name=blockCategTree}inside this, try with {if $child.id_category|in_array:[1,2,3]}{continue}{/if}I am not sure whether it's id_category or just id. Try both Of course, use those categories' IDs instead of 1,2,3 Link to comment Share on other sites More sharing options...
Yarksie Posted June 22, 2015 Author Share Posted June 22, 2015 Hi Nemo1 Thank you for your response, I tried both ways and neither worked, I am set to force compilation and I also cleared my cache. Here is what the code in my blockcategories.tpl looks like. I'm not sure if I've missed anything. foreach from=$blockCategTree.children item=child name=blockCategTree} {if $smarty.foreach.blockCategTree.last} {include file="$branche_tpl_path" node=$child last='true'} {else} {include file="$branche_tpl_path" node=$child} {/if} {if $child.id_category|in_array:[23,24,25]}{continue}{/if} {/foreach} Link to comment Share on other sites More sharing options...
NemoPS Posted June 29, 2015 Share Posted June 29, 2015 You must use it before the inclusion 1 Link to comment Share on other sites More sharing options...
Recommended Posts