Jump to content
ndiaga

[Manufacturer Logo] Adding Manufacturer Logo in Product List Page

Recommended Posts

This module add the product Manufacturer's  Logo in product List page.

 

post-818747-0-15163200-1466708980_thumb.jpgpost-818747-0-76726600-1466708982_thumb.jpg

 

NB: To finish the module installation copy the manufacturerlogo.tpl file to your theme's product_list.tpl file before the
image tag. Or in any place you wish.

If you are not confortable in editing templates just use the pro version :   Manufacturer name and logo on Product List page 

 

manufacturerlogo.zip

 

This module  has now a pro version :  

Manufacturer name and logo on Product List page 

 

Edited by ndiaga (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

Hello,

 

Thank you for the module ! And sharing !

 

This is not good for performances

			!$this->registerHook('header') ||			
			!$this->registerHook('DisplayILabsManufacturerLogo')

This also:

public function hookDisplayILabsManufacturerLogo($params){ 


$id_lang=(int)Tools::getValue('id_lang');
$id_manufacturer=(int)Tools::getValue('id_manufacturer');
$this->smarty->assign(array( 
'logos' =>(int)Configuration::get('manufacturerlogo_name'),
'manu_dir'=>_PS_MANU_IMG_DIR_,
'manu_link'=>'index.php?id_manufacturer='.$id_manufacturer.'&controller=manufacturer&id_lang='.$id_lang
)); 


return $this->display(__FILE__, 'manufacturerlogo.tpl');
}

Alt and Title are hard coded ( hard coded ? )

 

 

Have a nice day

 

3pom

Edited by okom3pom (see edit history)

Share this post


Link to post
Share on other sites

Ok, thanks for your notice.

<!--module manufacturerLogo--->				
				{*hook h="DisplayILabsManufacturerLogo" product=$products type=product*}
				{assign var=logos  value=(int)Configuration::get('manufacturerlogo_name')}
				{if isset($logos) && $logos==1}
                {Manufacturer::getNameById($product.id_manufacturer)}
                {/if}				
				<a href="{$base_dir}index.php?id_manufacturer={$product.id_manufacturer}&controller=manufacturer&id_lang={Tools::getValue('id_lang')}">
                <img src="{$base_dir}img/m/{$product.id_manufacturer}-small_default.jpg" alt="Fashion Manufacturer" title="Fashion Manufacturer">
                </a>				
<!--end module--->

the hard coded alt and title is corrected.

<!--module manufacturerLogo--->				
				{*hook h="DisplayILabsManufacturerLogo" product=$products type=product*}
				{assign var=logos  value=(int)Configuration::get('manufacturerlogo_name')}
				{if isset($logos) && $logos==1}
                {Manufacturer::getNameById($product.id_manufacturer)}
                {/if}				
				<a href="{$base_dir}index.php?id_manufacturer={$product.id_manufacturer}&controller=manufacturer&id_lang={Tools::getValue('id_lang')}">
                <img src="{$base_dir}img/m/{$product.id_manufacturer}-small_default.jpg" alt="{Manufacturer::getNameById($product.id_manufacturer)}" title="{Manufacturer::getNameById($product.id_manufacturer)}">
                </a>				
<!--end module--->

And for the performance since we don't use any css from this module and the custom hook these two functions also can be commented.

//!$this->registerHook('header') ||			
//!$this->registerHook('DisplayILabsManufacturerLogo')

The DisplayILabsManufacturerLogo  was for LeftColumn...  

Edited by ndiaga (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

Hello

i have tested your module on version 1.6.1.4, but the module don't work, i don't see any logo brand in product list. Can you help me ?

Thanks

Share this post


Link to post
Share on other sites

Hi, did you copy this code in product-list.tpl?

The module needs some technical skills to be be fully installed.

<!--module manufacturerLogo--->				
				{*hook h="DisplayILabsManufacturerLogo" product=$products type=product*}
				{assign var=logos  value=(int)Configuration::get('manufacturerlogo_name')}
				{if isset($logos) && $logos==1}
                {Manufacturer::getNameById($product.id_manufacturer)}
                {/if}				
				<a href="{$base_dir}index.php?id_manufacturer={$product.id_manufacturer}&controller=manufacturer&id_lang={Tools::getValue('id_lang')}">
                <img src="{$base_dir}img/m/{$product.id_manufacturer}-small_default.jpg" alt="{Manufacturer::getNameById($product.id_manufacturer)}" title="{Manufacturer::getNameById($product.id_manufacturer)}">
                </a>				
<!--end module--->
Edited by ndiaga (see edit history)

Share this post


Link to post
Share on other sites

Hello

Thank you for the reply

I have  paste the code in the product list tpl, but no logo displayed. i have only pictures in the home  and in product list but this display nothing. here is my link.

Thank you for your help

Share this post


Link to post
Share on other sites

Where is your link?

Did you add logos to your manufacturers already?

Share this post


Link to post
Share on other sites

Sorry

Www.sneakerhit.com

 

Yes we have logo for manufactured brand

Thanks

Share this post


Link to post
Share on other sites

ok, I see you didn't put the code in the right place, id_manufacturer is missing.

<a href="http://www.sneakerhit.com/index.php?id_manufacturer=&controller=manufacturer&id_lang="> 
<img src="http://www.sneakerhit.com/img/m/-small_default.jpg" alt="" title=""> 
</a>

//the id_manufacturer should be here
//src="http://www.sneakerhit.com/img/m/id_manufacturer-small_default.jpg"

Try to put it inside the foreach loop.

Edited by ndiaga (see edit history)

Share this post


Link to post
Share on other sites

Good evening

I'm really sorry, but I did not understand what I should do. Can you help me. Thank you

Share this post


Link to post
Share on other sites

I added id_manufacturer in the url img src  but it does not work. Thanks

Share this post


Link to post
Share on other sites

Hi

I have installed and configuring your module perfectly, thank you very much for your help and for this module.

I have installed your module in another site but the pictures displayed are not the good pictures. Can you help me.

Here is the link. Thanks

www.shoemaniaq.com

Share this post


Link to post
Share on other sites

Hi,

Follow the same process as the first website you fixed.

Go to img/m  and select any image name small_default, medium_default etc and choose the right image type. 

Share this post


Link to post
Share on other sites

Hi

Thank you very much for the support. Your module are beautiful and working fine. 

Thanks ++++++

Share this post


Link to post
Share on other sites

For those who send me a private message, please  if you have any question regarding this module  you can post it directly here so that other people

will befinit from it and I will have to same question 100 times :)  !

Edited by ndiaga (see edit history)

Share this post


Link to post
Share on other sites

Hi, does it work with 1.6.1.9? Not for me :/

Yes, it works for 1.6 and higher but not for 1.7

Share this post


Link to post
Share on other sites

You are the best  :wub:

Thank You for the module  :)

 

Work prestashop 1.6.1.10 :D

You' re welcom.  

Enjoy !

Share this post


Link to post
Share on other sites

Don´t work

Did you follow the installation guide in the module's admin page?

There is a code that needs to be placed in product- list.tpl file.

 

Here it's :

<!--module manufacturerLogo--->				
				{*hook h="DisplayILabsManufacturerLogo" product=$products type=product*}
				{assign var=logos  value=(int)Configuration::get('manufacturerlogo_name')}
				{if isset($logos) && $logos==1}
                {Manufacturer::getNameById($product.id_manufacturer)}
                {/if}				
				<a href="{$base_dir}index.php?id_manufacturer={$product.id_manufacturer}&controller=manufacturer&id_lang={Tools::getValue('id_lang')}">
                <img src="{$base_dir}img/m/{$product.id_manufacturer}-small_default.jpg" alt="{Manufacturer::getNameById($product.id_manufacturer)}" title="{Manufacturer::getNameById($product.id_manufacturer)}">
                </a>				
