Jump to content

How to show product_id in Front office


zahiras

Recommended Posts

Hi everyone!
Right now Prestashop shows product reference on the product front page:
 

 <div class="feature_line" id="product_reference" {if isset($groups) OR !$product->reference}style="display: none;overflow: hidden;"{else}style="overflow: hidden;"{/if}><span class="feature_line_left">{l s='Product code'}:</span><span class="feature_line_right" itemprop="sku">{$product->reference|escape:'htmlall':'UTF-8'}</span></div>

How can I change it, in order to show product id (numbers)? I tried for 2 hours with no success :/ 
I'm editing product_tpl file. 

 

 

Edited by zahiras (see edit history)
Link to comment
Share on other sites

Hello prestamonste!
Your answer was not completely accurate, but gave a hint. Thank you :)
There were needed more changes in the code. This code shows product ID instead of reference number:
 

<div class="feature_line" id="product" {$product->id|intval}><span class="feature_line_left">{l s='Product code'}:</span><span class="feature_line_right" itemprop="sku">{$product->id|intval}</span></div>



 

Edited by zahiras (see edit history)
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...