Jump to content

[SOLVED] Add Fields to the Product Page on Front End - How? (EAN, Supplier Reference, Brand)


Recommended Posts

Hi

 

I want to had some of the product fields in the front end, the EAN, the Supplier Reference, Maybe the Brand and the Manufacturers webpage on the product page. Please check the image.

 

I've searched and all topics that i've found are about adding custom fields in the backoffice. Maybe i am not using the correct words to search.

 

I believe that has to be done "by hand", editing some files, but witch ones?

 

I am feeling a bit stupid, i believe this should be a subject easy to find.

 

Thanks in advance

post-400164-0-03875100-1384978970_thumb.png

Link to comment
Share on other sites

to display supplier reference just use {$product->supplier_reference} varible

 

in product.tpl right?

and do i have to put it in any specific line of the code?

 

I have done that but with {$product->ean13} And nothing happened 

 

EDIT: Sorry i did not saw your first post.

 

Nevertheless, i've done that and nothing happened...

 

am i missing something?

Edited by nspinheiro (see edit history)
Link to comment
Share on other sites

Hi Again.

 

So i've done it again.

 

In product.tpl under themes/mytheme i've added:

 

 var EAN13 = {$product->ean13}
 var supplier_reference = {$product->supplier_reference}

 

Forced Compilation

Disabled Cache

 

Reload the pages, nothing appears

 

Tried on diferent Explorer, nothing appears

 

Tried on diferent computner, nothing appears

 

Tried to change the place of the code in product.tpl (twice), nothing appears....

Link to comment
Share on other sites

Just to close the topic, i was able to do this finally, the problem was that (maybe a question of my theme) could not go "anywhere".

 

There we're some parts of the code that if i put it there, nothing happened (i dont know HTML, so that was hard for me) but after many attempts i found the correct place to insert the code.

Link to comment
Share on other sites

  • 1 month later...

Sorry guys, but i tried so many lines on the product.tpl and it still doesn't show on my product page.

 

What is the correct line to insert ? (i want it to appear under Reference)

 

This is what i want to add :

 

 

Brand = ??

Brand reference = {$product->supplier_reference}
EAN13 = {$product->ean13}

Thanks

Link to comment
Share on other sites

Do we need only to modify the product.tpl ?

 

Under this code :

 

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

 

I add this (in order to add supplier_reference) :

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

 

But nothing is show on the webpage

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