Jump to content

can not display brand logos in the footer


Recommended Posts

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...