<!--end module--->

Copy it inside the loop.

Edited by ndiaga (see edit history)

Share this post


Link to post
Share on other sites

Yes

yes what?

 

Did you past that code as described?

Do you have images for all Manufactures?

Share this post


Link to post
Share on other sites

Hello, 

 

first of all, thank you for showing and sharing this module. However, I'm still facing some problems, because it is not working yet. I followed the installation instructions and paste manufacturerlogo.tpl code to product-list.tpl here is how it looks 

{include file="$tpl_dir./layout/setting.tpl"}
{if isset($products) && $products}
	{*define numbers of product per line in other page for desktop*}
        {if isset($class)}
            {*only display grid mode when include from other module*}
            {assign var="LISTING_GRIG_MODE" value="grid" scope="global"}
            {assign var='nbItemsPerLine' value=$LISTING_PRODUCT_COLUMN_MODULE}
            {if $LISTING_PRODUCT_COLUMN_MODULE=="5"}
                {assign var="colValue" value="col-xs-{12/$LISTING_PRODUCT_MOBILE} col-sm-{12/$LISTING_PRODUCT_TABLET} col-md-2-4 col-sp-12" scope="global"}
            {else}
                {assign var="colValue" value="col-sp-12 col-xs-{12/$LISTING_PRODUCT_MOBILE} col-sm-{12/$LISTING_PRODUCT_TABLET} col-md-{12/$LISTING_PRODUCT_COLUMN_MODULE}" scope="global"}
            {/if}
        {else}
            {assign var='nbItemsPerLine' value=$LISTING_PRODUCT_COLUMN}
	{/if}
        {assign var='nbItemsPerLineTablet' value=$LISTING_PRODUCT_TABLET}
        {assign var='nbItemsPerLineMobile' value=$LISTING_PRODUCT_MOBILE}
	{*define numbers of product per line in other page for tablet*}
	{assign var='nbLi' value=$products|@count}
	{math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines}
	{math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet}
	
     <!--module manufacturerLogo--->				
				{*hook h="DisplayILabsManufacturerLogo" product=$products type=product*}
				{assign var=logos  value=(int)Configuration::get('manufacturerlogo_name')}
				{if isset($logos) && $logos==1}
                {Manufacturer::getNameById($product.id_manufacturer)}
                {/if}				
				<a href="{$base_dir}index.php?id_manufacturer={$product.id_manufacturer}&controller=manufacturer&id_lang={Tools::getValue('id_lang')}">
                <img src="{$base_dir}img/m/{$product.id_manufacturer}-small_default.jpg" alt="{Manufacturer::getNameById($product.id_manufacturer)}" title="{Manufacturer::getNameById($product.id_manufacturer)}">
                </a>				
<!--end module---> 
    
    <!-- Products list -->
	<div {if isset($id) && $id} id="{$id}"{/if} class="product_list {$LISTING_GRIG_MODE} row {if isset($class) && $class} {$class}{/if}">
	{foreach from=$products item=product name=products}
    
		{math equation="(total%perLine)" total=$smarty.foreach.products.total perLine=$nbItemsPerLine assign=totModulo}
		{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineTablet assign=totModuloTablet}
		{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineMobile assign=totModuloMobile}
		{if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if}
		{if $totModuloTablet == 0}{assign var='totModuloTablet' value=$nbItemsPerLineTablet}{/if}
		{if $totModuloMobile == 0}{assign var='totModuloMobile' value=$nbItemsPerLineMobile}{/if}	
		<div class="ajax_block_product col-sp-12 {$colValue}{if $smarty.foreach.products.iteration%$nbItemsPerLine == 0} last-in-line
		{elseif $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first-in-line{/if}
		{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModulo)} last-line{/if}
		{if $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 0} last-item-of-tablet-line
		{elseif $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 1} first-item-of-tablet-line{/if}
		{if $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 0} last-item-of-mobile-line
		{elseif $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 1} first-item-of-mobile-line{/if}
		{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModuloMobile)} last-mobile-line{/if}">
			{include file="$tpl_dir./sub/product-item/product-item.tpl" callFromModule=isset($class)}
		</div>

	{/foreach}
	</div>
    
 
{addJsDefL name=min_item}{l s='Please select at least one product' js=1}{/addJsDefL}
{addJsDefL name=max_item}{l s='You cannot add more than %d product(s) to the product comparison' sprintf=$comparator_max_item js=1}{/addJsDefL}
{addJsDef comparator_max_item=$comparator_max_item}
{addJsDef comparedProductsIds=$compared_products}
{/if}

Can you check it is it in the right place? Also, my PS installation (1.6.1.2) directory localhost/presta (i'm testing it on sandbox). Maybe I should edit <a href and <img src paths therefore? 

 

thank you. 

Share this post


Link to post
Share on other sites

Hello, 

 

first of all, thank you for showing and sharing this module. However, I'm still facing some problems, because it is not working yet. I followed the installation instructions and paste manufacturerlogo.tpl code to product-list.tpl here is how it looks 

{include file="$tpl_dir./layout/setting.tpl"}
{if isset($products) && $products}
	{*define numbers of product per line in other page for desktop*}
        {if isset($class)}
            {*only display grid mode when include from other module*}
            {assign var="LISTING_GRIG_MODE" value="grid" scope="global"}
            {assign var='nbItemsPerLine' value=$LISTING_PRODUCT_COLUMN_MODULE}
            {if $LISTING_PRODUCT_COLUMN_MODULE=="5"}
                {assign var="colValue" value="col-xs-{12/$LISTING_PRODUCT_MOBILE} col-sm-{12/$LISTING_PRODUCT_TABLET} col-md-2-4 col-sp-12" scope="global"}
            {else}
                {assign var="colValue" value="col-sp-12 col-xs-{12/$LISTING_PRODUCT_MOBILE} col-sm-{12/$LISTING_PRODUCT_TABLET} col-md-{12/$LISTING_PRODUCT_COLUMN_MODULE}" scope="global"}
            {/if}
        {else}
            {assign var='nbItemsPerLine' value=$LISTING_PRODUCT_COLUMN}
	{/if}
        {assign var='nbItemsPerLineTablet' value=$LISTING_PRODUCT_TABLET}
        {assign var='nbItemsPerLineMobile' value=$LISTING_PRODUCT_MOBILE}
	{*define numbers of product per line in other page for tablet*}
	{assign var='nbLi' value=$products|@count}
	{math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines}
	{math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet}
	
     <!--module manufacturerLogo--->				
				{*hook h="DisplayILabsManufacturerLogo" product=$products type=product*}
				{assign var=logos  value=(int)Configuration::get('manufacturerlogo_name')}
				{if isset($logos) && $logos==1}
                {Manufacturer::getNameById($product.id_manufacturer)}
                {/if}				
				<a href="{$base_dir}index.php?id_manufacturer={$product.id_manufacturer}&controller=manufacturer&id_lang={Tools::getValue('id_lang')}">
                <img src="{$base_dir}img/m/{$product.id_manufacturer}-small_default.jpg" alt="{Manufacturer::getNameById($product.id_manufacturer)}" title="{Manufacturer::getNameById($product.id_manufacturer)}">
                </a>				
<!--end module---> 
    
    <!-- Products list -->
	<div {if isset($id) && $id} id="{$id}"{/if} class="product_list {$LISTING_GRIG_MODE} row {if isset($class) && $class} {$class}{/if}">
	{foreach from=$products item=product name=products}
    
		{math equation="(total%perLine)" total=$smarty.foreach.products.total perLine=$nbItemsPerLine assign=totModulo}
		{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineTablet assign=totModuloTablet}
		{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineMobile assign=totModuloMobile}
		{if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if}
		{if $totModuloTablet == 0}{assign var='totModuloTablet' value=$nbItemsPerLineTablet}{/if}
		{if $totModuloMobile == 0}{assign var='totModuloMobile' value=$nbItemsPerLineMobile}{/if}	
		<div class="ajax_block_product col-sp-12 {$colValue}{if $smarty.foreach.products.iteration%$nbItemsPerLine == 0} last-in-line
		{elseif $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first-in-line{/if}
		{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModulo)} last-line{/if}
		{if $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 0} last-item-of-tablet-line
		{elseif $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 1} first-item-of-tablet-line{/if}
		{if $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 0} last-item-of-mobile-line
		{elseif $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 1} first-item-of-mobile-line{/if}
		{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModuloMobile)} last-mobile-line{/if}">
			{include file="$tpl_dir./sub/product-item/product-item.tpl" callFromModule=isset($class)}
		</div>

	{/foreach}
	</div>
    
 
{addJsDefL name=min_item}{l s='Please select at least one product' js=1}{/addJsDefL}
{addJsDefL name=max_item}{l s='You cannot add more than %d product(s) to the product comparison' sprintf=$comparator_max_item js=1}{/addJsDefL}
{addJsDef comparator_max_item=$comparator_max_item}
{addJsDef comparedProductsIds=$compared_products}
{/if}

