Jump to content

Hide reference number in front office prestashop 1. 7


ccarlos.lima2

Recommended Posts

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.

  • Like 2
Link to comment
Share on other sites

  • 4 months later...

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 by Scully (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...
  • 4 months later...
  • 10 months later...

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

  • 8 months later...
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

  • 2 weeks later...

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 by Dan1 (see edit history)
Link to comment
Share on other sites

  • 7 months later...

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 :D

Have a good day.

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...