Jump to content

Remove modules payment module from the list, definitely


ares

Recommended Posts

I would like to remove modules payment module from the list, definitely.
I tried to delete the files:

 

default_country_modules_list.xml

modules_list.xml

must_have_modules_list.xml

 

Nothing to do, just to update and after some time they are visible again.

I can not find where to change.

Can anyone help me??

Link to comment
Share on other sites

Grazie per la risposta.
In amministrazione > preferenze  è già selezionato NO.
Continua comunque ad aggiornare la lista moduli.
Non ho idea di dove guardare, ho provato tutto.

Hai idea di dove si possa intervenire ??
Cancellare i moduli dai file nella cartella Config> XML non serve.

  Che fare ??
   Grazie

********************************

Thanks for the reply.
In Administration> Preferences is already selected NO.
However continues to update the module list.
I have no idea where to look, I've tried everything.

Any idea where we can intervene?
Delete modules from files in the Config folder> XML is not needed.

   What to do?
    thanks

Link to comment
Share on other sites

  • 2 months later...

controllers/admin/AdminModulesController

 

comment out two lines:

//if ($xmlModule->attributes() == 'partner' && $key == 'name')
//$this->list_partners_modules[] = (string)$value;

in

					foreach ($module->attributes() as $key => $value)
					{
						if ($xmlModule->attributes() == 'native' && $key == 'name')
							$this->list_natives_modules[] = (string)$value;
						//if ($xmlModule->attributes() == 'partner' && $key == 'name')
							//$this->list_partners_modules[] = (string)$value;
					}
Link to comment
Share on other sites

Thanks for your reply Vekia i have made the changes and tried clearing Cache and everything but still i can see those modules in BO.

For e.g,

Alliance Processing (Addons) Authorize.net (A) (Addons) BluePay (Addons)

I could able to remove all these Addons Module.

 

Thank you

Link to comment
Share on other sites

yes its exact looks like this :

 

comment out two lines:

//if ($xmlModule->attributes() == 'partner' && $key == 'name')
//$this->list_partners_modules[] = (string)$value;

 

i don't know why its still appearing.

Link to comment
Share on other sites

okay so i see, it appears everywhere instead of page with filter option activated.

i've got other solution

open this file:

ADMIN_DIR/themes/default/template/controllers/modules/list.tpl

 

and change:

{foreach from=$modules item=module}
			<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}" title="{$module->name}">
						<h3>{$module->displayName}<span style="display:none">{$module->name}</span>
							{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} {/if}</p>
						{if isset($module->message) && (empty($module->name) === false) && (!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}
								 
							{/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">  {if isset($module->id_currency) && isset($module->price)}{displayPrice price=$module->price currency=$module->id_currency}{/if}</span></a>
							</li>
						{else}
							{if 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>
		{/foreach} 

to:

{foreach from=$modules item=module}
            {if $module->type!="addonsNative" && $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}" title="{$module->name}">
						<h3>{$module->displayName}<span style="display:none">{$module->name}</span>
							{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} {/if}</p>
						{if isset($module->message) && (empty($module->name) === false) && (!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}
								 
							{/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">  {if isset($module->id_currency) && isset($module->price)}{displayPrice price=$module->price currency=$module->id_currency}{/if}</span></a>
							</li>
						{else}
							{if 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}
  • Like 1
Link to comment
Share on other sites

  • 2 months later...
  • 5 months later...

That works great Vekia, much appreciatted.

And how would you implement this change through override?

 

I've created the file /override/controllers/admin/templates/modules/list.tpl

 

But nothing happens there. May I need to edit some additonal file to reference the new tpl being overrided?

 

Thanks!

Link to comment
Share on other sites

  • 8 months later...

for version 1.6 

Pt_BR - Remover Módulos parceiros
US - Remove modules partners

1 step - complementing the vekia mentioned to version 1.6

controllers/admin/AdminModulesController e classes\controller\AdminController.php 
 
comment out two lines:
//if ($xmlModule->attributes() == 'partner' && $key == 'name')
//$this->list_partners_modules[] = (string)$value;
in
					foreach ($module->attributes() as $key => $value)
					{
						if ($xmlModule->attributes() == 'native' && $key == 'name')
							$this->list_natives_modules[] = (string)$value;
						//if ($xmlModule->attributes() == 'partner' && $key == 'name')
							//$this->list_partners_modules[] = (string)$value;
					}

2 step

after having followed this step  how to remove Must Have modules list from prestashop back office

 

3 step

file: /ADMIN_DIR/themes/default/template/controllers/modules/list.tpl

replace

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

per

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

 

3 last step remove undesirable modules modules folder, not to be abandoned

 

forgive me my bad English and I am Brazilian
sorry if I was not clearer with the words
Edited by ynser (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 5 months later...

Hi,

 

ynsers method updated for 1.6.1.4

AdminModulesController - uncoment row 139-141, in AdminController row 2283-2285, both like this:

   //  if ($xml_module->attributes() == 'partner' && $key == 'name') {
   //      $this->list_partners_modules[] = (string)$value;
   //  }

Step 2 - admin_dir is the direcotry, you RENAMED after instalation, so look for yours own name... :-)

If I placed on line 37, and BEWARE, there are more foreaches. The "right" foreach is at line 185 in my case...

 

Works perfect!

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