Jump to content
PortCityMedical

[SOLVED] Change Reference to SKU

Recommended Posts

Hello,

 

I am trying to figure out it if it possible to change the "Reference" field to "SKU". The Reference field does exactly what I need to display a product number, but just as a matter of personal preference I would like it to say SKU. Is this possible?

 

Thanks

 

Byron

Share this post


Link to post
Share on other sites

Hi Byron,

To change that text in your Front Office, you will need to open your theme's product.tpl file and find the following code (around line 321):

 

<p id="product_reference" {if isset($groups) OR !$product->reference}style="display: none;"{/if}><label for="product_reference">{l s='Reference :'} </label><span class="editable">{$product->reference|escape:'htmlall':'UTF-8'}</span></p>

 

and replace it with

 

<p id="product_reference" {if isset($groups) OR !$product->reference}style="display: none;"{/if}><label for="product_reference">{l s='SKU :'} </label><span class="editable">{$product->reference|escape:'htmlall':'UTF-8'}</span></p>

 

To change it in the Back Office as well, open your admin/tabs/AdminProducts.php file, and around line 2221, find:

 

<td class="col-left">'.$this->l('Reference:').'</td>

 

and replace it with

 

<td class="col-left">'.$this->l('SKU:').'</td>

 

I hope this helps.

 

-Mike

Share this post


Link to post
Share on other sites

Hi Mike,

 

I completely forgot I started this thread until now. Thanks for the reply. This solution worked perfectly for me!

 

-Byron

Share this post


Link to post
Share on other sites

Hi Byron,

To change that text in your Front Office, you will need to open your theme's product.tpl file and find the following code (around line 321):

 

<p id="product_reference" {if isset($groups) OR !$product->reference}style="display: none;"{/if}><label for="product_reference">{l s='Reference :'} </label><span class="editable">{$product->reference|escape:'htmlall':'UTF-8'}</span></p>

 

and replace it with

 

<p id="product_reference" {if isset($groups) OR !$product->reference}style="display: none;"{/if}><label for="product_reference">{l s='SKU :'} </label><span class="editable">{$product->reference|escape:'htmlall':'UTF-8'}</span></p>

 

To change it in the Back Office as well, open your admin/tabs/AdminProducts.php file, and around line 2221, find:

 

<td class="col-left">'.$this->l('Reference:').'</td>

 

and replace it with

 

<td class="col-left">'.$this->l('SKU:').'</td>

 

I hope this helps.

 

-Mike

 

 

And for me, it did not help, I changed the word everywhere possible and nothing has changed.

What is wrong?

Share this post


Link to post
Share on other sites

how to fill sku with automate product sku number? any references?

 

I've used v.1.5.6 this file location may different.

admin => /admin/themes/default/template/controllers/products/informations.tpl

front-end, you may also edit shopping-cart.tpl

Edited by nusapenida (see edit history)

Share this post


Link to post
Share on other sites

Hi, I am using prestashop 1.7.2 and wanted to change product reference to SKU.

Someone please help with the instruction as i am not good in coding at all and it is really important for me to place SKU it there.

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More