How to hide Must Have modules list from PrestaShop back office?

PrestaShop in version 1.5 displays in back office "Must Have" modules. This is kind of advertisement of paid modules from official addons store. I've noticed several times that merchants wants to remove these unwanted advertisement. It's very easy to achieve and you can do it only with simple modification of back office template file.

 

Must Have prestashop modules - how to remove advertisement from back office modules list?

must have prestashop modules

 

Back office template file modification

As i said in short introduction above - all that we have to edit is simple back office theme template file. Please open this theme file: /ADMIN_DIR/themes/default/template/controllers/modules/list.tpl - ADMIN_DIR is a directory of your prestashop back office manager. This file is template for modules list (modules > modules tab in your back office).

 

You can find there foreach loop: 

{foreach from=$modules item=module}

right after this code, add simple if condition:

{if $module->type != 'addonsMustHave'}  

You need to add also closing if condition tag: {/if} do it right before the code: {/foreach}. It should look like:

{/if}
{/foreach}

 

Full code of this foreach loop should looks like: ( i highlighted added lines with if condition)

{foreach from=$modules item=module}
        {if $module->type != 'addonsMustHave'}        
			<tr>
				<td>
					{if (isset($module->id) && $module->id > 0) || !isset($module->type) || $module->type != 'addonsMustHave'}
					<input type="checkbox" name="modules" value="{$module->name}"
						{if !isset($module->confirmUninstall) OR empty($module->confirmUninstall)}rel="false"{else}rel="{$module->confirmUninstall|addslashes}"{/if}
						class="noborder">
					{/if}
				</td>
				<td><img class="imgm" alt="" src="{if isset($module->image)}{$module->image}{else}../modules/{$module->name}/{$module->logo}{/if}"></td>
				<td>
					<div class="moduleDesc" id="anchor{$module->name|ucfirst}">
						<h3>{$module->displayName}
							{if isset($module->type) && $module->type == 'addonsMustHave'}
								<span class="setup must-have">{l s='Must Have'}</span>
							{else}
								{if isset($module->id) && $module->id gt 0}
									<span class="setup{if isset($module->active) && $module->active eq 0} off{/if}">{l s='Installed'}</span>
								{else}
									<span class="setup non-install">{l s='Not installed'}</span>
								{/if}
							{/if}
						</h3>
						<div class="metadata">
							{if isset($module->author) && !empty($module->author)}
							<dl class="">
								<dt>{l s='Developed by'} :</dt>
								<dd>{$module->author|truncate:20:'...'}</dd>|
							</dl>
							{/if}
							<dl class="">
								<dt>{l s='Version'} :</dt>
								<dd>{$module->version} 
									{if isset($module->version_addons)}({l s='Update'} {$module->version_addons} {l s='Available on PrestaShop Addons'}){/if}
								</dd>|
							</dl>
							<dl class="">
								<dt>{l s='Category'} :</dt>
								<dd>{$module->categoryName}</dd>
							</dl>
						</div>
						<p class="desc">{if isset($module->description) && $module->description ne ''}{l s='Description'} : {$module->description}{else}&nbsp;{/if}</p>
						{if isset($module->message) && (!isset($module->type) || ($module->type != 'addonsMustHave' || $module->type !== 'addonsNative'))}<div class="conf">{$module->message}</div>{/if}
						<div class="row-actions-module">
							{if !isset($module->not_on_disk)}
								{$module->optionsHtml}
								{if isset($module->preferences) && $module->preferences['favorite'] == 1}
									<a class="action_module action_unfavorite toggle_favorite" data-module="{$module->name}" data-value="0" href="#">{l s='Remove from Favorites'}</a>
									<a class="action_module action_favorite toggle_favorite" data-module="{$module->name}" data-value="1" href="#" style="display: none;">{l s='Mark as Favorite'}</a>
								{else}
									<a class="action_module action_unfavorite toggle_favorite" data-module="{$module->name}" data-value="0" href="#" style="display: none;">{l s='Remove from Favorites'}</a>
									<a class="action_module action_favorite toggle_favorite" data-module="{$module->name}" data-value="1" href="#">{l s='Mark as Favorite'}</a>
								{/if}
							{else}
								&nbsp;
							{/if}
						</div>
					</div>
				</td>
				<td>
					<ul id="list-action-button">
						{if isset($module->type) && $module->type == 'addonsMustHave'}
							<li>
								<a href="{$module->addons_buy_url}" target="_blank" class="button updated"><span><img src="../img/admin/cart_addons.png">&nbsp;&nbsp;{if isset($module->id_currency) && isset($module->price)}{displayPrice price=$module->price currency=$module->id_currency}{/if}</span></a>
							</li>
						{else}
							{if $module->id && isset($module->version_addons) && $module->version_addons}
								<li><a href="{$module->options.update_url}" class="button updated"><span>{l s='Update it!'}</span></a></li>
							{/if}
								<li>
									<a {if isset($module->id) && $module->id gt 0 && !empty($module->options.uninstall_onclick)}onclick="{$module->options.uninstall_onclick}"{/if} href="{if isset($module->id) && $module->id gt 0}{$module->options.uninstall_url}{else}{$module->options.install_url}{/if}" class="button installed">
										<span>{if isset($module->id) && $module->id gt 0}{l s='Uninstall'}{else}{l s='Install'}{/if}</span>
									</a>
								</li>
						 {/if}
					</ul>
				</td>
			</tr>
        {/if}            
{/foreach}

 

 

author milos myszczuk
Article by Milosz Myszczuk PrestaShop expert, official PrestaShop community moderator. PHP developer, specialist in relative and spatial databases management, GIS Analyst, CEO & founder of VEKIA interactive agency. Read more about VEKIA company
If you like my articles and want much more valuable tips, feel free to send me donation
1.4 version 1.4.11 1.6 404 addon admin advertise ahref ajax alpha animation api app application authentication back office backup badge banner basics block bootstrap button cache carrier cart catalog category certificate changelog chat class clear client clip cms code colors columns comments configuration contact container content controller cookie counter country coupon css csv currency customer dashboard database debug default delete delivery desktop developer device disable discount displayNav displayTop download dynamic editor effect empty encrypt engine error exchange exclude export facebook faceshop fade fancoupon fancybox fanpage fatal feature feed field file fix fixed font footer free friendly url front ftp full gallery generate gift global godaddy google google+ gray grid groupon header help hide highlight homefeatured homepage hook hosting hover howto htaccess html html5 ID image import include input instagram installation integration iPhone issue javascript jquery kgb knowhow languages law left likebox link list livingsocial loading log login logo loyality mail mailing maintenance manufacturer marketing marquee mcrypt menu meta mobile modification module movie moving multilanguage multiupload must have mysql news newsletter notification number open graph order override page password performance PHP phpmyadmin picture pinterest plugin popup post prestashop prestashop 1.0 prestashop 1.1 prestashop 1.2 prestashop 1.3 prestashop 1.4 prestashop 1.5 price rules problem product profile promotion proslider purifier quantity query quick tip random rates register reinsurance release reporting reset responsive restore results ribbon rich text right sales search security seo service shadow share shipping shop shopmania slider smarty social networks SQL SSL statistics stock store style subcategory superuser support switcher tab tablet tag tax template text theme tinyMCE tips and tricks tpl tracking translations tree trends trigger tumblr tutorial twitter update upgrade upload variables video visits voucher vulnerability web2print wide widget width window wishlist wysiwyg youtube zip zopim