ccarlos.lima2 Posted February 13, 2017 Share Posted February 13, 2017 Can someone please tell me how to hide the reference number/code in the front office? I´m using prestashop 1.7.0.4 and the Classic Theme. Thanks in advance! Link to comment Share on other sites More sharing options...
w3bsolutions Posted February 16, 2017 Share Posted February 16, 2017 Edit /themes/classic/templates/catalog/_partials/product_details.tpl and comment lines 20-25: {if isset($product.reference_to_display)} <div class="product-reference"> <label class="label">{l s='Reference' d='Shop.Theme.Catalog'} </label> <span itemprop="sku">{$product.reference_to_display}</span> </div> {/if} so they are like this: {* if isset($product.reference_to_display)} <div class="product-reference"> <label class="label">{l s='Reference' d='Shop.Theme.Catalog'} </label> <span itemprop="sku">{$product.reference_to_display}</span> </div> {/if *} Cheers. 2 Link to comment Share on other sites More sharing options...
ccarlos.lima2 Posted February 16, 2017 Author Share Posted February 16, 2017 It worked. Thank you so much! ;-) Link to comment Share on other sites More sharing options...
Levent Posted February 22, 2017 Share Posted February 22, 2017 Yes it worked for a "Simple product" But, it not working on "Product with combinations" Any idea? Link to comment Share on other sites More sharing options...
ccarlos.lima2 Posted February 23, 2017 Author Share Posted February 23, 2017 Try to clean the cache in the backoffice and in your browser 1 Link to comment Share on other sites More sharing options...
w3bsolutions Posted February 23, 2017 Share Posted February 23, 2017 Yes it worked for a "Simple product" But, it not working on "Product with combinations" Any idea? Post link to site please. It does work on my end. Link to comment Share on other sites More sharing options...
Levent Posted February 24, 2017 Share Posted February 24, 2017 Try to clean the cache in the backoffice and in your browser Thank you. Resolved 1 Link to comment Share on other sites More sharing options...
Devreg Posted June 29, 2017 Share Posted June 29, 2017 Does anyone know how to hide the same reference number in version 1.6? Thanks a lot!! Link to comment Share on other sites More sharing options...
Scully Posted June 29, 2017 Share Posted June 29, 2017 (edited) Open product.tpl from your theme directory. If its a default theme, then you will find this at around line 159 and following: <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> Set begin comment {* before the first paragraph and end comment *} after closing paragraph. However, this only the part which displays product details on front page. The same reference might be used on the product comparison, cart, delivery slip, invoice and order details page. Kicking them out is mostly the same behavior. If the data is part of a table, then it could make sense to use the $id_product as reference instead. Edited June 29, 2017 by Scully (see edit history) 1 Link to comment Share on other sites More sharing options...
Devreg Posted July 3, 2017 Share Posted July 3, 2017 Thanks a lot! Then I know. Link to comment Share on other sites More sharing options...
Galliass Posted August 1, 2017 Share Posted August 1, 2017 Thank you. Worked for me on 1.6.1.15 Link to comment Share on other sites More sharing options...
tssaini987 Posted December 10, 2017 Share Posted December 10, 2017 Hi We have version 1.7.2 Can somebody help us to change the script in .tpl file as coding is different the given on this topic Thanks Link to comment Share on other sites More sharing options...
Zunun Posted November 9, 2018 Share Posted November 9, 2018 Hello all, noob here. Where do I find the lines to edit? Another unrelated question, I have a problem with shipping charges where the shopping cart shows "Free Shipping" even though I have set the price for shipping. I use Classic theme. Please help! Link to comment Share on other sites More sharing options...
Dan1 Posted August 2, 2019 Share Posted August 2, 2019 On 2/16/2017 at 4:38 AM, w3bsolutions said: Edit /themes/classic/templates/catalog/_partials/product_details.tpl and comment lines 20-25: {if isset($product.reference_to_display)} <div class="product-reference"> <label class="label">{l s='Reference' d='Shop.Theme.Catalog'} </label> <span itemprop="sku">{$product.reference_to_display}</span> </div> {/if} so they are like this: {* if isset($product.reference_to_display)} <div class="product-reference"> <label class="label">{l s='Reference' d='Shop.Theme.Catalog'} </label> <span itemprop="sku">{$product.reference_to_display}</span> </div> {/if *} Cheers. In PS 1.7.6 the code in this file is below. What should I comment out to remove the reference number? Thanks. {* if product have specific references, a table will be added to product details section *} {block name='product_specific_references'} {if isset($product.specific_references)} <section class="product-features"> <h3 class="h6">{l s='Specific References' d='Shop.Theme.Catalog'}</h3> <dl class="data-sheet"> {foreach from=$product.specific_references item=reference key=key} <dt class="name">{$key}</dt> <dd class="value">{$reference}</dd> {/foreach} </dl> </section> {/if} {/block} Link to comment Share on other sites More sharing options...
Dan1 Posted August 10, 2019 Share Posted August 10, 2019 (edited) In 1.7.6 file to edit is /themes/yourtheme/templates/catalog/product.tpl I commented out the whole section below lines 114 - 135 because I don't want the manufacturers logo either. Added a <br> under it so things don't look too tight on product page. {*{block name='product_reference'} {if isset($product_manufacturer->id)} <div class="product-manufacturer"> {if isset($manufacturer_image_url)} <a href="{$product_brand_url}"> <img src="{$manufacturer_image_url}" class="img img-thumbnail manufacturer-logo" /> </a> {else} <label class="label">{l s='Brand' d='Shop.Theme.Catalog'}</label> <span> <a href="{$product_brand_url}">{$product_manufacturer->name}</a> </span> {/if} </div> {/if} {if isset($product.reference_to_display)} <div class="product-reference"> <label class="label">{l s='Reference' d='Shop.Theme.Catalog'} </label> <span itemprop="sku">{$product.reference_to_display}</span> </div> {/if} {/block}*} <br> Edited August 10, 2019 by Dan1 (see edit history) Link to comment Share on other sites More sharing options...
Bruno Pais Posted March 21, 2020 Share Posted March 21, 2020 Hi, how are you? I want to add an update, actually if you want to hide the reference number on prestashop 1.7.6.3 you need to go to /var/www/html/site/themes/the theme that you have/templates if you have it/catalog/_partials Inside of these you need to comment with * * the code with whose name is products-details.tpl {* if isset($product.reference_to_display) && $product.reference_to_display neq ''} <div class="product-reference"> <label class="label">{l s='Reference' d='Shop.Theme.Catalog'} </label> <span itemprop="sku">{$product.reference_to_display}</span> </div> {/if *} {/block} you can ctrl + F to finde reference and there you have it Have a good day. 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