Jump to content

[solved] Display Manufacturer and supplier reference on Product page


Recommended Posts

I would like to display the manufacturer and supplier_reference under the product reference on the product page.

I have found the location of the of the product reference in the product.tpl

 

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

 

 

 

I don't know what code to insert to obtain the results I want.

 

 

I am using ver.1.4.5.1

 

Thanks for any help.

Share this post


Link to post
Share on other sites

I have succeeded in displaying the manufacturer and supplier_reference under the product reference on the product page.

 

in product.tpl

 

 

<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 id="manufacturer_name" {if isset($groups) OR !$product->manufacturer_name}style="display: none;"{/if}><label for="manufacturer_name">{l s='Manufacturer :'} </label><span class="editable">{$product->manufacturer_name|escape:'htmlall':'UTF-8'}</span><br>

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

post-25118-0-11271300-1321799581_thumb.jpg

(supplier reference changed to model number in translations)

 

Now I would like supplier reference to be in the search.

 

Never Happy :(

  • Like 2

Share this post


Link to post
Share on other sites

try this code...

 

<p id="supplier_reference" {if !$product->supplier_reference}style="display: none;"{/if}><label for="manufacturer_name">{l s='Supplier Reference :'} </label><span class="editable">{$product->supplier_reference|escape:'htmlall':'UTF-8'}</span><br>

Share this post


Link to post
Share on other sites

Works great, thank you.

 

 

I have succeeded in displaying the manufacturer and supplier_reference under the product reference on the product page.

 

in product.tpl

 

 

<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 id="manufacturer_name" {if isset($groups) OR !$product->manufacturer_name}style="display: none;"{/if}><label for="manufacturer_name">{l s='Manufacturer :'} </label><span class="editable">{$product->manufacturer_name|escape:'htmlall':'UTF-8'}</span><br>

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

post-25118-0-11271300-1321799581_thumb.jpg

(supplier reference changed to model number in translations)

 

Now I would like supplier reference to be in the search.

 

Never Happy :(

Share this post


Link to post
Share on other sites
  • 1 month later...
  • 2 weeks later...

hi, it seems i can't use {$product->supplier_reference|escape:'htmlall':'UTF-8'} anymore with 1.4.6.2

into product.tpl...category.tpl....product-list.tpl

What's wrong? Some smarty changes? thanks

Share this post


Link to post
Share on other sites
  • 2 weeks later...

when I do not use "Combination", the code works well and can display "manufacturer name" on product page, but when I use "combination", Manufacturer name disappeared. How can I fix it?

 

Thanks,

Share this post


Link to post
Share on other sites
  • 2 months later...
  • 3 weeks later...

Maybe it will help anybody. But only this worked for me:

 

<p class="product_name">{$product->name|escape:'htmlall':'UTF-8'}</p><br/> 
<span id="product_supplier">Supplier: {$product->supplier_name|escape:'htmlall':'UTF-8'}</span><br/>
<span id="product_manufacturer"><a href="{$link->getmanufacturerLink($product->id_manufacturer, $product->link_rewrite)}" title="{l s='more...'}">{$product->manufacturer_name|escape:'htmlall':'UTF-8'}</a></span>

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
  • 2 months later...
  • 3 weeks later...

Salve dear community, I am using PS1.4.8.2,

please help me display the manufacturer in the product page.

I have tried the above provided codes, none works for me :(

Thank you for your advice

 

Add following line to products.tpl

 

 

<p id="manufacturer_name" {if !$product->manufacturer_name}style="display: none;"{/if}><label for="manufacturer_name">{l s='Manufacturer :'} </label> <span class="editable">{$product->manufacturer_name|escape:'htmlall':'UTF-8'}</span></p>

 

This will also show manufacturer when using combinations.

  • Like 1

Share this post


Link to post
Share on other sites
  • 2 months later...
  • 2 months later...

hello...

 

If i whant to ad a picture for the manufacturer in the product.tpl how can i do that...

 

I have try this :

<img src="{$img_manu_dir}{$product.id_manufacturer}-small.jpg" alt="{$product.manufacturer_name}" title="{$product.manufacturer_name}" />

 

It whant work...

 

Please help me...

Share this post


Link to post
Share on other sites
  • 3 weeks later...

@spc

 

I'm working with PS 1.5.3 and this worked fine for me:

 

<div id="headline_manufacturer_logo">
  <img src="{$img_manu_dir}{$product->id_manufacturer}.jpg" alt="{$product->manufacturer_name}" title="{$product->manufacturer_name}" />
</div>

 

Hope I could help!

Pinback

post-431255-0-37952800-1360879405_thumb.png

Share this post


Link to post
Share on other sites
  • 4 weeks later...

@ mani313,

 

Can you give me code for display the block of 'other products from this manufacturer' on product page?

 

You mean the code for block-manufacturer (s. attached File)?

Greez Pinback

post-431255-0-44940500-1363099657_thumb.png

Share this post


Link to post
Share on other sites
  • 8 months later...

Added supplier_reference to search in classes/Product.php

 

 

Sorry can you share how you did it? I need the same thing, looked around everywhere, but it's impossible to find something about it even deep googling. So The only thing i've found is your post.

 

How to add supplier_reference to search? I still use PS 1.3.7.

 

Thank You

Edited by ZioFranky (see edit history)

Share this post


Link to post
Share on other sites
  • 3 months later...

@ mani313,

 

 

 

You mean the code for block-manufacturer (s. attached File)?

Greez Pinback

 

 

Yea. I need this. I want supplier name to be search. Can you share?

Share this post


Link to post
Share on other sites
  • 7 months later...
  • 3 years later...

I would like to display the manufacturer/supplier/seller name under the product reference on the product page.

How to do that ? i'm using PrestaShop version 1.6.1.10

This is my code on product.tpl

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

 

Edited by Ramadan37 (see edit history)

Share this post


Link to post
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...

Important Information

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