Arpit Bajpai Posted August 22, 2010 Share Posted August 22, 2010 Hi guys,It's been good time getting a hang of prestashop.My Query is: I want to add an external link to subcatergory.Ex.Phone <--- Main catergory - Motorala < this is link to external page like www.motorola.com>Please do let me know how can i do that.CheersArpit Link to comment Share on other sites More sharing options...
rocky Posted August 24, 2010 Share Posted August 24, 2010 There is no option to do that in PrestaShop. How many categories need to be redirected to external links? If there aren't many, you could edit modules/blockcategories/category-tree-branch.tpl and change line 2 from: <a href="{$node.link|escape:html:'UTF-8'}" {if $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'} to: <a href="{if $node.id == 2}http://www.motorola.com{else}{$node.link|escape:html:'UTF-8'}{/if}" {if $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'} Change 2 to the ID of the Motorola category. You can add {elseif $node.id == 3} after motorola.com to add another external link for category 3 if necessary. Link to comment Share on other sites More sharing options...
acedubai Posted July 27, 2011 Share Posted July 27, 2011 I would like to put the below mentioned link in the subcategory for earning affiliate commissions. This link when put, will generate an image in the subcategory, which when clicked will lead to the affiliate site. <a href="http://www.greensmoke.com/261.html" target="_blank"><img border="0" src="http://www.greensmoke.com/earn/banners/pink125x125.jpg" width="125" height="125" alt=""></a> Can someone explain how this can be done? Link to comment Share on other sites More sharing options...
Gasperus Posted July 13, 2013 Share Posted July 13, 2013 (edited) Hello, i hope this thread is not dead. I am trying to do this: <a href="{if $node.id == 6}http://www.facebook....rabbitees}{if $node.id == 7}http://neonrabbitees.tumblr.com}{if $node.id == 8}http://neonrabbit.eu/blog/all-post.html}{else}{$node.link|escape:'htmlall':'UTF-8'}" {/if} but nothing happens. Site: http://neonrabbit.eu/en/ read IDs from prestashop backoffice. Thanks for help;) Edit: Prestashop 1.5.4. Edited July 13, 2013 by Gasperus (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted July 13, 2013 Share Posted July 13, 2013 you have to close each {if} with {/if} tag check your code please, you've got unclosed divs + weirdy singe "}" signs Link to comment Share on other sites More sharing options...
Okiaatx Posted October 24, 2014 Share Posted October 24, 2014 Can you tell me how this is done in 1.6X? It seems that the code you're showing is slightly different....Thanks 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