Jump to content

Stop displaying certain manufacture name


Recommended Posts

Hi,

I need to remove some manufactures name from the carousel at Home page. I used the method that was suggested in the old topic and it works but not as I expected. Now the manufactures name is displayed which I need but in place of those that are filtered there are empty spaces.

 

Prestashop 1.6.0.8
I´m using Leo Theme

Aded line

"{if !in_array($manufacturer.id_manufacturer,[ 6, 8, 10, 18, 19, 21, 22, 23, 24, 26, 28, 31, 32, 33, 38, 39, 42, 44, 45, 47, 48, 49, 50, 51, 52, 55, 60, 61 ])}"

{if $manufacturers}
 <div class="widget-manufacture block">
    {if isset($widget_heading)&&!empty($widget_heading)}
    <h4 class="title_block">
        {$widget_heading}
    </h4>
    {/if}
    <div class="block_content">
        <div class="carousel slide" id="manucarousel">
            {if count($manufacturers)>$itemsperpage}    
                <a class="carousel-control left" href="#manucarousel" data-slide="prev">‹</a>
                <a class="carousel-control right" href="#manucarousel" data-slide="next">›</a>
            {/if}
            <div class="carousel-inner">
                {$mmanufacturers=array_chunk($manufacturers,$itemsperpage)}
                {foreach from=$mmanufacturers item=manufacturers name=mypLoop}
                    <div class="item {if $smarty.foreach.mypLoop.first}active{/if}">
                        {foreach from=$manufacturers item=manufacturer name=manufacturers}
                            {if $manufacturer@iteration%$columnspage==1&&$columnspage>1}
                                <div class="row">
                            {/if}
{if !in_array($manufacturer.id_manufacturer,[ 6, 8, 10, 18, 19, 21, 22, 23, 24, 26, 28, 31, 32, 33, 38, 39, 42, 44, 45, 47, 48, 49, 50, 51, 52, 55, 60, 61 ])}
                            <div class="logo-manu {if $columnspage == 5}col-md-2-4 col-lg-2-4{else}col-md-{$scolumn}{/if} col-xs-12">
                                <a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{l s='view products' mod='leomanagewidgets'}">
                                <img src="{$manufacturer.image|escape:'htmlall':'UTF-8'}" alt=""> </a>
                            </div>
{/if}              
                            {if ($manufacturer@iteration%$columnspage==0||$smarty.foreach.manufacturers.last)&&$columnspage>1}
                                </div>
                            {/if}
                        {/foreach}
                    </div>
                {/foreach}
            </div>
        </div>
    </div>
</div>
{/if}

GIF example

http://recordit.co/LFe0dG1po1

Edited by madrid.hqm (see edit history)
Link to comment
Share on other sites

If it's not working paste the changed code here

{if $manufacturers}
 <div class="widget-manufacture block">
    {if isset($widget_heading)&&!empty($widget_heading)}
    <h4 class="title_block">
        {$widget_heading}
    </h4>
    {/if}
    <div class="block_content">
        <div class="carousel slide" id="manucarousel">
            {if count($manufacturers)>$itemsperpage}    
                <a class="carousel-control left" href="#manucarousel" data-slide="prev">‹</a>
                <a class="carousel-control right" href="#manucarousel" data-slide="next">›</a>
            {/if}
            <div class="carousel-inner">
                {$mmanufacturers=array_chunk($manufacturers,$itemsperpage)}
                {foreach from=$mmanufacturers item=manufacturers name=mypLoop}
{if !in_array($manufacturer.id_manufacturer,[ 6, 8, 10, 18, 19, 21, 22, 23, 24, 26, 28, 31, 32, 33, 38, 39, 42, 44, 45, 47, 48, 49, 50, 51, 52, 55, 60, 61 ])}                      
                    <div class="item {if $smarty.foreach.mypLoop.first}active{/if}">
                        {foreach from=$manufacturers item=manufacturer name=manufacturers}
                            {if $manufacturer@iteration%$columnspage==1&&$columnspage>1}
                                <div class="row">
                            {/if}
                            <div class="logo-manu {if $columnspage == 5}col-md-2-4 col-lg-2-4{else}col-md-{$scolumn}{/if} col-xs-12">
                                <a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{l s='view products' mod='leomanagewidgets'}">
                                <img src="{$manufacturer.image|escape:'htmlall':'UTF-8'}" alt=""> </a>
                            </div>
                            {if ($manufacturer@iteration%$columnspage==0||$smarty.foreach.manufacturers.last)&&$columnspage>1}
                                </div>
                            {/if}
                        {/foreach}
                    </div>
{/if}                        
                {/foreach}
            </div>
        </div>
    </div>
</div>
{/if}

Same thing

Edited by madrid.hqm (see edit history)
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...