webbusiness23 Posted January 19, 2010 Share Posted January 19, 2010 How can i display the product's reference in the list of products from within each category?Check the attached photo. Link to comment Share on other sites More sharing options...
rocky Posted January 20, 2010 Share Posted January 20, 2010 Add the following after line 10 of product-list.tpl in your theme's directory: {$product.reference} You may need to add a #center_column div.products_block p.product_ref section to your global.css to make it look right. 1 Link to comment Share on other sites More sharing options...
webbusiness23 Posted January 20, 2010 Author Share Posted January 20, 2010 Thank you very much!It worked perfectly. I didn't need to add more code to the global.css file, it looks fine as it is. Link to comment Share on other sites More sharing options...
masbovi Posted March 2, 2012 Share Posted March 2, 2012 hi, I tried to do this on PS 1.4.7.0 but the variable is empty. How can I solve?? thanks Link to comment Share on other sites More sharing options...
kolxoznik1 Posted June 7, 2012 Share Posted June 7, 2012 I have the same problem. Please tell me how add language label for reference. I have been taken it prom product - {l s='Reference :'} Please tell me how to add reference translation from lang file to category list? Link to comment Share on other sites More sharing options...
roltexsklep Posted June 19, 2012 Share Posted June 19, 2012 (edited) Thank you very much! It worked perfectly. I didn't need to add more code to the global.css file, it looks fine as it is. Doesn't work in prestashop 1.4.4.1. WHY? {if isset($products)} <!-- Products list --> <ul id="product_list" class="clear"> {foreach from=$products item=product name=products} <li class="ajax_block_product {if $smarty.foreach.products.first}first_item{elseif $smarty.foreach.products.last}last_item{/if} {if $smarty.foreach.products.index % 2}alternate_item{else}item{/if} clearfix"> <div class="center_block"> {$product.reference} <a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} /></a> <h3>{if isset($product.new) && $product.new == 1}<span class="new">{l s='New'}</span>{/if}<a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></h3> <p class="product_desc"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|truncate:360:'...'|strip_tags:'UTF-8'|escape:'htmlall':'UTF-8'}">{$product.description_short|truncate:360:'...'|strip_tags:'UTF-8'}</a></p> <!-- There?? --> {$product.reference} </div> Edited June 19, 2012 by roltexsklep (see edit history) 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