Karol Krakowiak Posted May 19, 2020 Share Posted May 19, 2020 (edited) How to display ID of product somewhere next to reference number on product page (product.tpl) also for products with combinations (Presta 1.6)? Edited May 19, 2020 by Karol Krakowiak (see edit history) Link to comment Share on other sites More sharing options...
PrestaServicePro Posted May 19, 2020 Share Posted May 19, 2020 Hello Karol Krakowiak, Open the current TPL folder, for example find $product.reference, before or after it add $product.id_product . It must help you. If something will be wrong, let me know. Thanks. Link to comment Share on other sites More sharing options...
Karol Krakowiak Posted May 21, 2020 Author Share Posted May 21, 2020 (edited) <p> <label>Numer produktu: </label> <span class="editable">{$product.id_product}</span> </p> <p id="product_reference"{if empty($product->reference) || !$product->reference} style="display: none;"{/if}> <label>{l s='Reference:'} </label> <span class="editable" itemprop="sku"{if !empty($product->reference) && $product->reference} content="{$product->reference}"{/if}>{if !isset($groups)}{$product->reference|escape:'html':'UTF-8'}{/if}</span> </p> Like this? because it doesn't work. Product page is broken then. Edited May 21, 2020 by Karol Krakowiak (see edit history) Link to comment Share on other sites More sharing options...
Miguel86 Posted May 21, 2020 Share Posted May 21, 2020 56 minutes ago, Karol Krakowiak said: <p> <label>Numer produktu: </label> <span class="editable">{$product.id_product}</span> </p> <p id="product_reference"{if empty($product->reference) || !$product->reference} style="display: none;"{/if}> <label>{l s='Reference:'} </label> <span class="editable" itemprop="sku"{if !empty($product->reference) && $product->reference} content="{$product->reference}"{/if}>{if !isset($groups)}{$product->reference|escape:'html':'UTF-8'}{/if}</span> </p> Like this? because it doesn't work. Product page is broken then. I this you should use: {$product->id} Best regards Link to comment Share on other sites More sharing options...
PrestaServicePro Posted May 21, 2020 Share Posted May 21, 2020 My mistake, yes change it to $product->id and should be work. Any further help, let me know. Link to comment Share on other sites More sharing options...
dimmtrov Posted September 22, 2023 Share Posted September 22, 2023 Could you please specify the location of the file as im not able to find in all my product files on 8.1.1 version ? 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