Egocefalo Posted September 21, 2014 Share Posted September 21, 2014 Hi, I'm using prestashop 1.6.0.9 with default theme and default blockviewed block. Some idea on how to display new-label and special-label on viewed products block ítems? (the ones at the top corners of product's images on product list) Thanks! Link to comment Share on other sites More sharing options...
nutxlago Posted September 21, 2014 Share Posted September 21, 2014 (edited) You must copy this piece of code (taken from product-list.tpl) and paste it at the desired place and file. {if isset($product.new) && $product.new == 1} <a class="new-box" href="{$product.link|escape:'html':'UTF-8'}"> <span class="new-label">{l s='New'}</span> </a> {/if} {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE} <a class="sale-box" href="{$product.link|escape:'html':'UTF-8'}"> <span class="sale-label">{l s='Sale!'}</span> </a> {/if} Well. it is possible you have to change it a little. Main point is to add the if condition and the label span: {if isset($product.new) && $product.new == 1} <!--your current box showing the product--> <span class="new-label">{l s='New'}</span> {/if} {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE} <!--your current box showing the product--> <span class="sale-label">{l s='Sale!'}</span> {/if} Always make a backup of the file you are about to modify Edited September 21, 2014 by nutxlago (see edit history) Link to comment Share on other sites More sharing options...
Egocefalo Posted September 21, 2014 Author Share Posted September 21, 2014 Hi nutxlago, I did try that but it doesn't work. I guess its because $viewedProduct is used instead of $product on viewed products block. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts