phil3001 Posted August 27, 2011 Share Posted August 27, 2011 Hello, I want to put my brand logos in the footer but unfortunately nothing is displayed, except for 'no brand' Can you help me on this subject because I understand nothing. thank you. http://www.eurodeal4u.Fr {if !$content_only} <!-- Block logos marques --> <div class="block_content" id=afficher_marques"> <h4 class="titre_block_design"><a href="{$base_dir}manufacturer.php" title="{l s='Manufacturers' mod='blockmanufacturer'}">NOS MARQUES</a></h4> {if $manufacturers} {if $text_list} {foreach from=$manufacturers item=manufacturer name=manufacturer_list} {if $smarty.foreach.manufacturer_list.iteration <= $text_list_nb} <a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)}" title="{l s='More about' mod='blockmanufacturertr'} {$manufacturer.name}"><img src="{$img_manu_dir}{$manufacturer.id_manufacturer}-medium.jpg" alt="{$product_manufacturer->name}" /></a> {/if} {/foreach} {/if} {else} <p>Aucune marque</p> {/if} </div> </div> </div> </div> <!-- Footer --> <div id="footer2"> <div class="page">{$HOOK_FOOTER}{$HOOK_RIGHT_COLUMN} </div> </div> {/if} </body> </html> Link to comment Share on other sites More sharing options...
Prescol Posted August 27, 2011 Share Posted August 27, 2011 What file have you posted? Obviusly smarty doesn´t get any info of the brands Link to comment Share on other sites More sharing options...
phil3001 Posted August 27, 2011 Author Share Posted August 27, 2011 hello, it's footer.tpl of my theme how i can solve the problem ? thanks Link to comment Share on other sites More sharing options...
Prescol Posted August 27, 2011 Share Posted August 27, 2011 Ok, smarty needs to get the value of strings from some php function. For ex.: Module homefeatured.php search products in one category and assigns to a smarty array and then returns the homefeatured.tpl. You should duplicate and modify brands module to allow the hookFooter position and then assign footer position. Link to comment Share on other sites More sharing options...
phil3001 Posted August 27, 2011 Author Share Posted August 27, 2011 thank you for the answer can you give me an example because I do not understand too thanks for your help Link to comment Share on other sites More sharing options...
phil3001 Posted August 28, 2011 Author Share Posted August 28, 2011 hello can you help me please ? Link to comment Share on other sites More sharing options...
Prescol Posted August 31, 2011 Share Posted August 31, 2011 Edit blockmanufacturer.php where it says: function hookLeftColumn($params) { global $smarty, $link; $smarty->assign(array( 'manufacturers' => Manufacturer::getManufacturers(), 'link' => $link, 'text_list' => Configuration::get('MANUFACTURER_DISPLAY_TEXT'), 'text_list_nb' => Configuration::get('MANUFACTURER_DISPLAY_TEXT_NB'), 'form_list' => Configuration::get('MANUFACTURER_DISPLAY_FORM'), 'display_link_manufacturer' => Configuration::get('PS_DISPLAY_SUPPLIERS'), )); return $this->display(__FILE__, 'blockmanufacturer.tpl'); } function hookRightColumn($params) { return $this->hookLeftColumn($params); } } Add: function hookFooter($params) { global $smarty, $link; $smarty->assign(array( 'manufacturers' => Manufacturer::getManufacturers(), 'link' => $link, 'text_list' => Configuration::get('MANUFACTURER_DISPLAY_TEXT'), 'text_list_nb' => Configuration::get('MANUFACTURER_DISPLAY_TEXT_NB'), 'form_list' => Configuration::get('MANUFACTURER_DISPLAY_FORM'), 'display_link_manufacturer' => Configuration::get('PS_DISPLAY_SUPPLIERS'), )); return $this->display(__FILE__, 'blockmanufacturer_footer.tpl'); } You´ll get this: function hookLeftColumn($params) { global $smarty, $link; $smarty->assign(array( 'manufacturers' => Manufacturer::getManufacturers(), 'link' => $link, 'text_list' => Configuration::get('MANUFACTURER_DISPLAY_TEXT'), 'text_list_nb' => Configuration::get('MANUFACTURER_DISPLAY_TEXT_NB'), 'form_list' => Configuration::get('MANUFACTURER_DISPLAY_FORM'), 'display_link_manufacturer' => Configuration::get('PS_DISPLAY_SUPPLIERS'), )); return $this->display(__FILE__, 'blockmanufacturer.tpl'); } function hookRightColumn($params) { return $this->hookLeftColumn($params); } //add this function hookFooter($params) { global $smarty, $link; $smarty->assign(array( 'manufacturers' => Manufacturer::getManufacturers(), 'link' => $link, 'text_list' => Configuration::get('MANUFACTURER_DISPLAY_TEXT'), 'text_list_nb' => Configuration::get('MANUFACTURER_DISPLAY_TEXT_NB'), 'form_list' => Configuration::get('MANUFACTURER_DISPLAY_FORM'), 'display_link_manufacturer' => Configuration::get('PS_DISPLAY_SUPPLIERS'), )); return $this->display(__FILE__, 'blockmanufacturer_footer.tpl'); } Then download the file attached ,extract and move it to {prestahsop}/modules/blockmanufacturer/ After this go to modules in BO and then 'Positions' . Add a the module to your footer. Hope it works blockmanufacturer_footer.zip 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