carinac Posted May 26, 2016 Share Posted May 26, 2016 (edited) I am trying to get the Reference number to show in both list view and Grid view. I was able to get it to show in list view by adding this code to product-list.tpl <p id="product_reference"{if empty($product.reference) || !$product.reference} style="display: none;"{/if}> <label>{l s='Listing #'} </label> <span class="editable" itemprop="sku">{$product.reference}</span> </p> but I can't get it to show up on grid view. Can anyone help? Edited June 2, 2016 by carinac (see edit history) Link to comment Share on other sites More sharing options...
rocky Posted June 1, 2016 Share Posted June 1, 2016 The easiest solution is to move the product reference after the product name so that it displays in both views. For example, assuming you're using the default PrestaShop theme, add your code above after the following on lines 117-119 of product-list.tpl: <a class="product-name" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url" > {$product.name|truncate:45:'...'|escape:'html':'UTF-8'} </a> Link to comment Share on other sites More sharing options...
carinac Posted June 1, 2016 Author Share Posted June 1, 2016 Thank you, I had it after and not before. But now it does show in list but only if it has <h5> around it and it removes the title. If I remove the <H5> it removes the reference number and put back on the title.... Link to comment Share on other sites More sharing options...
carinac Posted June 1, 2016 Author Share Posted June 1, 2016 Nevermind I didn't put it directly before <a class="product-name" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url" > {$product.name|truncate:45:'...'|escape:'html':'UTF-8'} </a> Now I did and it works, thanks so much! Link to comment Share on other sites More sharing options...
rocky Posted June 2, 2016 Share Posted June 2, 2016 I'm happy it worked for you. Please edit this topic and add [sOLVED] to the front of the title. 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