shotagl Posted May 1, 2014 Share Posted May 1, 2014 Hi all, I'm downloaded the small module for prestashop. They can adding icons in menu/categories, but I can't find from where I can upload the icons. This is link for free module blockcategoriesi https://mega.co.nz/#!jEFAEKxB!8KuiyHShcs3YyE37b12JgWY_oyYEF7Sjbwd7wJBN6mY Thanks a lot Link to comment Share on other sites More sharing options...
vekia Posted May 1, 2014 Share Posted May 1, 2014 category-tree-branch.tpl you can add there <img> tag depending on node id {if $node.id==5} <img src="PasteUrlToImageHere"/> {/if} create as many if conditions as you want. Link to comment Share on other sites More sharing options...
shotagl Posted May 1, 2014 Author Share Posted May 1, 2014 <li {if isset($last) && $last == 'true'}class="last"{/if}> <a href="{$node.link|escape:'htmlall':'UTF-8'}" {if isset($currentCategoryId) && $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:'htmlall':'UTF-8'}">{$node.name|escape:'htmlall':'UTF-8'}</a> {if $node.children|@count > 0} <ul> {foreach from=$node.children item=child name=categoryTreeBranch} {if $smarty.foreach.categoryTreeBranch.last} {include file="$tpl_dir./category-tree-branch.tpl" node=$child last='true'} {else} {include file="$tpl_dir./category-tree-branch.tpl" node=$child last='false'} {/if} {/foreach} </ul> {/if}</li> where must I write this code? Link to comment Share on other sites More sharing options...
vekia Posted May 1, 2014 Share Posted May 1, 2014 <li {if isset($last) && $last == 'true'}class="last"{/if}> HERE <a href="{$node.link|escape:'htmlall':'UTF-8'}" {if isset($currentCategoryId) && $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:'htmlall':'UTF-8'}">{$node.name|escape:'htmlall':'UTF-8'}</a> Link to comment Share on other sites More sharing options...
shotagl Posted May 1, 2014 Author Share Posted May 1, 2014 <li {if isset($last) && $last == 'true'}class="last"{/if}> HERE <a href="{$node.link|escape:'htmlall':'UTF-8'}" {if isset($currentCategoryId) && $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:'htmlall':'UTF-8'}">{$node.name|escape:'htmlall':'UTF-8'}</a> this has no effect Link to comment Share on other sites More sharing options...
vekia Posted May 1, 2014 Share Posted May 1, 2014 make sure that: - your theme doesnt override module file - you added code properly - you defined ID of category that exists - recompile entire theme and clear shop cache Link to comment Share on other sites More sharing options...
shotagl Posted May 1, 2014 Author Share Posted May 1, 2014 (edited) how can I "- recompiling entire theme?" Edited May 1, 2014 by shotagl (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted May 1, 2014 Share Posted May 1, 2014 you can do it under adv. paramters > performance tab in back office there is an option to turn on force compile. turn it on and refresh your front office. Link to comment Share on other sites More sharing options...
neerajlm10 Posted January 22, 2015 Share Posted January 22, 2015 How can i bring the category images from category.tpl to category-tree-branch.tpl.I copied the code for image but it is not loaded correctly.pls help Link to comment Share on other sites More sharing options...
mikewra Posted January 24, 2015 Share Posted January 24, 2015 Not sure what you asking. But if I'm following this thread correctly, you're not understanding what Vekia provided in the code in #2 above. I'll break it down a bit more in an example. When he writes: <img src="PasteUrlToImageHere"/> the part in " " is the path to the icon image. You can upload them to whatever image folder you want. The one below- img/c -is just an example. {if $node.id==5} <img src="http://yourstore.com/img/c/whatever.ico"/> {/if} Link to comment Share on other sites More sharing options...
soufiane011 Posted February 5, 2015 Share Posted February 5, 2015 Thank you vekia, greate tuto 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