Can you check it is it in the right place? Also, my PS installation (1.6.1.2) directory localhost/presta (i'm testing it on sandbox). Maybe I should edit <a href and <img src paths therefore? 

 

thank you. 

No, you didn't put it in the right place, it should be inside foreach loop .

 

Try this code : 

{include file="$tpl_dir./layout/setting.tpl"}
{if isset($products) && $products}
	{*define numbers of product per line in other page for desktop*}
        {if isset($class)}
            {*only display grid mode when include from other module*}
            {assign var="LISTING_GRIG_MODE" value="grid" scope="global"}
            {assign var='nbItemsPerLine' value=$LISTING_PRODUCT_COLUMN_MODULE}
            {if $LISTING_PRODUCT_COLUMN_MODULE=="5"}
                {assign var="colValue" value="col-xs-{12/$LISTING_PRODUCT_MOBILE} col-sm-{12/$LISTING_PRODUCT_TABLET} col-md-2-4 col-sp-12" scope="global"}
            {else}
                {assign var="colValue" value="col-sp-12 col-xs-{12/$LISTING_PRODUCT_MOBILE} col-sm-{12/$LISTING_PRODUCT_TABLET} col-md-{12/$LISTING_PRODUCT_COLUMN_MODULE}" scope="global"}
            {/if}
        {else}
            {assign var='nbItemsPerLine' value=$LISTING_PRODUCT_COLUMN}
	{/if}
        {assign var='nbItemsPerLineTablet' value=$LISTING_PRODUCT_TABLET}
        {assign var='nbItemsPerLineMobile' value=$LISTING_PRODUCT_MOBILE}
	{*define numbers of product per line in other page for tablet*}
	{assign var='nbLi' value=$products|@count}
	{math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines}
	{math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet}
	
     
    
    <!-- Products list -->
	<div {if isset($id) && $id} id="{$id}"{/if} class="product_list {$LISTING_GRIG_MODE} row {if isset($class) && $class} {$class}{/if}">
	{foreach from=$products item=product name=products}
	
	<!--module manufacturerLogo--->				
				{*hook h="DisplayILabsManufacturerLogo" product=$products type=product*}
				{assign var=logos  value=(int)Configuration::get('manufacturerlogo_name')}
				{if isset($logos) && $logos==1}
                {Manufacturer::getNameById($product.id_manufacturer)}
                {/if}				
				<a href="{$base_dir}index.php?id_manufacturer={$product.id_manufacturer}&controller=manufacturer&id_lang={Tools::getValue('id_lang')}">
                <img src="{$base_dir}img/m/{$product.id_manufacturer}-small_default.jpg" alt="{Manufacturer::getNameById($product.id_manufacturer)}" title="{Manufacturer::getNameById($product.id_manufacturer)}">
                </a>				
<!--end module---> 
	
	
    
		{math equation="(total%perLine)" total=$smarty.foreach.products.total perLine=$nbItemsPerLine assign=totModulo}
		{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineTablet assign=totModuloTablet}
		{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineMobile assign=totModuloMobile}
		{if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if}
		{if $totModuloTablet == 0}{assign var='totModuloTablet' value=$nbItemsPerLineTablet}{/if}
		{if $totModuloMobile == 0}{assign var='totModuloMobile' value=$nbItemsPerLineMobile}{/if}	
		<div class="ajax_block_product col-sp-12 {$colValue}{if $smarty.foreach.products.iteration%$nbItemsPerLine == 0} last-in-line
		{elseif $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first-in-line{/if}
		{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModulo)} last-line{/if}
		{if $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 0} last-item-of-tablet-line
		{elseif $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 1} first-item-of-tablet-line{/if}
		{if $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 0} last-item-of-mobile-line
		{elseif $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 1} first-item-of-mobile-line{/if}
		{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModuloMobile)} last-mobile-line{/if}">
			{include file="$tpl_dir./sub/product-item/product-item.tpl" callFromModule=isset($class)}
		</div>

	{/foreach}
	</div>
    
 
{addJsDefL name=min_item}{l s='Please select at least one product' js=1}{/addJsDefL}
{addJsDefL name=max_item}{l s='You cannot add more than %d product(s) to the product comparison' sprintf=$comparator_max_item js=1}{/addJsDefL}
{addJsDef comparator_max_item=$comparator_max_item}
{addJsDef comparedProductsIds=$compared_products}
{/if}

Share this post


Link to post
Share on other sites

Thank you for response! I've tried your code so then I'm getting such view http://dviraciuzygiai.lt/view.jpg

 

Do you know what else might be wrong? 

 

Thank you!

 

Ok, I've tried to add <p></p> to code so it is something colser to what i'm looking for http://dviraciuzygiai.lt/view1.jpg . However, then every listed product is on different paragraph. Maybe I'm wrong with syntax, sorry my programming knowledge is very low, so would appreciate some help here!  

