rakeshlg90 Posted May 6, 2021 Share Posted May 6, 2021 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. Link to comment Share on other sites More sharing options...
Nishith Nesdiya Posted May 6, 2021 Share Posted May 6, 2021 (edited) Hi.. its depend of themes code if you default classic themes then you need change this two file templates/catalog/partials/miniatures/product.tpl templates/catalog/product.tpl Thank you Edited May 6, 2021 by Nishith (see edit history) Link to comment Share on other sites More sharing options...
rakeshlg90 Posted May 6, 2021 Author Share Posted May 6, 2021 I have attached my file of: templates/catalog/product.tpl Can you assist me where to add the code? Thank you product.tpl Link to comment Share on other sites More sharing options...
rakeshlg90 Posted May 10, 2021 Author Share Posted May 10, 2021 (edited) 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 May 10, 2021 by rakeshlg90 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now