Gudron11 Posted August 22, 2019 Posted August 22, 2019 Good day! How can I add a logo of a manufacturer on a product page in TB 1.1.0 ?
0 zen Posted August 22, 2019 Posted August 22, 2019 Hello, you can add something like this in your product.tpl file in theme folder : {if $product_manufacturer->id} <img src="{$img_manu_dir}{$product_manufacturer->id}-medium_default.jpg" class="logo_manufacturer img-responsive" title="{$product_manufacturer->name}" alt="{$product_manufacturer->name}" /> {/if} 1
0 Gudron11 Posted August 30, 2019 Author Posted August 30, 2019 Thank ypu! One note - for Niara theme there are other names of image files. For me worket the following {if $product_manufacturer->id} <img src="{$img_manu_dir}{$product_manufacturer->id}.jpg" class="logo_manufacturer img-responsive" title="{$product_manufacturer->name}" alt="{$product_manufacturer->name}" /> {/if}
0 yaniv14 Posted August 30, 2019 Posted August 30, 2019 Its better to check if variable exists before looking for id. {if isset($product_manufacturer) && $product_manufacturer->id}
0 veganline Posted June 1, 2020 Posted June 1, 2020 (edited) I was on another thread just now that links to this. My version has the bits of code layed-out in a list because I don't know how it should work and have to read closely. I also changed the Alt and Title links to show the Meta_description, so that it shows on mousover. I didn't work out how to show the logo on the same line as the manufacturer name, but it works well enough to use. {if $product->id_manufacturer > 0} <p itemprop="brand" itemscope itemtype="https://schema.org/Brand"> <b>{l s='Manufacturer:'}</b> <a itemprop="url" href="{$link->getManufacturerLink($product->id_manufacturer)}" title="{$product_manufacturer->meta_description}"> <span itemprop="name">{$product->manufacturer_name}</span> <img width="40" height="30" {*or it could be set from css for this class*} src="{$img_manu_dir}{$product_manufacturer->id}.jpg" class="logo_manufacturer img-responsive" title="{$product_manufacturer->meta_description}" alt="{$product_manufacturer->meta_description}" /> </a> </p> {/if} Edited June 1, 2020 by veganline 2
Question
Gudron11
Good day!
How can I add a logo of a manufacturer on a product page in TB 1.1.0 ?
4 answers to this question
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