{include file="$tpl_dir./layout/setting.tpl"}
{if isset($products) && $products}
	{*define numbers of product per line in other page for desktop*}
        {if isset($class)}
            {*only display grid mode when include from other module*}
            {assign var="LISTING_GRIG_MODE" value="grid" scope="global"}
            {assign var='nbItemsPerLine' value=$LISTING_PRODUCT_COLUMN_MODULE}
            {if $LISTING_PRODUCT_COLUMN_MODULE=="5"}
                {assign var="colValue" value="col-xs-{12/$LISTING_PRODUCT_MOBILE} col-sm-{12/$LISTING_PRODUCT_TABLET} col-md-2-4 col-sp-12" scope="global"}
            {else}
                {assign var="colValue" value="col-sp-12 col-xs-{12/$LISTING_PRODUCT_MOBILE} col-sm-{12/$LISTING_PRODUCT_TABLET} col-md-{12/$LISTING_PRODUCT_COLUMN_MODULE}" scope="global"}
            {/if}
        {else}
            {assign var='nbItemsPerLine' value=$LISTING_PRODUCT_COLUMN}
	{/if}
        {assign var='nbItemsPerLineTablet' value=$LISTING_PRODUCT_TABLET}
        {assign var='nbItemsPerLineMobile' value=$LISTING_PRODUCT_MOBILE}
	{*define numbers of product per line in other page for tablet*}
	{assign var='nbLi' value=$products|@count}
	{math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines}
	{math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet}
	
     
    
    <!-- Products list -->
	<div {if isset($id) && $id} id="{$id}"{/if} class="product_list {$LISTING_GRIG_MODE} row {if isset($class) && $class} {$class}{/if}">
	{foreach from=$products item=product name=products}
	<p>
	<!--module manufacturerLogo--->				
				{*hook h="DisplayILabsManufacturerLogo" product=$products type=product*}
				{assign var=logos  value=(int)Configuration::get('manufacturerlogo_name')}
				{if isset($logos) && $logos==1}
                {Manufacturer::getNameById($product.id_manufacturer)}
                {/if}				
				<a href="{$base_dir}index.php?id_manufacturer={$product.id_manufacturer}&controller=manufacturer&id_lang={Tools::getValue('id_lang')}">
                <img src="{$base_dir}img/m/{$product.id_manufacturer}-small_default.jpg" alt="{Manufacturer::getNameById($product.id_manufacturer)}" title="{Manufacturer::getNameById($product.id_manufacturer)}">
                </a>				
<!--end module---> </p>
	
	
    
		{math equation="(total%perLine)" total=$smarty.foreach.products.total perLine=$nbItemsPerLine assign=totModulo}
		{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineTablet assign=totModuloTablet}
		{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineMobile assign=totModuloMobile}
		{if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if}
		{if $totModuloTablet == 0}{assign var='totModuloTablet' value=$nbItemsPerLineTablet}{/if}
		{if $totModuloMobile == 0}{assign var='totModuloMobile' value=$nbItemsPerLineMobile}{/if}	
		<div class="ajax_block_product col-sp-12 {$colValue}{if $smarty.foreach.products.iteration%$nbItemsPerLine == 0} last-in-line
		{elseif $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first-in-line{/if}
		{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModulo)} last-line{/if}
		{if $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 0} last-item-of-tablet-line
		{elseif $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 1} first-item-of-tablet-line{/if}
		{if $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 0} last-item-of-mobile-line
		{elseif $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 1} first-item-of-mobile-line{/if}
		{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModuloMobile)} last-mobile-line{/if}">
			{include file="$tpl_dir./sub/product-item/product-item.tpl" callFromModule=isset($class)}
		</div>

	{/foreach}
	</div>
    
 
{addJsDefL name=min_item}{l s='Please select at least one product' js=1}{/addJsDefL}
{addJsDefL name=max_item}{l s='You cannot add more than %d product(s) to the product comparison' sprintf=$comparator_max_item js=1}{/addJsDefL}
{addJsDef comparator_max_item=$comparator_max_item}
{addJsDef comparedProductsIds=$compared_products}
{/if}

Share this post


Link to post
Share on other sites

 

Ok, I've tried to add <p></p> to code so it is something colser to what i'm looking for http://dviraciuzygiai.lt/view1.jpg . However, then every listed product is on different paragraph. Maybe I'm wrong with syntax, sorry my programming knowledge is very low, so would appreciate some help here!  

{include file="$tpl_dir./layout/setting.tpl"}
{if isset($products) && $products}
	{*define numbers of product per line in other page for desktop*}
        {if isset($class)}
            {*only display grid mode when include from other module*}
            {assign var="LISTING_GRIG_MODE" value="grid" scope="global"}
            {assign var='nbItemsPerLine' value=$LISTING_PRODUCT_COLUMN_MODULE}
            {if $LISTING_PRODUCT_COLUMN_MODULE=="5"}
                {assign var="colValue" value="col-xs-{12/$LISTING_PRODUCT_MOBILE} col-sm-{12/$LISTING_PRODUCT_TABLET} col-md-2-4 col-sp-12" scope="global"}
            {else}
                {assign var="colValue" value="col-sp-12 col-xs-{12/$LISTING_PRODUCT_MOBILE} col-sm-{12/$LISTING_PRODUCT_TABLET} col-md-{12/$LISTING_PRODUCT_COLUMN_MODULE}" scope="global"}
            {/if}
        {else}
            {assign var='nbItemsPerLine' value=$LISTING_PRODUCT_COLUMN}
	{/if}
        {assign var='nbItemsPerLineTablet' value=$LISTING_PRODUCT_TABLET}
        {assign var='nbItemsPerLineMobile' value=$LISTING_PRODUCT_MOBILE}
	{*define numbers of product per line in other page for tablet*}
	{assign var='nbLi' value=$products|@count}
	{math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines}
	{math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet}
	
     
    
    <!-- Products list -->
	<div {if isset($id) && $id} id="{$id}"{/if} class="product_list {$LISTING_GRIG_MODE} row {if isset($class) && $class} {$class}{/if}">
	{foreach from=$products item=product name=products}
	<p>
	<!--module manufacturerLogo--->				
				{*hook h="DisplayILabsManufacturerLogo" product=$products type=product*}
				{assign var=logos  value=(int)Configuration::get('manufacturerlogo_name')}
				{if isset($logos) && $logos==1}
                {Manufacturer::getNameById($product.id_manufacturer)}
                {/if}				
				<a href="{$base_dir}index.php?id_manufacturer={$product.id_manufacturer}&controller=manufacturer&id_lang={Tools::getValue('id_lang')}">
                <img src="{$base_dir}img/m/{$product.id_manufacturer}-small_default.jpg" alt="{Manufacturer::getNameById($product.id_manufacturer)}" title="{Manufacturer::getNameById($product.id_manufacturer)}">
                </a>				
<!--end module---> </p>
	
	
    
		{math equation="(total%perLine)" total=$smarty.foreach.products.total perLine=$nbItemsPerLine assign=totModulo}
		{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineTablet assign=totModuloTablet}
		{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineMobile assign=totModuloMobile}
		{if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if}
		{if $totModuloTablet == 0}{assign var='totModuloTablet' value=$nbItemsPerLineTablet}{/if}
		{if $totModuloMobile == 0}{assign var='totModuloMobile' value=$nbItemsPerLineMobile}{/if}	
		<div class="ajax_block_product col-sp-12 {$colValue}{if $smarty.foreach.products.iteration%$nbItemsPerLine == 0} last-in-line
		{elseif $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first-in-line{/if}
		{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModulo)} last-line{/if}
		{if $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 0} last-item-of-tablet-line
		{elseif $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 1} first-item-of-tablet-line{/if}
		{if $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 0} last-item-of-mobile-line
		{elseif $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 1} first-item-of-mobile-line{/if}
		{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModuloMobile)} last-mobile-line{/if}">
			{include file="$tpl_dir./sub/product-item/product-item.tpl" callFromModule=isset($class)}
		</div>

	{/foreach}
	</div>
    
 
{addJsDefL name=min_item}{l s='Please select at least one product' js=1}{/addJsDefL}
{addJsDefL name=max_item}{l s='You cannot add more than %d product(s) to the product comparison' sprintf=$comparator_max_item js=1}{/addJsDefL}
{addJsDef comparator_max_item=$comparator_max_item}
{addJsDef comparedProductsIds=$compared_products}
{/if}

 

I think you should the code inside this file :

