[+] BO : Adding warnings when merchant does not enable the configurations needed to use modules API

This commit is contained in:
fSerny
2012-01-19 14:50:09 +00:00
parent 0311ec67d3
commit 6e7cfff962
5 changed files with 34 additions and 3245 deletions
+1 -1
View File
@@ -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');