Jump to content

How to stop displaying certain manufacture name not to appear under Manufacture list in front page.


Recommended Posts

Well not using a setting so to speak, but if you tweak your template this can easily be achieved

 

1/ Duplicate the /modules/blockmanufacturer/blockmanufacturer.tpl in themes/<your-theme>/modules/blockmanufacturer/blockmanufacturer.tpl. Create the directories.

 

2/ Edit your tpl as follow. You'll find some code like this one:

<ul class="bullet">
{foreach from=$manufacturers item=manufacturer name=manufacturer_list}
 {if $smarty.foreach.manufacturer_list.iteration <= $text_list_nb}
 <li class="{if $smarty.foreach.manufacturer_list.last}last_item{elseif $smarty.foreach.manufacturer_list.first}first_item{else}item{/if}"><a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)}" title="{l s='More about' mod='blockmanufacturer'} {$manufacturer.name}">{$manufacturer.name|escape:'htmlall':'UTF-8'}</a></li>
 {/if}
{/foreach}
</ul>

Replace it so it match that:

<ul class="bullet">
{foreach from=$manufacturers item=manufacturer name=manufacturer_list}
{if !in_array($manufacturer.id_manufacturer,[ 1, 2 ])}
 {if $smarty.foreach.manufacturer_list.iteration <= $text_list_nb}
 <li class="{if $smarty.foreach.manufacturer_list.last}last_item{elseif $smarty.foreach.manufacturer_list.first}first_item{else}item{/if}"><a href="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)}" title="{l s='More about' mod='blockmanufacturer'} {$manufacturer.name}">{$manufacturer.name|escape:'htmlall':'UTF-8'}</a></li>
 {/if}
{/if}
{/foreach}
</ul>

Proceed the same for the foreach for the drop-down

{foreach from=$manufacturers item=manufacturer}
{if !in_array($manufacturer.id_manufacturer,[ 1, 2 ])}
 <option value="{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)}">{$manufacturer.name|escape:'htmlall':'UTF-8'}</option>
{/if}
{/foreach}

 

3/ Clear your smarty cache (delete all files in /tools/smarty/compile/ but the index.php)

 

Enjoy.

 

PS: This does not prevent the manufacturer from the list of manufacturer (page: manufacturer.php)

 

Best,

(d)oekia

PS2: 1, 2 is the list of manufacturer id within you Prestashop

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...