// Merge -> 10309
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10333 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
<module>
|
||||
<name>ekomi</name>
|
||||
<displayName><![CDATA[eKomi]]></displayName>
|
||||
<version><![CDATA[1.1]]></version>
|
||||
<version><![CDATA[1.2]]></version>
|
||||
<description><![CDATA[Adds an eKomi block]]></description>
|
||||
<author><![CDATA[]]></author>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[advertising_marketing]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>0</need_instance>
|
||||
|
||||
+21
-2
@@ -33,17 +33,31 @@ class Ekomi extends Module
|
||||
private $_html = '';
|
||||
private $_postErrors = array();
|
||||
|
||||
public $id_lang;
|
||||
public $iso_lang;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
$this->name = 'ekomi';
|
||||
$this->tab = 'advertising_marketing';
|
||||
$this->version = 1.1;
|
||||
$this->author = 'PrestaShop';
|
||||
$this->version = 1.2;
|
||||
$this->need_instance = 0;
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('eKomi');
|
||||
$this->description = $this->l('Adds an eKomi block');
|
||||
|
||||
if (self::isInstalled($this->name))
|
||||
{
|
||||
$this->id_lang = (int)Configuration::get('PS_LANG_DEFAULT');
|
||||
$this->iso_lang = pSQL(Language::getIsoById($this->id_lang));
|
||||
|
||||
/* Check Mail Directory */
|
||||
if (!file_exists(dirname(__FILE__.'/'.$this->iso_lang.'/')))
|
||||
$this->warning .= $this->l('directory').' "'.$this->iso_lang.'" does not exist ';
|
||||
}
|
||||
}
|
||||
|
||||
public function install()
|
||||
@@ -115,6 +129,10 @@ class Ekomi extends Module
|
||||
if (!Configuration::get('PS_EKOMI_EMAIL'))
|
||||
return true;
|
||||
|
||||
/* Check Mail Directory */
|
||||
if (!file_exists(dirname(__FILE__.'/'.$this->iso_lang.'/')))
|
||||
return true;
|
||||
|
||||
/* Email generation */
|
||||
$subject = '[Ekomi-Prestashop] '.Configuration::get('PS_SHOP_NAME');
|
||||
$templateVars = array(
|
||||
@@ -125,8 +143,9 @@ class Ekomi extends Module
|
||||
);
|
||||
|
||||
/* Email sending */
|
||||
if (!Mail::Send(1, 'ekomi', $subject, $templateVars, Configuration::get('PS_EKOMI_EMAIL'), NULL, $params['customer']->email, Configuration::get('PS_SHOP_NAME'), NULL, NULL, dirname(__FILE__).'/mails/'))
|
||||
if (!Mail::Send((int)$this->id_lang, 'ekomi', $subject, $templateVars, Configuration::get('PS_EKOMI_EMAIL'), NULL, $params['customer']->email, Configuration::get('PS_SHOP_NAME'), NULL, NULL, dirname(__FILE__).'/mails/'))
|
||||
return true;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c0858307dfd3d91768c79ec116820b60'] = 'eKomi';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_d245187b3591f5f6f723ece2217bb637'] = 'Ajouter un bloc eKomi';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_5f8f22b8cdbaeee8cf857673a9b6ba20'] = 'répertoire';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_f4d1ea475eaa85102e2b4e6d95da84bd'] = 'Confirmation';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c888438d14855d7d96a2724ee9c306bd'] = 'Configuration mise à jour';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_f4f70727dc34561dfde1a3c529b6205c'] = 'Configuration';
|
||||
|
||||
Reference in New Issue
Block a user