{include file="$tpl_dir./sub/product-item/product-item.tpl" callFromModule=isset($class)}

the product-item/product-item.tpl   file.

Share this post


Link to post
Share on other sites

Thanks, any ideas where should I put it exactly ? 

{*
	************************
		Creat by leo themes
	*************************
*}
{if !isset($callFromModule) || $callFromModule==0}
{include file="$tpl_dir./layout/setting.tpl"}
{/if}
<div class="product-container product-block" itemscope itemtype="https://schema.org/Product">
	<div class="left-block">
		{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
			{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
				{if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction}
					{if $product.specific_prices.reduction_type == 'percentage'}
						<span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span>
					{/if}
				{/if}
			{/if}
		{/if}
       	
		<div class="product-image-container image ImageWrapper">
		   <div class="leo-more-info" data-idproduct="{$product.id_product}"></div>
			<a class="product_img_link"	href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url">
				<img class="replace-2x img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html':'UTF-8'}" alt="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" title="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} itemprop="image" />
				<span class="product-additional" data-idproduct="{$product.id_product}"></span>
			</a>
			<div class="Buttons StyleC">
				{if isset($quick_view) && $quick_view}
					<a class="quick-view btn btn-inverse" href="{$product.link|escape:'html':'UTF-8'}" data-link="{$product.link|escape:'html':'UTF-8'}" title="{l s='Quick view'}" >
						<i class="fa fa-expand"></i>
					</a>
				{/if}
			</div>
			<div class="p-label">
				{if isset($product.new) && $product.new == 1}				
					<span class="label-new label-info label">{l s='New'}</span>				
				{/if}
				{if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
					<span class="label-sale label-warning label">{l s='Sale!'}</span>
				{/if}
			</div>
		</div>
		{if isset($product.is_virtual) && !$product.is_virtual}{hook h="displayProductDeliveryTime" product=$product}{/if}
		{hook h="displayProductPriceBlock" product=$product type="weight"}
	</div>
	<div class="right-block">
		<div class="product-meta">
			<h5 itemprop="name" class="name">
				{if isset($product.pack_quantity) && $product.pack_quantity}{$product.pack_quantity|intval|cat:' x '}{/if}
				<a class="product-name" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url" >
					{$product.name|truncate:45:'...'|escape:'html':'UTF-8'}
				</a>
			</h5>
			
			<p class="product-desc" itemprop="description">
				{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}
			</p>
			{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
				<div class="content_price">
					{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
						{hook h="displayProductPriceBlock" product=$product type='before_price'}
						{if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
							{hook h="displayProductPriceBlock" product=$product type="old_price"}
							<span class="old-price product-price">
								{displayWtPrice p=$product.price_without_reduction}
							</span>
							{hook h="displayProductPriceBlock" id_product=$product.id_product type="old_price"}
						{/if}
						<span class="price product-price">
							{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
						</span>
						
						{hook h="displayProductPriceBlock" product=$product type="price"}
						{hook h="displayProductPriceBlock" product=$product type="unit_price"}
						{hook h="displayProductPriceBlock" product=$product type='after_price'}
					{/if}
				</div>
			{/if}
			{if !isset($moduleCalling) || $moduleCalling != "productcategory"}
			{hook h='displayProductListReviews' product=$product}
			{/if}
			
			{if isset($product.color_list) && $ENABLE_COLOR}
				<div class="color-list-container">{$product.color_list} </div>
			{/if}
			<div class="product-flags">
				{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
					{if isset($product.online_only) && $product.online_only}
						<span class="online_only label label-warning">{l s='Online only'}</span>
					{/if}
				{/if}
				{if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
					{elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
						<span class="discount label label-danger">{l s='Reduced price!'}</span>
					{/if}
			</div>
		

			{if (!$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
				{if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}
					<span class="availability">
						{if ($product.allow_oosp || $product.quantity > 0)}
							<span class="{if $product.quantity <= 0 && isset($product.allow_oosp) && !$product.allow_oosp} label-danger{elseif $product.quantity <= 0} label-warning{else} label-success{/if}">
								{if $product.quantity <= 0}{if $product.allow_oosp}{if isset($product.available_later) && $product.available_later}{$product.available_later}{else}{l s='In Stock'}{/if}{else}{l s='Out of stock'}{/if}{else}{if isset($product.available_now) && $product.available_now}{$product.available_now}{else}{l s='In Stock'}{/if}{/if}
							</span>
						{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}
							<span class="available-dif">
								<span class="label label-warning">{l s='Available with different options'}</span>
							</span>
						{else}
							<span class="out-of-stock">
							<span class="label label-danger">{l s='Out of stock'}</span>
							</span>
						{/if}
					</span>
				{/if}
			{/if}
		
			{if $page_name !='product'}
				<div class="functional-buttons clearfix">				
						{if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.customizable != 2 && !$PS_CATALOG_MODE}
							{if (!isset($product.customization_required) || !$product.customization_required) && ($product.allow_oosp || $product.quantity > 0)}
								{capture}add=1&id_product={$product.id_product|intval}{if isset($product.id_product_attribute) && $product.id_product_attribute}&ipa={$product.id_product_attribute|intval}{/if}{if isset($static_token)}&token={$static_token}{/if}{/capture}
								<a class="cart button ajax_add_to_cart_button btn" href="{$link->getPageLink('cart', true, NULL, $smarty.capture.default, false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product-attribute="{$product.id_product_attribute|intval}" data-id-product="{$product.id_product|intval}" data-minimal_quantity="{if isset($product.product_attribute_minimal_quantity) && $product.product_attribute_minimal_quantity >= 1}{$product.product_attribute_minimal_quantity|intval}{else}{$product.minimal_quantity|intval}{/if}">
										<i class="fa fa-plus-circle"></i>
										<span>{l s='Add to cart'}</span>
									</a>
							
							{else}
								<div class="cart btn btn-outline disabled" title="{l s='Out of stock'}">
									<i class="fa fa-plus-circle"></i>
									<span>{l s='Out of stock'}</span>
								</div>
							{/if}
						{/if}
						
						{if $ENABLE_WISHLIST}				
							{hook h='displayProductListFunctionalButtons' product=$product}				
						{/if}
						
						{if isset($comparator_max_item) && $comparator_max_item}				
							<a class="add_to_compare compare  btn btn-outline" href="{$product.link|escape:'html':'UTF-8'}" data-id-product="{$product.id_product}" title="{l s='Add to compare'}" >
								<i class="fa fa-retweet"></i>
								<span>{l s=' Add to compare'}</span>
							</a>										
						{/if}
                         
					
				</div>
			{/if}
		</div>
	</div>
</div>
<!-- .product-container> -->


Share this post


Link to post
Share on other sites

 

Thanks, any ideas where should I put it exactly ? 

{*
	************************
		Creat by leo themes
	*************************
*}
{if !isset($callFromModule) || $callFromModule==0}
{include file="$tpl_dir./layout/setting.tpl"}
{/if}
<div class="product-container product-block" itemscope itemtype="https://schema.org/Product">
	<div class="left-block">
		{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
			{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
				{if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction}
					{if $product.specific_prices.reduction_type == 'percentage'}
						<span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span>
					{/if}
				{/if}
			{/if}
		{/if}
       	
		<div class="product-image-container image ImageWrapper">
		   <div class="leo-more-info" data-idproduct="{$product.id_product}"></div>
			<a class="product_img_link"	href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url">
				<img class="replace-2x img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html':'UTF-8'}" alt="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" title="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} itemprop="image" />
				<span class="product-additional" data-idproduct="{$product.id_product}"></span>
			</a>
			<div class="Buttons StyleC">
				{if isset($quick_view) && $quick_view}
					<a class="quick-view btn btn-inverse" href="{$product.link|escape:'html':'UTF-8'}" data-link="{$product.link|escape:'html':'UTF-8'}" title="{l s='Quick view'}" >
						<i class="fa fa-expand"></i>
					</a>
				{/if}
			</div>
			<div class="p-label">
				{if isset($product.new) && $product.new == 1}				
					<span class="label-new label-info label">{l s='New'}</span>				
				{/if}
				{if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
					<span class="label-sale label-warning label">{l s='Sale!'}</span>
				{/if}
			</div>
		</div>
		{if isset($product.is_virtual) && !$product.is_virtual}{hook h="displayProductDeliveryTime" product=$product}{/if}
		{hook h="displayProductPriceBlock" product=$product type="weight"}
	</div>
	<div class="right-block">
		<div class="product-meta">
			<h5 itemprop="name" class="name">
				{if isset($product.pack_quantity) && $product.pack_quantity}{$product.pack_quantity|intval|cat:' x '}{/if}
				<a class="product-name" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url" >
					{$product.name|truncate:45:'...'|escape:'html':'UTF-8'}
				</a>
			</h5>
			
			<p class="product-desc" itemprop="description">
				{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}
			</p>
			{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
				<div class="content_price">
					{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
						{hook h="displayProductPriceBlock" product=$product type='before_price'}
						{if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
							{hook h="displayProductPriceBlock" product=$product type="old_price"}
							<span class="old-price product-price">
								{displayWtPrice p=$product.price_without_reduction}
							</span>
							{hook h="displayProductPriceBlock" id_product=$product.id_product type="old_price"}
						{/if}
						<span class="price product-price">
							{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
						</span>
						
						{hook h="displayProductPriceBlock" product=$product type="price"}
						{hook h="displayProductPriceBlock" product=$product type="unit_price"}
						{hook h="displayProductPriceBlock" product=$product type='after_price'}
					{/if}
				</div>
			{/if}
			{if !isset($moduleCalling) || $moduleCalling != "productcategory"}
			{hook h='displayProductListReviews' product=$product}
			{/if}
			
			{if isset($product.color_list) && $ENABLE_COLOR}
				<div class="color-list-container">{$product.color_list} </div>
			{/if}
			<div class="product-flags">
				{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
					{if isset($product.online_only) && $product.online_only}
						<span class="online_only label label-warning">{l s='Online only'}</span>
					{/if}
				{/if}
				{if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
					{elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
						<span class="discount label label-danger">{l s='Reduced price!'}</span>
					{/if}
			</div>
		

			{if (!$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
				{if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}
					<span class="availability">
						{if ($product.allow_oosp || $product.quantity > 0)}
							<span class="{if $product.quantity <= 0 && isset($product.allow_oosp) && !$product.allow_oosp} label-danger{elseif $product.quantity <= 0} label-warning{else} label-success{/if}">
								{if $product.quantity <= 0}{if $product.allow_oosp}{if isset($product.available_later) && $product.available_later}{$product.available_later}{else}{l s='In Stock'}{/if}{else}{l s='Out of stock'}{/if}{else}{if isset($product.available_now) && $product.available_now}{$product.available_now}{else}{l s='In Stock'}{/if}{/if}
							</span>
						{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}
							<span class="available-dif">
								<span class="label label-warning">{l s='Available with different options'}</span>
							</span>
						{else}
							<span class="out-of-stock">
							<span class="label label-danger">{l s='Out of stock'}</span>
							</span>
						{/if}
					</span>
				{/if}
			{/if}
		
			{if $page_name !='product'}
				<div class="functional-buttons clearfix">				
						{if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.customizable != 2 && !$PS_CATALOG_MODE}
							{if (!isset($product.customization_required) || !$product.customization_required) && ($product.allow_oosp || $product.quantity > 0)}
								{capture}add=1&id_product={$product.id_product|intval}{if isset($product.id_product_attribute) && $product.id_product_attribute}&ipa={$product.id_product_attribute|intval}{/if}{if isset($static_token)}&token={$static_token}{/if}{/capture}
								<a class="cart button ajax_add_to_cart_button btn" href="{$link->getPageLink('cart', true, NULL, $smarty.capture.default, false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product-attribute="{$product.id_product_attribute|intval}" data-id-product="{$product.id_product|intval}" data-minimal_quantity="{if isset($product.product_attribute_minimal_quantity) && $product.product_attribute_minimal_quantity >= 1}{$product.product_attribute_minimal_quantity|intval}{else}{$product.minimal_quantity|intval}{/if}">
										<i class="fa fa-plus-circle"></i>
										<span>{l s='Add to cart'}</span>
									</a>
							
							{else}
								<div class="cart btn btn-outline disabled" title="{l s='Out of stock'}">
									<i class="fa fa-plus-circle"></i>
									<span>{l s='Out of stock'}</span>
								</div>
							{/if}
						{/if}
						
						{if $ENABLE_WISHLIST}				
							{hook h='displayProductListFunctionalButtons' product=$product}				
						{/if}
						
						{if isset($comparator_max_item) && $comparator_max_item}				
							<a class="add_to_compare compare  btn btn-outline" href="{$product.link|escape:'html':'UTF-8'}" data-id-product="{$product.id_product}" title="{l s='Add to compare'}" >
								<i class="fa fa-retweet"></i>
								<span>{l s=' Add to compare'}</span>
							</a>										
						{/if}
                         
					
				</div>
			{/if}
		</div>
	</div>
</div>
<!-- .product-container> -->


Put it inside this div:

<div class="product-image-container image ImageWrapper">

Share this post


Link to post
Share on other sites

sorry, I've tried to do so but it breakes the page structure totally (only txt and images shown, no visuals). I don't know what to do....  

Share this post


Link to post
Share on other sites

sorry, I've tried to do so but it breakes the page structure totally (only txt and images shown, no visuals). I don't know what to do....  

But you have the manufacturer's logo  showing?

 

You need just to past it in the right place. 

 

Of course this module requires some advanced skills to install it right.

Share this post


Link to post
Share on other sites

Hello, 

the mdoule works great, but i have a question, i would like add this module before name of product, in the product page. 

how i can do?

need to modify the .js file for this ?

thank you in advance

Share this post


Link to post
Share on other sites

Hello, 

the mdoule works great, but i have a question, i would like add this module before name of product, in the product page. 

how i can do?

need to modify the .js file for this ?

thank you in advance

Hi, just edit the product.tpl file if you are in product details page.

Share this post


Link to post
Share on other sites

Hi, manufactured logos is visible but is shifted

 

 

 

M0okl2.jpg

{*
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <contact@prestashop.com>
*  @copyright  2007-2015 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}



{if isset($products) && $products}
{if !isset($product_style)}
{$product_style = Configuration::get('PTS_CP_PRODUCT_STYLE')}
{/if}
{*define numbers of product per line in other page for desktop*}

{if Configuration::get('PTS_CP_PRODUCTS_ITEMROW')}
{assign var='nbItemsPerLine' value=Configuration::get('PTS_CP_PRODUCTS_ITEMROW')}
{assign var='nbItemsPerLineTablet' value=Configuration::get('PTS_CP_PRODUCTS_ITEMROW')}
{else}
{assign var='nbItemsPerLine' value=3}
{assign var='nbItemsPerLineTablet' value=3}
{/if}


{assign var='nbItemsPerLineMobile' value=2}

{*define numbers of product per line in other page for tablet*}
{assign var='nbLi' value=$products|@count}
{math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines}
{math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet}

{math equation="nbLi/nbItemsPerLine" nbLi=12 nbItemsPerLine=$nbItemsPerLine assign=colLap}
{math equation="nbLi/nbItemsPerLine" nbLi=12 nbItemsPerLine=$nbItemsPerLineTablet assign=colTablet}
{math equation="nbLi/nbItemsPerLine" nbLi=12 nbItemsPerLine=$nbItemsPerLineMobile assign=colMobile}
<!-- Products list -->

<script type="text/javascript">
var colLap = {$colLap};
var colTablet = {$colTablet};
var colMobile = {$colMobile};
</script>
{if $product.unit_price_ratio > 0}
   {math equation="pprice / punit_price"  pprice=$product.price  punit_price=$product.unit_price_ratio assign=unit_price}
   <span class="unit_price">{convertPrice price=$unit_price} / {$product.unity|escape:'html':'UTF-8'}</span>
{/if}

<ul{if isset($id) && $id} id="{$id}"{/if} class="list-unstyled row product_list products-block grid clearfix {if isset($class) && $class} {$class}{/if} {if isset($product_style) && !empty($product_style)}{$product_style}{else} style1{/if}">
{foreach from=$products item=product name=products}


<!--module manufacturerLogo--->
{*hook h="DisplayILabsManufacturerLogo" product=$products type=product*}
{assign var=logos  value=(int)Configuration::get('manufacturerlogo_name')}
{if isset($logos) && $logos==1}
                {Manufacturer::getNameById($product.id_manufacturer)}
                {/if}
<a href="{$base_dir}index.php?id_manufacturer={$product.id_manufacturer}&controller=manufacturer&id_lang={Tools::getValue('id_lang')}">
                <img src="{$base_dir}img/m/{$product.id_manufacturer}-small_default.jpg" alt="{Manufacturer::getNameById($product.id_manufacturer)}" title="{Manufacturer::getNameById($product.id_manufacturer)}">
                </a>
<!--end module--->
{math equation="(total%perLine)" total=$smarty.foreach.products.total perLine=$nbItemsPerLine assign=totModulo}
{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineTablet assign=totModuloTablet}
{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineMobile assign=totModuloMobile}
{if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if}
{if $totModuloTablet == 0}{assign var='totModuloTablet' value=$nbItemsPerLineTablet}{/if}
{if $totModuloMobile == 0}{assign var='totModuloMobile' value=$nbItemsPerLineMobile}{/if}
<li class="owl-wrapper col-xs-cus-12 col-xs-{$colMobile} col-sm-{$colTablet} col-md-{$colLap} col-lg-{$colLap}{if $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first-in-line{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 1} first-item-of-tablet-line{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 1} first-item-of-mobile-line{/if}" data-col-lg="{$colLap}" data-col-md="{$colLap}" data-col-sm="{$colTablet}" data-col-xs="{$colMobile}">
<div class="item clearfix">
{if isset($product_style) && !empty($product_style)}
{include file="$tpl_dir./sub/product/{$product_style}.tpl" product=$product class=''}
{else}
{include file="$tpl_dir./sub/product/style1.tpl" product=$product class=''}
{/if}
</div>
</li>
{/foreach}
</ul>
{addJsDefL name=min_item}{l s='Please select at least one product' js=1}{/addJsDefL}
{addJsDefL name=max_item}{l s='You cannot add more than %d product(s) to the product comparison' sprintf=$comparator_max_item js=1}{/addJsDefL}
{addJsDef comparator_max_item=$comparator_max_item}
{addJsDef comparedProductsIds=$compared_products}
{/if}
Edited by esermeric (see edit history)

Share this post


Link to post
Share on other sites

 

Hi, manufactured logos is visible but is shifted

 

 

 

M0okl2.jpg

{*
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <contact@prestashop.com>
*  @copyright  2007-2015 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}



{if isset($products) && $products}
{if !isset($product_style)}
{$product_style = Configuration::get('PTS_CP_PRODUCT_STYLE')}
{/if}
{*define numbers of product per line in other page for desktop*}

{if Configuration::get('PTS_CP_PRODUCTS_ITEMROW')}
{assign var='nbItemsPerLine' value=Configuration::get('PTS_CP_PRODUCTS_ITEMROW')}
{assign var='nbItemsPerLineTablet' value=Configuration::get('PTS_CP_PRODUCTS_ITEMROW')}
{else}
{assign var='nbItemsPerLine' value=3}
{assign var='nbItemsPerLineTablet' value=3}
{/if}


{assign var='nbItemsPerLineMobile' value=2}

{*define numbers of product per line in other page for tablet*}
{assign var='nbLi' value=$products|@count}
{math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines}
{math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet}

{math equation="nbLi/nbItemsPerLine" nbLi=12 nbItemsPerLine=$nbItemsPerLine assign=colLap}
{math equation="nbLi/nbItemsPerLine" nbLi=12 nbItemsPerLine=$nbItemsPerLineTablet assign=colTablet}
{math equation="nbLi/nbItemsPerLine" nbLi=12 nbItemsPerLine=$nbItemsPerLineMobile assign=colMobile}
<!-- Products list -->

<script type="text/javascript">
var colLap = {$colLap};
var colTablet = {$colTablet};
var colMobile = {$colMobile};
</script>
{if $product.unit_price_ratio > 0}
   {math equation="pprice / punit_price"  pprice=$product.price  punit_price=$product.unit_price_ratio assign=unit_price}
   <span class="unit_price">{convertPrice price=$unit_price} / {$product.unity|escape:'html':'UTF-8'}</span>
{/if}

<ul{if isset($id) && $id} id="{$id}"{/if} class="list-unstyled row product_list products-block grid clearfix {if isset($class) && $class} {$class}{/if} {if isset($product_style) && !empty($product_style)}{$product_style}{else} style1{/if}">
{foreach from=$products item=product name=products}


<!--module manufacturerLogo--->
{*hook h="DisplayILabsManufacturerLogo" product=$products type=product*}
{assign var=logos  value=(int)Configuration::get('manufacturerlogo_name')}
{if isset($logos) && $logos==1}
                {Manufacturer::getNameById($product.id_manufacturer)}
                {/if}
<a href="{$base_dir}index.php?id_manufacturer={$product.id_manufacturer}&controller=manufacturer&id_lang={Tools::getValue('id_lang')}">
                <img src="{$base_dir}img/m/{$product.id_manufacturer}-small_default.jpg" alt="{Manufacturer::getNameById($product.id_manufacturer)}" title="{Manufacturer::getNameById($product.id_manufacturer)}">
                </a>
<!--end module--->
{math equation="(total%perLine)" total=$smarty.foreach.products.total perLine=$nbItemsPerLine assign=totModulo}
{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineTablet assign=totModuloTablet}
{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineMobile assign=totModuloMobile}
{if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if}
{if $totModuloTablet == 0}{assign var='totModuloTablet' value=$nbItemsPerLineTablet}{/if}
{if $totModuloMobile == 0}{assign var='totModuloMobile' value=$nbItemsPerLineMobile}{/if}
<li class="owl-wrapper col-xs-cus-12 col-xs-{$colMobile} col-sm-{$colTablet} col-md-{$colLap} col-lg-{$colLap}{if $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first-in-line{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 1} first-item-of-tablet-line{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 1} first-item-of-mobile-line{/if}" data-col-lg="{$colLap}" data-col-md="{$colLap}" data-col-sm="{$colTablet}" data-col-xs="{$colMobile}">
<div class="item clearfix">
{if isset($product_style) && !empty($product_style)}
{include file="$tpl_dir./sub/product/{$product_style}.tpl" product=$product class=''}
{else}
{include file="$tpl_dir./sub/product/style1.tpl" product=$product class=''}
{/if}
</div>
</li>
{/foreach}
</ul>
{addJsDefL name=min_item}{l s='Please select at least one product' js=1}{/addJsDefL}
{addJsDefL name=max_item}{l s='You cannot add more than %d product(s) to the product comparison' sprintf=$comparator_max_item js=1}{/addJsDefL}
{addJsDef comparator_max_item=$comparator_max_item}
{addJsDef comparedProductsIds=$compared_products}
{/if}

Put the logo according to your template and design structure. 

Share this post


Link to post
Share on other sites

Hi,

I'm running Prestashop 1.6, but the module doesn't show after installation. Therefore I can't access the configuration page. Inserting the code in product-list.tpl also doesn't work, it threw out an error pointing to a conflict involving {foreach} tag.

Share this post


Link to post
Share on other sites
5 hours ago, hstpctech said:

Hi,

I'm running Prestashop 1.6, but the module doesn't show after installation. Therefore I can't access the configuration page. Inserting the code in product-list.tpl also doesn't work, it threw out an error pointing to a conflict involving {foreach} tag.

 

NB: To finish the module installation copy the manufacturerlogo.tpl file to your theme's product_list.tpl file before the
image tag. Or in any place you wish.

Share this post


Link to post
Share on other sites
On 6/6/2018 at 8:45 PM, ndiaga said:

 

NB: To finish the module installation copy the manufacturerlogo.tpl file to your theme's product_list.tpl file before the
image tag. Or in any place you wish.

Thank you for the explanation, I will give it a try. 

Share this post


Link to post
Share on other sites
1 hour ago, hstpctech said:

Thank you for the explanation, I will give it a try. 

ok,  thanks

Share this post


Link to post
Share on other sites
21 hours ago, ndiaga said:

ok,  thanks

You meant I should insert the code in product_list.tpl, I did that but it gives me error related to foreach loop.

 

Share this post


Link to post
Share on other sites

That is even better: several code lines for 1.7, and no modules at all

 

I just updated the file Product.TPL in themes/classic/templates/catalog 

, inserting the <!-------------------- logo------------->

see:

 

<div class="col-md-6">
          {block name='page_header_container'}

          
          <!-------------------- logo------------->
                    <p class="editable">
                    <img src="{$base_dir}/img/m/{$product.id_manufacturer}.jpg" width=100 alt="" class="img img-thumbnail manufacturer-logo" />
                    <label></label>
                    </p>
          <!-------------------- logo------------->
          
            {block name='page_header'}
              <h1 class="h1" itemprop="name">{block name='page_title'}{$product.name}{/block}</h1>
            {/block}
          {/block}
          {block name='product_prices'}
            {include file='catalog/_partials/product-prices.tpl'}
          {/block}

Share this post


Link to post
Share on other sites

i messed up and i have deleted my "products-list.tpl" file... what can i do? HELP PLEASE

 

Prestashop 1.6.1.17

 

Solved. Thank you.

Edited by Sergio
Solved (see edit history)

Share this post


Link to post
Share on other sites

So module is great and working in Featured and New Products block/module but it will not work for Best Selling block/module.

Do you know how to solve it?

 

Prestashop 1.6.1.17

 

 

Thanks

Edited by Sergio (see edit history)

Share this post


Link to post
Share on other sites

I'm "fighting" with some code in prestashop 1.6.1.17, and i can't find any solution. I already searched in all forums i know, even google it a lot, posted in prestashop forum for help and i have no reply from anyone.

I'll try one more time.

If anyone can give me a hand i will appreciate a lot.

 

I am using this code in "product-list.tpl": (/themes/default-bootstrap/)

 

"<!--module manufacturerLogo--->                
                {*hook h="DisplayILabsManufacturerLogo" product=$products type=product*}
                {assign var=logos  value=(int)Configuration::get('manufacturerlogo_name')}
                {if isset($logos) && $logos==1}
                {Manufacturer::getNameById($product.id_manufacturer)}
                {/if}                
                <a href="{$base_dir}index.php?id_manufacturer={$product.id_manufacturer}&controller=manufacturer&id_lang={Tools::getValue('id_lang')}">
                <img src="{$base_dir}img/m/{$product.id_manufacturer}-small_default.jpg" alt="{Manufacturer::getNameById($product.id_manufacturer)}" title="{Manufacturer::getNameById($product.id_manufacturer)}">
                </a>                
        <!--end module--->

 

 

It displays the Manufacturers Logo in Homepage tab "New Arrivals" , tab "Popular", but in tab "Best Sellers" it's not working. It shows the square where the logo should be, but with an interrogation symbol, not showing the Manufacturer Logo.

 

I already tried to play with the code, in "blockbestsellers.tpl" but without success.

Can you help me solve this issue. I'm thinking in quit and remove the Best Sellers block, if i don't find a solution.

 

 

Best Regards and thank you a lot for your time,

 

Sérgio

Share this post


Link to post
Share on other sites
On 20.10.2018 at 11:06 PM, Sergio said:

 

It displays the Manufacturers Logo in Homepage tab "New Arrivals" , tab "Popular", but in tab "Best Sellers" it's not working. It shows the square where the logo should be, but with an interrogation symbol, not showing the Manufacturer Logo.

 

I already tried to play with the code, in "blockbestsellers.tpl" but without success.

Can you help me solve this issue. I'm thinking in quit and remove the Best Sellers block, if i don't find a solution.

 

 

I think you are just facing a design problem, should related to your css in the  Best Seller module.

Share this post


Link to post
Share on other sites

Hi,

 

Doesn't work well in Prestashop 1.6.1.24.

Default theme gets all misconfigured. New Arrivals shows no new arrivals even if there are new arrivals, images get out of places.... etc...

Share this post


Link to post
Share on other sites

 

Nothing for 1.7?

Share this post


Link to post
Share on other sites
Posted (edited)
On 1/31/2020 at 2:28 AM, Sergio said:

Hi,

 

Doesn't work well in Prestashop 1.6.1.24.

Default theme gets all misconfigured. New Arrivals shows no new arrivals even if there are new arrivals, images get out of places.... etc...

https://prestatuts.com/en/prestashop-modules/50--manufacturer-name-and-logo-on-product-list-page.html

That  is  related  to  your  theme  .

You  can  just  do  a  css  arangement.

Edited by ndiaga (see edit history)

Share this post


Link to post
Share on other sites
9 minutes ago, ndiaga said:

Hi,

Already  compatible  1.7 

Ok, but where i can place this code? 

<!--module manufacturerLogo--->				
				{*hook h="DisplayILabsManufacturerLogo" product=$products type=product*}
				{assign var=logos  value=(int)Configuration::get('manufacturerlogo_name')}
				{if isset($logos) && $logos==1}
                {Manufacturer::getNameById($product.id_manufacturer)}
                {/if}				
				<a href="{$base_dir}index.php?id_manufacturer={$product.id_manufacturer}&controller=manufacturer&id_lang={Tools::getValue('id_lang')}">
                <img src="{$base_dir}img/m/{$product.id_manufacturer}-small_default.jpg" alt="{Manufacturer::getNameById($product.id_manufacturer)}" title="{Manufacturer::getNameById($product.id_manufacturer)}">
                </a>				
<!--end module--->

 

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More