hurray Posted January 18, 2011 Share Posted January 18, 2011 Instead of manufacturer name, I would like to display their logo in the manufacturer module. How can I do it?Thanks in advance. Link to comment Share on other sites More sharing options...
khamulete Posted January 18, 2011 Share Posted January 18, 2011 In /themes/[your theme]/manufacturer.tpl you can modify your manufacturer page.I'm trying to insert the manufacturer's logo there too. Here is how i'm writing it: {include file=$tpl_dir./errors.tpl} {include file=$tpl_dir./binding_top.tpl} [b][/b] {include file=$tpl_dir./binding_bottom.tpl} The thing is, {$manufacturer.image} is not working here (I checked and other variables like $manufacturer.name work just fine), so it is not showing the logo and is crashing the rest of the page's code so nothing further is being shown in the browser.A similar piece of code is used in manufacturer-list.tpl: but it is not working for me either, in manufacturer.tpl. Please, let me know if you can get this right.Any advice here? Link to comment Share on other sites More sharing options...
khamulete Posted January 19, 2011 Share Posted January 19, 2011 got it! I attached the code as it can be seen in my manufacturer.tpl file.within div.logo will be shown the manufacturer's logo and name. Now, just go to your theme's style.css file and make it look nice ;D I'm pending to add the error management code in case one given manufacturer does not have any logo or it is not found, to make it show a default image...right now, it would show the image's alt text (in this case, the manufacturer's name) if no logo is found.I hope you find this useful. 1 Link to comment Share on other sites More sharing options...
hurray Posted January 20, 2011 Author Share Posted January 20, 2011 I am not sure what you are talking about. All I want is to replace manufacturers' names with their logos in blockmanufacturer module. And I don't have any idea how to. Link to comment Share on other sites More sharing options...
khamulete Posted January 21, 2011 Share Posted January 21, 2011 ah! well, I guess I missunderstood you Try this module: maybe it can get it donehttp://www.freeprestashopmodules.com/2010/12/15/manufacturer-block-with-images/In order to delete the manufacturer's name, just go into the module's directory and erase the line where it writes the name. It should be in the .tpl file found in said directory. Link to comment Share on other sites More sharing options...
vineshkumar Posted February 2, 2011 Share Posted February 2, 2011 In case you want this: getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)}" title="{$manufacturer.name}">name|escape:'htmlall':'UTF-8'}" width="50" height="50" title="{$manufacturer->name|escape:'htmlall':'UTF-8'}" /> Link to comment Share on other sites More sharing options...
hurray Posted February 9, 2011 Author Share Posted February 9, 2011 Hi Vinesh,Thank you for stopping in to help. I tried your code and even though it did seem like it was heading in the right direction, for some reason, it printed some codes on the front end. I could see the manufacturer's image though.Here's the manufacturer.tpl, could you please tell me where I need to put your codes? <!-- Block manufacturers module --> {l s='Manufacturers' mod='blockmanufacturer'} {if $manufacturers} {if $text_list} {foreach from=$manufacturers item=manufacturer name=manufacturer_list} {if $smarty.foreach.manufacturer_list.iteration <= $text_list_nb} >getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)}" title="{l s='More about' mod='blockmanufacturer'} {$manufacturer.name}">{$manufacturer.name|escape:'htmlall':'UTF-8'} {/if} {/foreach} {/if} {if $form_list} <form action="{$smarty.server.SCRIPT_NAME}" method="get"> {l s='All manufacturers' mod='blockmanufacturer'} {foreach from=$manufacturers item=manufacturer} {$manufacturer.name|escape:'htmlall':'UTF-8'} {/foreach} </form> {/if} {else} {l s='No manufacturer' mod='blockmanufacturer'} {/if} <!-- /Block manufacturers module --> Link to comment Share on other sites More sharing options...
vineshkumar Posted February 10, 2011 Share Posted February 10, 2011 name|escape:'htmlall':'UTF-8'}" width="45" height="45" title="{$manufacturer->name|escape:'htmlall':'UTF-8'}" /> There was an unwanted ">" in between. Link to comment Share on other sites More sharing options...
hurray Posted February 10, 2011 Author Share Posted February 10, 2011 Hi Vinesh,Thanks for giving me the tips but your code still spits out codes in the front page.So I figured it out by myself.What I did was I replaced the code from line 10 getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)}" title="{l s='More about' mod='blockmanufacturer'} {$manufacturer.name}">{$manufacturer.name|escape:'htmlall':'UTF-8'} by getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)}" title="{l s='More about' mod='blockmanufacturer'} {$manufacturer.name}"> {$manufacturer.name|escape:'htmlall':'UTF-8'} Link to comment Share on other sites More sharing options...
hurray Posted February 24, 2011 Author Share Posted February 24, 2011 Hi,I am trying to do the same with my suppliers module. But I cannot figure out what would be in place of this:The above code was for manufacturer module and it worked fine. Now what would be the correspoding for supplier module?Does someone have an idea Link to comment Share on other sites More sharing options...
hurray Posted February 25, 2011 Author Share Posted February 25, 2011 Never mind, figured it out. it was $img_sup_dir Link to comment Share on other sites More sharing options...
bakte Posted March 1, 2011 Share Posted March 1, 2011 hello,do u guys know how to put the manufacturer block in a new page? (not in the home, but in a new page created at the root dir) ? Link to comment Share on other sites More sharing options...
TerryLBaker Posted March 10, 2011 Share Posted March 10, 2011 Handy, thanks for answering a question that I never got around to asking! Link to comment Share on other sites More sharing options...
S7 Media Ltd Posted June 14, 2011 Share Posted June 14, 2011 Hi Vinesh,Thanks for giving me the tips but your code still spits out codes in the front page. So I figured it out by myself. What I did was I replaced the code from line 10 getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)}" title="{l s='More about' mod='blockmanufacturer'} {$manufacturer.name}">{$manufacturer.name|escape:'htmlall':'UTF-8'} getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)}" title="{l s='More about' mod='blockmanufacturer'} {$manufacturer.name}"> {$manufacturer.name|escape:'htmlall':'UTF-8'} Link to comment Share on other sites More sharing options...
Maury Girard Posted July 17, 2011 Share Posted July 17, 2011 Hello everyoneI'm in version 1.4.3and I can not display these images in spite of the information published above anyone have a recent versionor if not the exact steps. Link to comment Share on other sites More sharing options...
andriesinfoserv Posted October 8, 2011 Share Posted October 8, 2011 Hello everyone I'm in version 1.4.3 and I can not display these images in spite of the information published above anyone have a recent version or if not the exact steps. you may want to double check. i just did it using hurray's posted info with latest version of ps Link to comment Share on other sites More sharing options...
komodosp Posted January 12, 2012 Share Posted January 12, 2012 I've just seen that the manufacturer's logos all seem to appear in the /img/m dir with the name of <Manufacturer ID>.jpg e.g. /img/m/162.jpg Can this be used reliably? Link to comment Share on other sites More sharing options...
Blulight Design Posted September 11, 2012 Share Posted September 11, 2012 Very reasonably priced module that displays manufacturer logos as well as the ability to randomize them is available here. Link to comment Share on other sites More sharing options...
HiPresta Posted December 4, 2012 Share Posted December 4, 2012 in your blockmanufacturer.tpl change this line: "<li class="{if $smarty.foreach.manufacturer_list.last}last_item{elseif $smarty.foreach.manufacturer_list.first}first_item{else}item{/if}"><a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)}" title="{l s='More about' mod='blockmanufacturer'} {$manufacturer.name}">{$manufacturer.name|escape:'htmlall':'UTF-8'}</a></li>" to "<a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)}" title="{l s='More about' mod='blockmanufacturer'} {$manufacturer.name}"> <img src="{$img_manu_dir}{$manufacturer.id_manufacturer}.jpg" /> </a>" Link to comment Share on other sites More sharing options...
Antakarana Posted December 5, 2012 Share Posted December 5, 2012 in your blockmanufacturer.tpl change this line: "<li class="{if $smarty.foreach.manufacturer_list.last}last_item{elseif $smarty.foreach.manufacturer_list.first}first_item{else}item{/if}"><a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)}" title="{l s='More about' mod='blockmanufacturer'} {$manufacturer.name}">{$manufacturer.name|escape:'htmlall':'UTF-8'}</a></li>" to "<a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)}" title="{l s='More about' mod='blockmanufacturer'} {$manufacturer.name}"> <img src="{$img_manu_dir}{$manufacturer.id_manufacturer}.jpg" /> </a>" Does it work for any Prestashop version? Thanks Link to comment Share on other sites More sharing options...
HiPresta Posted December 5, 2012 Share Posted December 5, 2012 I tested only for 1.5.2, works fine Link to comment Share on other sites More sharing options...
30ml Posted December 7, 2012 Share Posted December 7, 2012 I have scratch my head to put image insted of manufacture link . Here I have very nice solution to display manufacture logo <a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)}" title="{l s='More about' mod='manufacturerlogos'} {$manufacturer.name}"> <img src="{$img_manu_dir}{$manufacturer.id_manufacturer}.jpg" /></a></li> Link to comment Share on other sites More sharing options...
lebeeg Posted January 4, 2013 Share Posted January 4, 2013 Works for me on 1.5.2.. but with a little adjustment: <img src="{$img_manu_dir}{$manufacturer.id_manufacturer}.jpg" /> changed to <img src="{$img_manu_dir}{$manufacturer.id_manufacturer}-medium_default.jpg" /> Link to comment Share on other sites More sharing options...
adelkahani Posted April 22, 2013 Share Posted April 22, 2013 (edited) hi everone i change the .tpl code.but nothing happend.can u please send me the complete code for showing logo instead of manufacture name?also the exact file path for insert this code? tnx in advance Edited April 22, 2013 by adelkahani (see edit history) Link to comment Share on other sites More sharing options...
euroservicii Posted August 28, 2013 Share Posted August 28, 2013 Works fine thank you :* Link to comment Share on other sites More sharing options...
murdok Posted February 10, 2014 Share Posted February 10, 2014 Works for me on 1.5.2.. but with a little adjustment: <img src="{$img_manu_dir}{$manufacturer.id_manufacturer}.jpg" /> changed to <img src="{$img_manu_dir}{$manufacturer.id_manufacturer}-medium_default.jpg" /> I try to add this code in manufacturer.tpl (I want the manufacturer logo on this page) but it's doesn't work. (prestashop 1.5.6.1) Do you have some ideas? thanks for the help. Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 10, 2014 Share Posted February 10, 2014 Hi. In manufacturer.tpl the $manufacturer is an object, not an array. You need to use -> Regards.Robin.The CartExpert Team Link to comment Share on other sites More sharing options...
murdok Posted February 10, 2014 Share Posted February 10, 2014 Hi. In manufacturer.tpl the $manufacturer is an object, not an array. You need to use -> Regards. Robin. The CartExpert Team Like this manufacturer->id_manufacturer ? Link to comment Share on other sites More sharing options...
CartExpert.net Posted February 10, 2014 Share Posted February 10, 2014 $manufacturer->id Regards.Robin.The CartExpert Team Link to comment Share on other sites More sharing options...
murdok Posted February 17, 2014 Share Posted February 17, 2014 $manufacturer->id Regards. Robin. The CartExpert Team Thanks!! 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