zahiras Posted April 30, 2018 Share Posted April 30, 2018 (edited) 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 April 30, 2018 by zahiras (see edit history) Link to comment Share on other sites More sharing options...
prestamonste Posted April 30, 2018 Share Posted April 30, 2018 Hi, Please try with: {$product->id|intval} Thanks, Link to comment Share on other sites More sharing options...
zahiras Posted May 4, 2018 Author Share Posted May 4, 2018 (edited) 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 May 4, 2018 by zahiras (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