Liu Kang Posted July 27, 2011 Share Posted July 27, 2011 Hi, Does any body can help me to check if manufacture logo exist on block manufacture. I want to display manufacture that has logo or display a "no-logo" image. Thank you! Link to comment Share on other sites More sharing options...
shokinro Posted July 27, 2011 Share Posted July 27, 2011 by the default, it does not display logo. but you can add it by change the theme file YourSiteRoot/modules/blockmanufacturer/blockmanufacturer.tpl the logo image name is manufacture id plus size as following <img src="{$img_dir}m/{$manufacturer.id_manufacturer}-small.jpg"> Link to comment Share on other sites More sharing options...
Liu Kang Posted July 27, 2011 Author Share Posted July 27, 2011 Hi shokinro, This is my code, but it never goes to "else" {if '{$img_ps_dir}m/{$manufacturer.id_manufacturer}-small.jpg'} <img src="{$img_ps_dir}m/{$manufacturer.id_manufacturer}-small.jpg" alt="{$manufacturer.name|escape:'htmlall':'UTF-8'}" /> {else} <img src="{$module_dir}img/no-manufacture-logo.gif" alt="{$manufacturer.name|escape:'htmlall':'UTF-8'}" /> {/if} Do I wrong ? Link to comment Share on other sites More sharing options...
bellini13 Posted July 27, 2011 Share Posted July 27, 2011 try looking at this link http://speeves.erikin.com/2007/11/phpsmarty-checking-if-file-exists.html Link to comment Share on other sites More sharing options...
Liu Kang Posted July 28, 2011 Author Share Posted July 28, 2011 Hi, my code is {assign var='manufacturer_logo' value='{$img_ps_dir}m/{$manufacturer.id_manufacturer}-small.jpg'} {if (file_exists($manufacturer_logo))} ok {else} not ok {/if} But it always "not ok". I've tried many times. Does some body help me? Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts