This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>ekomi</name>
|
||||
<displayName><![CDATA[eKomi]]></displayName>
|
||||
<version><![CDATA[1]]></version>
|
||||
<description><![CDATA[Adds an eKomi block]]></description>
|
||||
<author><![CDATA[]]></author>
|
||||
<tab><![CDATA[advertising_marketing]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>0</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
</module>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c0858307dfd3d91768c79ec116820b60'] = 'eKomi';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_d245187b3591f5f6f723ece2217bb637'] = 'Fügt einen eKomi-Block hinzu';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_f4d1ea475eaa85102e2b4e6d95da84bd'] = 'Bestätigung';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c888438d14855d7d96a2724ee9c306bd'] = 'Einstellungen aktualisiert';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_f4f70727dc34561dfde1a3c529b6205c'] = 'Einstellungen';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_597b9cfa17df5ac4e2a4b1f4b6de347a'] = 'eKomi-Konfiguration';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c4fda5e26d4854b8718850c90694a54c'] = 'eKomi E-Mail';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c48c140af813696592daafbabe6d8b9f'] = 'eKomi-Skript';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Aktiviert';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_b9f5c797ebbf55adccdd8539a65a0241'] = 'Deaktiviert';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_ced21fe73878a0139d427ab2927f6772'] = 'Block anzeigen, oder verstecken. Bestellungen werden in jedem Fall an eKomi gesendet.';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_6a794dc942b2e8b4716dbc654e83d094'] = 'Bitte füllen Sie das Formular mit den Daten aus, die Sie von eKomi bekommen.';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c9cc8cce247e49bae79f15173ce97354'] = 'Speichern';
|
||||
|
||||
?>
|
||||
Executable
+133
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 7310 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
exit;
|
||||
|
||||
class Ekomi extends Module
|
||||
{
|
||||
private $_html = '';
|
||||
private $_postErrors = array();
|
||||
|
||||
function __construct()
|
||||
{
|
||||
$this->name = 'ekomi';
|
||||
$this->tab = 'advertising_marketing';
|
||||
$this->version = 1.0;
|
||||
$this->need_instance = 0;
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('eKomi');
|
||||
$this->description = $this->l('Adds an eKomi block');
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
return (parent::install() AND $this->registerHook('rightColumn') AND $this->registerHook('newOrder'));
|
||||
}
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
$output = '<h2>'.$this->displayName.'</h2>';
|
||||
if (Tools::isSubmit('submitEkomi'))
|
||||
{
|
||||
$email = Tools::getValue('ekomi_email');
|
||||
Configuration::updateValue('PS_EKOMI_DISPLAY', Tools::getValue('ekomi_display'));
|
||||
Configuration::updateValue('PS_EKOMI_SCRIPT', htmlentities(str_replace(array("\r\n", "\n"), '', Tools::getValue('ekomi_script'))));
|
||||
if (!empty($email) && !Validate::isEmail($email))
|
||||
Configuration::updateValue('PS_EKOMI_EMAIL', '');
|
||||
else
|
||||
Configuration::updateValue('PS_EKOMI_EMAIL', Tools::getValue('ekomi_email'));
|
||||
$output .= '<div class="conf confirm"><img src="../img/admin/ok.gif" alt="'.$this->l('Confirmation').'" />'.$this->l('Settings updated').'</div>';
|
||||
}
|
||||
return $output.$this->displayForm();
|
||||
}
|
||||
|
||||
public function displayForm()
|
||||
{
|
||||
return '
|
||||
<form action="'.htmlentities($_SERVER['REQUEST_URI']).'" method="post">
|
||||
<fieldset>
|
||||
<legend><img src="'.$this->_path.'logo.gif" alt="" title="" />'.$this->l('Settings').'</legend>
|
||||
<label>'.$this->l('eKomi configuration').'</label>
|
||||
<div class="margin-form">
|
||||
<br class="clear"/>
|
||||
<label for="ekomi_email">'.$this->l('eKomi e-mail').' </label><input id="ekomi_email" type="text" name="ekomi_email" value="'.Configuration::get('PS_EKOMI_EMAIL').'" />
|
||||
<br class="clear"/><br />
|
||||
<label for="ekomi_script">'.$this->l('eKomi script').' </label><textarea id="ekomi_script" name="ekomi_script">'.stripslashes(html_entity_decode(Configuration::get('PS_EKOMI_SCRIPT'))).'</textarea>
|
||||
<br class="clear"/><br />
|
||||
<label>Display block</label>
|
||||
<div class="margin-form">
|
||||
<input type="radio" name="ekomi_display" id="ekomi_display_on" value="1" />
|
||||
<label class="t" for="ekomi_display_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
|
||||
<input type="radio" name="ekomi_display" id="ekomi_display_off" value="0" checked="checked" />
|
||||
<label class="t" for="ekomi_display_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
|
||||
<p class="clear">'.$this->l('Show or don\'t show the block (orders will be sent to eKomi whether you choose to hide or display the block).').'</p>
|
||||
</div>
|
||||
<p class="clear">'.$this->l('Please fill the form with the data that eKomi gives you.').'</p>
|
||||
</div>
|
||||
<center><input type="submit" name="submitEkomi" value="'.$this->l('Save').'" class="button" /></center>
|
||||
</fieldset>
|
||||
</form>';
|
||||
}
|
||||
|
||||
public function hookRightColumn($params)
|
||||
{
|
||||
if (!Configuration::get('PS_EKOMI_SCRIPT'))
|
||||
return;
|
||||
if (!Configuration::get('PS_EKOMI_DISPLAY'))
|
||||
return;
|
||||
return stripslashes(html_entity_decode(Configuration::get('PS_EKOMI_SCRIPT'))).'<br clear="left" /><br />';
|
||||
}
|
||||
|
||||
public function hookLeftColumn($params)
|
||||
{
|
||||
return $this->hookRightColumn($params);
|
||||
}
|
||||
|
||||
public function hookNewOrder($params)
|
||||
{
|
||||
if (!Configuration::get('PS_EKOMI_EMAIL'))
|
||||
return true;
|
||||
|
||||
/* Email generation */
|
||||
$subject = '[Ekomi-Prestashop] '.Configuration::get('PS_SHOP_NAME');
|
||||
$templateVars = array(
|
||||
'{firstname}' => $params['customer']->firstname,
|
||||
'{lastname}' => $params['customer']->lastname,
|
||||
'{email}' => $params['customer']->email,
|
||||
'{id_order}' => $params['order']->id
|
||||
);
|
||||
|
||||
/* 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/'))
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c0858307dfd3d91768c79ec116820b60'] = 'eKomi';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_d245187b3591f5f6f723ece2217bb637'] = 'Añadir un bloque eKomi';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_f4d1ea475eaa85102e2b4e6d95da84bd'] = 'Confirmación';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c888438d14855d7d96a2724ee9c306bd'] = 'Configuración actualizada';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_f4f70727dc34561dfde1a3c529b6205c'] = 'Configuración';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_597b9cfa17df5ac4e2a4b1f4b6de347a'] = 'configuración eKomi';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c4fda5e26d4854b8718850c90694a54c'] = 'eKomi por e-mail';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c48c140af813696592daafbabe6d8b9f'] = 'script eKomi';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Mostrar';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_b9f5c797ebbf55adccdd8539a65a0241'] = 'Ocultar';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_ced21fe73878a0139d427ab2927f6772'] = 'Mostrar o no el bloque (los pedidos serán enviados a eKomi independientemente de que usted elija ocultar o mostrar el bloque).';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_6a794dc942b2e8b4716dbc654e83d094'] = 'Por favor, rellene el formulario con los datos básicos que eKomi le da.';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar';
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c0858307dfd3d91768c79ec116820b60'] = 'eKomi';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_d245187b3591f5f6f723ece2217bb637'] = 'Ajouter un bloc eKomi';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_f4d1ea475eaa85102e2b4e6d95da84bd'] = 'Confirmation';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c888438d14855d7d96a2724ee9c306bd'] = 'Configuration mise à jour';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_f4f70727dc34561dfde1a3c529b6205c'] = 'Configuration';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_597b9cfa17df5ac4e2a4b1f4b6de347a'] = 'Configuration eKomi';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c4fda5e26d4854b8718850c90694a54c'] = 'E-mail eKomi';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c48c140af813696592daafbabe6d8b9f'] = 'Script eKomi';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Afficher';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_b9f5c797ebbf55adccdd8539a65a0241'] = 'Cacher';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_ced21fe73878a0139d427ab2927f6772'] = 'Afficher ou cacher le bloc (les commandes seront envoyés à eKomi que vous choississiez d\'afficher ou de cacher le bloc).';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_6a794dc942b2e8b4716dbc654e83d094'] = 'Veuillez remplir le formulaire avec les informations fournies par eKomi';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder';
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c0858307dfd3d91768c79ec116820b60'] = 'eKomi';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_f4d1ea475eaa85102e2b4e6d95da84bd'] = 'Conferma';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c888438d14855d7d96a2724ee9c306bd'] = 'Impostazioni aggiornate';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_f4f70727dc34561dfde1a3c529b6205c'] = 'Impostazioni';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_597b9cfa17df5ac4e2a4b1f4b6de347a'] = 'configurazione eKomi';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c4fda5e26d4854b8718850c90694a54c'] = 'e-mail eKomi ';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c48c140af813696592daafbabe6d8b9f'] = 'script eKomi';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Attivo';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_b9f5c797ebbf55adccdd8539a65a0241'] = 'Disattivato';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_ccf7919cbd0248b0f86a8c39f74da5d0'] = 'Mostrare oppure no il blocco (gli ordini verranno inviati a eKomi e scegli di nascondere o visualizzare il blocco)';
|
||||
$_MODULE['<{ekomi}prestashop>ekomi_c9cc8cce247e49bae79f15173ce97354'] = 'Salva';
|
||||
|
||||
?>
|
||||
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Executable
+10
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<p>{firstname} {lastname} {email} {id_order}</p>
|
||||
</body>
|
||||
</html>
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
{firstname} {lastname}
|
||||
{email}
|
||||
{id_order}
|
||||
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
{firstname} {lastname}
|
||||
{email}
|
||||
{id_order}
|
||||
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
{firstname} {lastname}
|
||||
{email}
|
||||
{id_order}
|
||||
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<p>{firstname} {lastname} {email} {id_order}</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
{firstname} {lastname}
|
||||
{email}
|
||||
{id_order}
|
||||
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
{firstname} {lastname}
|
||||
{email}
|
||||
{id_order}
|
||||
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
{firstname} {lastname}
|
||||
{email}
|
||||
{id_order}
|
||||
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>titolo</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>{firstname} {lastname} {email} {id_order}</p>
|
||||
</body>
|
||||
</html>
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
{firstname} {lastname}
|
||||
{email}
|
||||
{id_order}
|
||||
|
||||
Reference in New Issue
Block a user