Jump to content

How to add Manufacturer/Brand name in ALL Product Images?


Recommended Posts

Hello Team! 

I want to display the product MANUFACTURER / BRAND name in All the pages where the Product appears.

I managed to find a solution for the following page: 
catalog/partials/miniatures/product.tpl

by adding the following code after the product name:

{block name='product_brand'}
        {if Manufacturer::getNameById($product.id_manufacturer) !== ''}
            <div class="product-brand text-muted"> <a href="{$product.url}">{Manufacturer::getNameById($product.id_manufacturer)}</a></div>{/if}
    {/block}

{block name='product_name'}
  <h3 class="h3 product-title" itemprop="name"><a href="{$product.url}">{$product.name|truncate:30:'...'}</a></h3>
{/block} 

However this code only works for the Index/Main page and i would like to do the same for all the pages where the products appear:

1) inside Manufacturers page
2) inside Category page
3) inside the block of viewed products
4) inside the block of products in the same category

I would appreciate if anyone could help please. 

Im using prestashop version: 1.7.6.8

Thank you.

main page.jpg

other pages.jpg

Link to comment
Share on other sites

The theme developer provided me the solution to add the following code in catalog/product.tpl :

<div class="pro-manufacture">
<a href="{$link->getManufacturerLink($product.id_manufacturer)|escape:'html':'UTF-8'}" title="{Manufacturer::getNameById($product.id_manufacturer|escape:'html':'UTF-8')}">{Manufacturer::getNameById($product.id_manufacturer|escape:'html':'UTF-8')}</a>
</div>

 

Topic SOLVED. Thank you :)

Edited by rakeshlg90 (see edit history)
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...