[+] BO : Adding warnings when merchant does not enable the configurations needed to use modules API
This commit is contained in:
@@ -71,17 +71,33 @@
|
||||
</div>
|
||||
|
||||
{if !isset($logged_on_addons)}
|
||||
<!--start addons login-->
|
||||
<div class="filter-module" id="addons_login_div">
|
||||
<p>{l s='You have a PrestaShop Addons account ?'}</p>
|
||||
<form id="addons_login_form" method="post">
|
||||
<label>{l s='Login Addons'} :</label> <input type="text" value="" id="username_addons" autocomplete="off" class="ac_input">
|
||||
<label>{l s= 'Password Addons'} :</label> <input type="password" value="" id="password_addons" autocomplete="off" class="ac_input">
|
||||
<input type="submit" class="button" id="addons_login_button" value="{l s='Log in'}">
|
||||
<span id="addons_loading" style="color:red"></span>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!--end addons login-->
|
||||
{if $check_url_fopen eq 'ko' OR $check_curl eq 'ko' OR $check_openssl eq 'ko'}
|
||||
|
||||
<div class="warn">
|
||||
<b>{l s='If you want to be able to fully use the AdminModules pannel and have free modules available, you should enable the following configuration on your server :'}</b><br />
|
||||
{if $check_url_fopen eq 'ko'}- {l s='Enable allow_url_fopen'}<br />{/if}
|
||||
{if $check_curl eq 'ko'}- {l s='Enable php curl extension'}<br />{/if}
|
||||
{if $check_openssl eq 'ko'}- {l s='Enable php openssl extension'}<br />{/if}
|
||||
</div>
|
||||
|
||||
{else}
|
||||
|
||||
<!--start addons login-->
|
||||
<div class="filter-module" id="addons_login_div">
|
||||
|
||||
<p>{l s='You have a PrestaShop Addons account ?'}</p>
|
||||
<form id="addons_login_form" method="post">
|
||||
<label>{l s='Login Addons'} :</label> <input type="text" value="" id="username_addons" autocomplete="off" class="ac_input">
|
||||
<label>{l s= 'Password Addons'} :</label> <input type="password" value="" id="password_addons" autocomplete="off" class="ac_input">
|
||||
<input type="submit" class="button" id="addons_login_button" value="{l s='Log in'}">
|
||||
<span id="addons_loading" style="color:red"></span>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!--end addons login-->
|
||||
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
|
||||
|
||||
3
cache/class_index.php
vendored
3
cache/class_index.php
vendored
@@ -368,7 +368,8 @@
|
||||
'HelperCore' => 'classes/helper/Helper.php',
|
||||
'HelperForm' => 'override/classes/helper/HelperForm.php',
|
||||
'HelperFormCore' => 'classes/helper/HelperForm.php',
|
||||
'HelperHelpAccess' => 'classes/helper/HelperHelpAccess.php',
|
||||
'HelperHelpAccess' => 'override/classes/helper/HelperHelpAccess.php',
|
||||
'HelperHelpAccessCore' => 'classes/helper/HelperHelpAccess.php',
|
||||
'HelperList' => 'override/classes/helper/HelperList.php',
|
||||
'HelperListCore' => 'classes/helper/HelperList.php',
|
||||
'HelperOptions' => 'override/classes/helper/HelperOptions.php',
|
||||
|
||||
@@ -1000,6 +1000,10 @@ class AdminModulesControllerCore extends AdminController
|
||||
$tpl_vars['list_modules_categories'] = $this->list_modules_categories;
|
||||
$tpl_vars['list_modules_authors'] = $this->modules_authors;
|
||||
|
||||
$tpl_vars['check_url_fopen'] = (ini_get('allow_url_fopen') ? 'ok' : 'ko');
|
||||
$tpl_vars['check_curl'] = (extension_loaded('curl') ? 'ok' : 'ko');
|
||||
$tpl_vars['check_openssl'] = (extension_loaded('openssl') ? 'ok' : 'ko');
|
||||
|
||||
if ($this->logged_on_addons)
|
||||
$tpl_vars['logged_on_addons'] = 1;
|
||||
$smarty->assign($tpl_vars);
|
||||
|
||||
@@ -58,7 +58,7 @@ class Cheque extends PaymentModule
|
||||
$this->description = $this->l('Module for accepting payments by check.');
|
||||
$this->confirmUninstall = $this->l('Are you sure you want to delete your details ?');
|
||||
|
||||
if (!isset($this->chequeName) OR !isset($this->address))
|
||||
if (!isset($this->chequeName) OR !isset($this->address) OR empty($this->chequeName) OR empty($this->address))
|
||||
$this->warning = $this->l('\'To the order of\' and address must be configured in order to use this module correctly.');
|
||||
if (!sizeof(Currency::checkPaymentCurrencies($this->id)))
|
||||
$this->warning = $this->l('No currency set for this module');
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user