cookiez Posted April 18, 2013 Share Posted April 18, 2013 I want my product when clicked, always open in new tab, but only for product page,this is the code <li id="thumbnail_{$image.id_image}"> <a href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox')}" rel="other-views" class="thickbox {if $smarty.foreach.thumbnails.first}shown{/if}" title="{$image.legend|htmlspecialchars}"> <img id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'medium')}" alt="{$image.legend|htmlspecialchars}" height="{$mediumSize.height}" width="{$mediumSize.width}" /> </a> can someone help me? Link to comment Share on other sites More sharing options...
vekia Posted April 18, 2013 Share Posted April 18, 2013 you attached code for thumbnails, why? you want to open image in new tab? sorry, but i don't undestand it well, can you please provide more informations? Link to comment Share on other sites More sharing options...
cookiez Posted April 18, 2013 Author Share Posted April 18, 2013 hi vekia, thanks for reply. I want everytime I clicked on product page in front office, I want open in new tab. I tried using this code : <head> <base href="http://www.example.com/" target="_blank"> </head> but it's always open in new tab for whole object (cms,top horizontal menu,etc) Link to comment Share on other sites More sharing options...
NemoPS Posted April 19, 2013 Share Posted April 19, 2013 If you want to use the target _blank for that, you'll have to add the code in product-list.tpl, not product.tpl as that seems a product list to me Link to comment Share on other sites More sharing options...
vekia Posted April 21, 2013 Share Posted April 21, 2013 You don't have to use: <base href="http://www.example.com/" target="_blank"> it is really bad idea i think. follow Nemo suggestion :-) Link to comment Share on other sites More sharing options...
cookiez Posted April 22, 2013 Author Share Posted April 22, 2013 how to do that? I tried this <h3><a href="{$product.link|escape:'htmlall':'UTF-8'}" target="_blank" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:25:'...'|escape:'htmlall':'UTF-8'}</a></h3> still no luck Link to comment Share on other sites More sharing options...
NemoPS Posted April 22, 2013 Share Posted April 22, 2013 Prestashop version? You might need to recompile if it's 1.4 Link to comment Share on other sites More sharing options...
cookiez Posted April 22, 2013 Author Share Posted April 22, 2013 PrestaShop™ 1.4.6.2 how to recompile? Link to comment Share on other sites More sharing options...
NemoPS Posted April 22, 2013 Share Posted April 22, 2013 Preferences/performance/force recompile; yes Link to comment Share on other sites More sharing options...
Recommended Posts