Jump to content

Display reference number on product_list page


Steveio

Recommended Posts

Hi,

 

I am wanting to display 'product references' on the 'product-list' pages exactly as they are by default on individual product pages.

 

I have tried adding the code in red below to the themes > default-bootstrap > product-list.tpl file. It displays the text 'Reference:' but not the respective reference number.

 

<h5 itemprop="name">
{if isset($product.pack_quantity) && $product.pack_quantity}{$product.pack_quantity|intval|cat:' x '}{/if}
<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>
</h5>                
<p id="product_reference_products_list"{if empty($product->reference) || !$product->reference} style="display: none;"{/if}>
<label>{l s='ref:'} </label>
<span class="editable" itemprop="sku">{if !isset($groups)}{$product->reference|escape:'html':'UTF-8'}{/if}</span>
</p>

               

Does anyone know what I might be doing wrong?

 

Thanks

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...