Kennedy5020 Posted June 4, 2013 Share Posted June 4, 2013 (edited) Hi, i am using prestashop 1.5.4.1.. I need to display most viewed products and recently viewed products (separately) in product details page. (productscategory.tpl page) . My code is : <div id="viewed-products_block_left" class="block products_block"> <p class="title_block">{l s='Viewed products' mod='blockviewed'}</p> <div class="block_content"> <ul class="products clearfix"> {foreach from=$productsViewedObj item=viewedProduct name=myLoop} <li class="clearfix{if $smarty.foreach.myLoop.last} last_item{elseif $smarty.foreach.myLoop.first} first_item{else} item{/if}"> <a href="{$viewedProduct->product_link}" title="{l s='More about' mod='blockviewed'} {$viewedProduct->name|escape:html:'UTF-8'}" class="content_img"> <img src="{if isset($viewedProduct->id_image) && $viewedProduct->id_image}{$link->getImageLink($viewedProduct->link_rewrite, $viewedProduct->cover, 'medium_default')}{else}{$img_prod_dir}{$lang_iso}-default-medium_default.jpg{/if}" alt="{$viewedProduct->legend|escape:html:'UTF-8'}" /> </a> <div class="text_desc"> <p class="s_title_block"><a href="{$viewedProduct->product_link}" title="{l s='More about' mod='blockviewed'} {$viewedProduct->name|escape:html:'UTF-8'}">{$viewedProduct->name|truncate:14:'...'|escape:html:'UTF-8'}</a></p> <p><a href="{$viewedProduct->product_link}" title="{l s='More about' mod='blockviewed'} {$viewedProduct->name|escape:html:'UTF-8'}">{$viewedProduct->description_short|strip_tags:'UTF-8'|truncate:44}</a></p> </div> </li> {/foreach} </ul> </div> </div> i want display the most viewed product in productscategory.tpl (above code copied from modules blockviewed.tpl file ).when i put above code in productscategory.tpl nothing will display Edited June 28, 2013 by karthick (see edit history) Link to comment Share on other sites More sharing options...
shacker Posted June 6, 2013 Share Posted June 6, 2013 you need to change the hook in the module. The hook of this modules are hookLeftColumn or RighColumn, and you need to change to hookExtraLeft for example. you can find the hooks in the blockviewed.php Remember to g oto modules, positions and transplant the module to another hook Link to comment Share on other sites More sharing options...
perusi Posted September 20, 2013 Share Posted September 20, 2013 anything to display them in the product footer? Link to comment Share on other sites More sharing options...
Recommended Posts