// Merge -> revision 7906
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7909 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ if (empty($tab) and !sizeof($_POST))
|
||||
$bread = '';
|
||||
|
||||
foreach ($tabs AS $key => $item)
|
||||
$bread .= ' <img src="../img/admin/separator_breadcrum.png" style="margin-right:5px" />
|
||||
$bread .= ' <img src="../img/admin/separator_breadcrum.png" style="margin-right:5px" alt=">" />
|
||||
'.((sizeof($tabs) - 1 > $key)
|
||||
? '<a href="?tab='.$item['class_name'].'&token='.Tools::getAdminToken($item['class_name'].intval($item['id_tab']).intval($cookie->id_employee)).'">'
|
||||
: '').'
|
||||
|
||||
@@ -172,7 +172,7 @@ class AdminCurrencies extends AdminTab
|
||||
</div>
|
||||
<label>'.$this->l('Symbol:').' </label>
|
||||
<div class="margin-form">
|
||||
<input type="text" size="3" maxlength="8" name="sign" value="'.htmlentities($this->getFieldValue($obj, 'sign'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
|
||||
<input type="text" size="3" maxlength="8" name="sign" value="'.$this->getFieldValue($obj, 'sign').'" /> <sup>*</sup>
|
||||
<p class="clear">'.$this->l('Will appear on Front Office, e.g., €, $').'...</p>
|
||||
</div>
|
||||
<label>'.$this->l('Conversion rate:').' </label>
|
||||
|
||||
@@ -605,7 +605,7 @@ class AdminImport extends AdminTab
|
||||
if (Tools::getValue('convert'))
|
||||
$line = $this->utf8_encode_array($line);
|
||||
$info = self::getMaskedRow($line);
|
||||
if (array_key_exists('id', $info) AND (int)($info['id']) AND Product::existsInDatabase((int)($info['id'])))
|
||||
if (array_key_exists('id', $info) AND (int)($info['id']) AND Product::existsInDatabase((int)($info['id']), 'product'))
|
||||
{
|
||||
$product = new Product((int)($info['id']));
|
||||
$categoryData = Product::getProductCategories((int)($product->id));
|
||||
@@ -753,7 +753,7 @@ class AdminImport extends AdminTab
|
||||
$product->quantity = 0;
|
||||
|
||||
// If id product AND id product already in base, trying to update
|
||||
if ($product->id AND Product::existsInDatabase((int)($product->id)))
|
||||
if ($product->id AND Product::existsInDatabase((int)($product->id), 'product'))
|
||||
{
|
||||
|
||||
$datas = Db::getInstance()->getRow('SELECT `date_add` FROM `'._DB_PREFIX_.'product` WHERE `id_product` = '.(int)($product->id));
|
||||
@@ -1192,7 +1192,7 @@ class AdminImport extends AdminTab
|
||||
|
||||
self::setDefaultValues($info);
|
||||
|
||||
if (array_key_exists('id', $info) AND (int)($info['id']) AND Manufacturer::existsInDatabase((int)($info['id'])))
|
||||
if (array_key_exists('id', $info) AND (int)($info['id']) AND Manufacturer::existsInDatabase((int)($info['id']), 'manufacturer'))
|
||||
$manufacturer = new Manufacturer((int)($info['id']));
|
||||
else
|
||||
$manufacturer = new Manufacturer();
|
||||
@@ -1247,7 +1247,7 @@ class AdminImport extends AdminTab
|
||||
|
||||
self::setDefaultValues($info);
|
||||
|
||||
if (array_key_exists('id', $info) AND (int)($info['id']) AND Supplier::existsInDatabase((int)($info['id'])))
|
||||
if (array_key_exists('id', $info) AND (int)($info['id']) AND Supplier::existsInDatabase((int)($info['id']), 'supplier'))
|
||||
$supplier = new Supplier((int)($info['id']));
|
||||
else
|
||||
$supplier = new Supplier();
|
||||
|
||||
@@ -213,7 +213,7 @@ class AddressFormatCore extends ObjectModel
|
||||
$usedKeyList[] = $patternName;
|
||||
}
|
||||
else
|
||||
$this->_errorFormatList[] = Tools::displayError('This key is used too many times (once allowed').
|
||||
$this->_errorFormatList[] = Tools::displayError('This key is used too many times (once allowed)').
|
||||
': '.$patternName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ class CompareProduct extends ObjectModel
|
||||
|
||||
$compareProducts = null;
|
||||
|
||||
if ($results)
|
||||
foreach($results as $result)
|
||||
$compareProducts[] = $result['id_product'];
|
||||
|
||||
@@ -129,6 +130,7 @@ class CompareProduct extends ObjectModel
|
||||
|
||||
$compareProducts = null;
|
||||
|
||||
if ($results)
|
||||
foreach($results as $result)
|
||||
$compareProducts[] = $result['id_product'];
|
||||
|
||||
|
||||
@@ -860,12 +860,12 @@ abstract class ObjectModelCore
|
||||
* @param $id_entity entity id
|
||||
* @return boolean
|
||||
*/
|
||||
public static function existsInDatabase($id_entity)
|
||||
public static function existsInDatabase($id_entity, $table)
|
||||
{
|
||||
$row = Db::getInstance()->getRow('
|
||||
SELECT `id_'.self::$table.'`
|
||||
FROM `'._DB_PREFIX_.self::$table.'` e
|
||||
WHERE e.`id_'.self::$table.'` = '.(int)($id_entity));
|
||||
SELECT `id_'.$table.'`
|
||||
FROM `'._DB_PREFIX_.$table.'` e
|
||||
WHERE e.`id_'.$table.'` = '.(int)($id_entity));
|
||||
|
||||
return isset($row['id_product']);
|
||||
}
|
||||
|
||||
@@ -2780,6 +2780,7 @@ class ProductCore extends ObjectModel
|
||||
public static function getProductsProperties($id_lang, $query_result)
|
||||
{
|
||||
$resultsArray = array();
|
||||
if(is_array($query_result))
|
||||
foreach ($query_result AS $row)
|
||||
if ($row2 = Product::getProductProperties($id_lang, $row))
|
||||
$resultsArray[] = $row2;
|
||||
|
||||
@@ -297,6 +297,14 @@ abstract class PrepaidServices extends PaymentModule
|
||||
|
||||
foreach ($this->_getAllowedCurrencies() AS $currency)
|
||||
{
|
||||
$mid = Configuration::get($this->prefix.'MERCHANT_ID_'.$currency['iso_code']);
|
||||
$certificateExiste = '';
|
||||
$passwordExist = '';
|
||||
if (file_exists($this->certificat_dir.$mid.'.pem'))
|
||||
$certificateExiste = '<div style="color:#00b511; text-align:center;">'.$this->l('A certificate has been found for this configuration').' : '.$mid.'.pem'.'</div><br />';
|
||||
if (Configuration::get($this->prefix.'KEYRING_PW_'.$currency['iso_code']))
|
||||
$passwordExist = '<div style="color:#00b511; text-align:center;">'.$this->l('A password has already been saved');
|
||||
|
||||
$currencies_configuration .= '
|
||||
<tr>
|
||||
<td class="currency_label">'.$this->getL('configuration_in').' '.$currency['name'].' '.$currency['sign'].'</td>
|
||||
@@ -310,10 +318,12 @@ abstract class PrepaidServices extends PaymentModule
|
||||
<div class="margin-form">
|
||||
<input type="file" name="ct_keyring_certificate_'.$currency['iso_code'].'" />
|
||||
</div>
|
||||
'.$certificateExiste.'
|
||||
<label>'.$this->getL('keyring_pw').'</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="ct_keyring_pw_'.$currency['iso_code'].'" value="'.Tools::htmlentitiesUTF8(Configuration::get($this->prefix.'KEYRING_PW_'.$currency['iso_code'])).'"/>
|
||||
<input type="password" name="ct_keyring_pw_'.$currency['iso_code'].'" value=""/>
|
||||
</div>
|
||||
'.$passwordExist.'
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
@@ -511,6 +521,11 @@ abstract class PrepaidServices extends PaymentModule
|
||||
$mid = trim(Tools::getValue('ct_merchant_id_'.$currency['iso_code']));
|
||||
|
||||
Configuration::updateValue($this->prefix.'MERCHANT_ID_'.$currency['iso_code'], $mid);
|
||||
|
||||
$pass = Tools::getValue('ct_keyring_pw_'.$currency['iso_code']);
|
||||
if (!empty($pass))
|
||||
Configuration::updateValue($this->prefix.'KEYRING_PW_'.$currency['iso_code'], Tools::getValue('ct_keyring_pw_'.$currency['iso_code']));
|
||||
|
||||
Configuration::updateValue($this->prefix.'KEYRING_PW_'.$currency['iso_code'], Tools::getValue('ct_keyring_pw_'.$currency['iso_code']));
|
||||
|
||||
if (isset($_FILES['ct_keyring_certificate_'.$currency['iso_code']]))
|
||||
@@ -556,7 +571,7 @@ abstract class PrepaidServices extends PaymentModule
|
||||
'payment_name' => $this->displayName,
|
||||
'module_name' => $this->name));
|
||||
|
||||
return $this->display(__FILE__, 'payment.tpl');
|
||||
return $this->display(dirname(__FILE__), 'payment.tpl');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -71,7 +71,9 @@ class PrepaidServicesAPI
|
||||
$data_array = explode("\n", $data,7);
|
||||
$resultcode = trim($data_array[0]);
|
||||
$errorcode = trim($data_array[1]);
|
||||
$errormessage = trim($data_array[2]);
|
||||
//$errormessage = trim($data_array[2]);
|
||||
// Todo : Find a way to have translation
|
||||
$errormessage = 'Transaction could not be initiated due to connection problems. If the problem persists, please contact our support.';
|
||||
|
||||
return array($resultcode, $errorcode, $errormessage);
|
||||
}
|
||||
@@ -155,8 +157,10 @@ class PrepaidServicesAPI
|
||||
$dataarray=explode("\n", $data,7);
|
||||
$resultcode=trim($dataarray[0]);
|
||||
$errorcode=trim($dataarray[1]);
|
||||
$errormessage=trim($dataarray[2]);
|
||||
//$errormessage=trim($dataarray[2]);
|
||||
|
||||
$errormessage = 'The transaction could not be completed. This may have happened due to a temporary connection problem.'.
|
||||
' Please press the "reload" button in your browser or the link below to reload this page to retry completing your transaction. ';
|
||||
return array ($resultcode, $errorcode, $errormessage);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -12,9 +12,6 @@ $_MODULE['<{cashticket}prestashop>cashticket-confirmation_2c987f462c2ab7fc63e061
|
||||
$_MODULE['<{cashticket}prestashop>cashticket-confirmation_e6dc7945b557a1cd949bea92dd58963e'] = 'Il tuo ordine verrà inviato al più presto.';
|
||||
$_MODULE['<{cashticket}prestashop>cashticket-confirmation_0db71da7150c27142eef9d22b843b4a9'] = 'Per eventuali domande o per ulteriori informazioni, contatta la nostra';
|
||||
$_MODULE['<{cashticket}prestashop>cashticket-confirmation_64430ad2835be8ad60c59e7d44e4b0b1'] = 'assistenza clienti';
|
||||
$_MODULE['<{cashticket}prestashop>disposition-error_393988def796f78c4b673b90548f3afa'] = 'Stato della disposizione non valido';
|
||||
$_MODULE['<{cashticket}prestashop>disposition-error_5db89f2bf67f2c7dbd86cac101c3c1b8'] = '. Non sei autorizzato ad effettuare il pagamento.';
|
||||
$_MODULE['<{cashticket}prestashop>payment_da9c72b9e543135f3f59e3c8ac68ef35'] = 'Paga con';
|
||||
$_MODULE['<{cashticket}prestashop>cashticket_4512bbd48918c03027387a6c8e911342'] = 'CashTicket';
|
||||
$_MODULE['<{cashticket}prestashop>cashticket_21d3d890383dc93343ce57c221ce5b3d'] = 'Si accettano pagamenti tramite CashTicket';
|
||||
$_MODULE['<{cashticket}prestashop>cashticket_bed51f5187d4bf98e08f44d93f3098d9'] = 'Disposizione creata. In attesa di addebito.';
|
||||
@@ -49,5 +46,6 @@ $_MODULE['<{cashticket}prestashop>cashticket_d929c5e5e5643c622400e837914206da']
|
||||
$_MODULE['<{cashticket}prestashop>cashticket_d59048f21fd887ad520398ce677be586'] = 'Per saperne di più';
|
||||
$_MODULE['<{cashticket}prestashop>cashticket_930320ced1b8c376237844049b570a7f'] = 'Si verificato un errore, controlla i messaggi per maggiori informazioni';
|
||||
$_MODULE['<{cashticket}prestashop>cashticket_a9ced76f2dd6907220fa95b3a136b04a'] = 'Importo non valido';
|
||||
|
||||
?>
|
||||
$_MODULE['<{cashticket}prestashop>disposition-error_393988def796f78c4b673b90548f3afa'] = 'Stato della disposizione non valido';
|
||||
$_MODULE['<{cashticket}prestashop>disposition-error_5db89f2bf67f2c7dbd86cac101c3c1b8'] = '. Non sei autorizzato ad effettuare il pagamento.';
|
||||
$_MODULE['<{cashticket}prestashop>payment_da9c72b9e543135f3f59e3c8ac68ef35'] = 'Paga con';
|
||||
|
||||
@@ -1009,7 +1009,7 @@ class eBayRequest
|
||||
{
|
||||
$id_product = Db::getInstance()->getValue('
|
||||
SELECT `id_product` FROM `'._DB_PREFIX_.'product`
|
||||
WHERE `reference` = \''.pSQL((string)$transaction->item->SKU).'\' OR `reference` = \''.pSQL((string)$transaction->item->CustomLabel).'\'
|
||||
WHERE `reference` = \''.pSQL((string)$transaction->item->SKU).'\' OR `reference` = \''.pSQL((string)$transaction->item->CustomLabel).'\' OR `reference` = \''.pSQL((string)$transaction->SellingManagerProductDetails->CustomLabel).'\'
|
||||
OR `reference` = \''.pSQL((string)$transaction->Variation->SKU).'\' OR `reference` = \''.pSQL((string)$transaction->Variation->CustomLabel).'\'');
|
||||
if ((int)$id_product > 0)
|
||||
$itemList[] = array('id_product' => $id_product, 'quantity' => $quantity, 'price' => (string)$transaction->TransactionPrice);
|
||||
@@ -1017,7 +1017,7 @@ class eBayRequest
|
||||
{
|
||||
$row = Db::getInstance()->getValue('
|
||||
SELECT `id_product`, `id_product_attribute` FROM `'._DB_PREFIX_.'product_attribute`
|
||||
WHERE `reference` = \''.pSQL((string)$transaction->item->SKU).'\' OR `reference` = \''.pSQL((string)$transaction->item->CustomLabel).'\'
|
||||
WHERE `reference` = \''.pSQL((string)$transaction->item->SKU).'\' OR `reference` = \''.pSQL((string)$transaction->item->CustomLabel).'\' OR `reference` = \''.pSQL((string)$transaction->SellingManagerProductDetails->CustomLabel).'\'
|
||||
OR `reference` = \''.pSQL((string)$transaction->Variation->SKU).'\' OR `reference` = \''.pSQL((string)$transaction->Variation->CustomLabel).'\'');
|
||||
if ((int)$row['id_product'] > 0)
|
||||
$itemList[] = array('id_product' => $row['id_product'], 'id_product_attribute' => $row['id_product_attribute'], 'quantity' => $quantity, 'price' => (string)$transaction->TransactionPrice);
|
||||
|
||||
@@ -90,6 +90,13 @@ class Ebay extends Module
|
||||
if (!Configuration::get('EBAY_SECURITY_TOKEN'))
|
||||
Configuration::updateValue('EBAY_SECURITY_TOKEN', Tools::passwdGen(30));
|
||||
|
||||
/* For 1.4.3 and less compatibility */
|
||||
$updateConfig = array('PS_OS_CHEQUE', 'PS_OS_PAYMENT', 'PS_OS_PREPARATION', 'PS_OS_SHIPPING', 'PS_OS_CANCELED', 'PS_OS_REFUND', 'PS_OS_ERROR', 'PS_OS_OUTOFSTOCK', 'PS_OS_BANKWIRE', 'PS_OS_PAYPAL', 'PS_OS_WS_PAYMENT');
|
||||
if (!Configuration::get('PS_OS_PAYMENT'))
|
||||
foreach ($updateConfig as $u)
|
||||
if (!Configuration::get($u) && defined('_'.$u.'_'))
|
||||
Configuration::updateValue($u, constant('_'.$u.'_'));
|
||||
|
||||
// Check if installed
|
||||
if (self::isInstalled($this->name))
|
||||
{
|
||||
@@ -311,7 +318,7 @@ class Ebay extends Module
|
||||
if (Configuration::get('EBAY_ORDER_LAST_UPDATE') < date('Y-m-d', strtotime('-45 minutes')).'T'.date('H:i:s', strtotime('-45 minutes')).'.000Z')
|
||||
{
|
||||
$ebay = new eBayRequest();
|
||||
$orderList = $ebay->getOrders(date('Y-m-d', strtotime('-90 days')).'T'.date('H:i:s', strtotime('-45 minutes')).'.000Z', $dateNew);
|
||||
$orderList = $ebay->getOrders(date('Y-m-d', strtotime('-30 days')).'T'.date('H:i:s', strtotime('-30 days')).'.000Z', $dateNew);
|
||||
|
||||
if ($orderList)
|
||||
foreach ($orderList as $order)
|
||||
|
||||
@@ -188,8 +188,20 @@ class MRGetRelayPoint implements IMondialRelayWSMethod
|
||||
|
||||
// Clean Content
|
||||
foreach($result as &$relayPoint)
|
||||
{
|
||||
$totalEmptyFields = 0;
|
||||
foreach ($relayPoint as $key => &$value)
|
||||
{
|
||||
$value = trim($value);
|
||||
if (empty($value))
|
||||
++$totalEmptyFields;
|
||||
}
|
||||
if ($totalEmptyFields == count($relayPoint))
|
||||
{
|
||||
$errors[] = $this->_mondialRelay->l('MondialRelay can\'t find any relay point near your address. Maybe your address isn\'t properly filled ?');
|
||||
break;
|
||||
}
|
||||
}
|
||||
$success = $result;
|
||||
}
|
||||
$this->_resultList['error'] = $errors;
|
||||
|
||||
+22
-18
@@ -81,8 +81,11 @@ $_MODULE['<{mondialrelay}prestashop>mondialrelay_907eba32d950bfab68227fd7ea22999
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_0c24ec05a02c710cedd400e3680d8b81'] = 'Liste des tranporteurs';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_14039af96b01e718a9c9d9c1259b6472'] = 'Aucun transporteur créé';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_8596361cec00f8d2438d264827eee737'] = 'Modification de la configuration';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_c437cbdaa5799236b2f5b07634679e3d'] = 'Personnalisation des champs';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_0eddbda2340214e74be063ed1d1af8a0'] = 'Adresse principale';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_759e1f68a70bbe8c48eb30fa4b512de8'] = 'Il semblerait que vous venez de mettre à jour Mondial Relay sans avoir réinitialisé le module : il est requis de configurer les champs ci-dessous afin de pouvoir générer les étiquettes';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_9ffc3ccc968a96d902af963c6d7b4e97'] = 'Paramètres avancés';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_1d1d57f5840e1da871622295ba206b30'] = 'Cliquez pour afficher / cacher les options';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_bbd9bc77f1f5b6a9edce6db062b607c9'] = 'Cette partie permet de réécrire les données envoyées à Mondial Relay lorsque vous lancez le processus de génération de tickets. Certains champs sont assez restrictifs en terme de longueur ou de caractères utilisés.';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_9127fe218b2cac7f0c8aecd7016a891d'] = 'Nom de la boutique';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_7e9bbecd32836500b557db33c3b3e93b'] = 'La clé utilisée par Mondialrelay est';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_32963eea43914b6a418fb2fd9850beb9'] = 'et elle contient comme valeur par défaut';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer';
|
||||
@@ -90,13 +93,8 @@ $_MODULE['<{mondialrelay}prestashop>mondialrelay_f4f70727dc34561dfde1a3c529b6205
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_d02bbc3cb147c272b0445ac5ca7d1a36'] = 'Etat des commandes';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_818f954f4838ecad839c5dcbd287d291'] = 'Choississez le statut pour la génération d\'étiquette. Vous pouvez administrer vos étiquettes sur';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_5117e194c641ad4fc55417b554aead3c'] = 'la page d\'administration de Mondial Relay';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_235072af42d72915159f0e6c9d6a870c'] = 'Google map';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_93cba07454f06a4a960172bbd6e2a435'] = 'Oui';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_9c5c09beb32c36129b857c2a40c861b6'] = 'Affiche une Google map sur votre transporteur Mondial Relay, mais votre page de sélection du transporteur peut devenir plus lente.';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_1ba3935c9858ffb8e19a35ca640b8505'] = 'Paramètres du compte Mondial Relay';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_a125105400f6e4ee4574da3793af5ef2'] = 'Ces paramẻtres sont fournis par Mondial Relay lors de la souscription à leur service';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_12a3fbd35c1cab4b1101b91d708efd15'] = 'Enseigne Webservice:';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_6f0434b67007b555dfd1201f4e0d5254'] = 'Code marque:';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_08f785193c96b2a78dec8d76a46648d6'] = 'Clé Webservice:';
|
||||
@@ -109,6 +107,8 @@ $_MODULE['<{mondialrelay}prestashop>mondialrelay_0dbe844fb964d5eca2f51be724e4329
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_c6aefd5e2191e1210a2f50416812b517'] = 'URL du suivi';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_61e70b58e38fd01daa254f44c4fa264b'] = 'Nombre de Points Relais';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_bba366864d25056c941b72f18ef79e7c'] = 'Cette erreur n\'est pas mentionnée:';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_e0626222614bdee31951d84c64e5e9ff'] = 'Choisir';
|
||||
$_MODULE['<{mondialrelay}prestashop>mondialrelay_91b442d385b54e1418d81adc34871053'] = 'Sélectionné';
|
||||
$_MODULE['<{mondialrelay}prestashop>orderdetail_81b7b4587a2a3ea7a0d6bb1df3fbba54'] = 'Livraison à';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_a1c3470a944b9625cfb924fd15c8bdbf'] = 'Veuillez choisir au moins une commande';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé';
|
||||
@@ -120,20 +120,24 @@ $_MODULE['<{mondialrelay}prestashop>mrcreatetickets_eabb11bf9623f08409a0a4c9d035
|
||||
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_b92c3d3319314513c547675924ceecd1'] = 'URL du Ticket :';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_66b793b6b4125e300717e8cf7449f533'] = 'Url de Tracking :';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrcreatetickets_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Le webservice Mondial Relay est actuellement innaccessible.';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_14288d48d107056c1acf8aaae1bf282b'] = 'L\'adresse du client ne peut etre trouvé';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_135a7b9a62531e066a95093d8951b344'] = 'n\'a pas un format valide';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semblerai que la requete n\'est pas valide';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_c9b4de92f371ae545ad6f051c07d58ca'] = 'Il y a une erreur numéro';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détail :';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_4e274658c9e97c2a336dde79dd0a7772'] = 'MondialRelay ne peux trouver aucun point relais proche de votre adresse. Peut etre que votre adresse n\'est pas correctement rempli ?';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrgetrelaypoint_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Le webservice MondialRelay n\'est pas joignable';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrgettickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'Cette clé';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrgettickets_135a7b9a62531e066a95093d8951b344'] = 'n\'a pas un format valide';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrgettickets_e6940b76f045c8bc0aaaa5b2476cdaf7'] = 'Il semble que la requête soit invalide :';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrgettickets_c9b4de92f371ae545ad6f051c07d58ca'] = 'Erreur numéro :';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrgettickets_ea5f761be4e4888eabf4e1501d7817d1'] = 'Détails :';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrgettickets_2653c23b8c0daac59571e4be5e8fa7d0'] = 'Le webservice Mondial Relay est actuellement innaccessible.';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrmanagement_a42bb0eaa485682166770a54469385f6'] = 'Certains objets ne peuvent pas être retirés, veuillez réessayez un peu plus tard.';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrmanagement_38b4abe2f5860f034e315f2da648a3d6'] = 'Désintaller MondialRelay';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrmanagement_77bad09c976ec16f38381dc220139367'] = 'Vous allez désintaller le module : voulez vous aussi effacer les paramètres relatifs à Mondial Relay?';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrmanagement_09c081633d484a62a2f6940c12a0de36'] = 'Garder et désintaller';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrmanagement_0b7f47fce1d82d53244771c64b1535c0'] = 'Supprimer et désinstaller';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrmanagement_ea4788705e6873b424c65e91c2846b19'] = 'Annuler';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrmanagement_a42bb0eaa485682166770a54469385f6'] = 'Certaines étiquettes ne peuvent pas être supprimées : veuillez réessayer un peu plus tard.';
|
||||
$_MODULE['<{mondialrelay}prestashop>mrmanagement_11744bfebb33e52be37a66a530b7045d'] = 'Veuillez choisir au moins un élèment de l\'historique';
|
||||
$_MODULE['<{mondialrelay}prestashop>recherchedetailpointrelais_ajax_03f4a47830f97377a35321051685071e'] = 'Fermé';
|
||||
$_MODULE['<{mondialrelay}prestashop>recherchedetailpointrelais_ajax_6f8522e0610541f1ef215a22ffa66ff6'] = 'Lundi';
|
||||
$_MODULE['<{mondialrelay}prestashop>recherchedetailpointrelais_ajax_5792315f09a5d54fb7e3d066672b507f'] = 'Mardi';
|
||||
$_MODULE['<{mondialrelay}prestashop>recherchedetailpointrelais_ajax_796c163589f295373e171842f37265d5'] = 'Mercredi';
|
||||
$_MODULE['<{mondialrelay}prestashop>recherchedetailpointrelais_ajax_78ae6f0cd191d25147e252dc54768238'] = 'Jeudi';
|
||||
$_MODULE['<{mondialrelay}prestashop>recherchedetailpointrelais_ajax_c33b138a163847cdb6caeeb7c9a126b4'] = 'Vendredi';
|
||||
$_MODULE['<{mondialrelay}prestashop>recherchedetailpointrelais_ajax_8b7051187b9191cdcdae6ed5a10e5adc'] = 'Samedi';
|
||||
$_MODULE['<{mondialrelay}prestashop>recherchedetailpointrelais_ajax_9d1a0949c39e66a0cd65240bc0ac9177'] = 'Dimanche';
|
||||
$_MODULE['<{mondialrelay}prestashop>recherchedetailpointrelais_ajax_621895c388c9bb22abbbc69fad001846'] = 'Sélectionnez ce point relais';
|
||||
|
||||
@@ -516,6 +516,21 @@ function PS_MRDisplayRelayPoint(json, blockContent, carrier_id)
|
||||
}
|
||||
}
|
||||
|
||||
function PS_MRDisplayErrorRelayPoint(errorList, blockContent)
|
||||
{
|
||||
|
||||
blockContent.fadeOut('fast', function()
|
||||
{
|
||||
console.log($(this));
|
||||
$(this).children('td').html('');
|
||||
for (numError in errorList)
|
||||
{
|
||||
$('<div class="error">' + errorList[numError] + '</div>').appendTo($(this).children('td'));
|
||||
}
|
||||
$(this).fadeIn('fast');
|
||||
});
|
||||
}
|
||||
|
||||
// Fetch the relay point
|
||||
function PS_MRFetchRelayPoint(carrierSelected)
|
||||
{
|
||||
@@ -542,7 +557,9 @@ function PS_MRFetchRelayPoint(carrierSelected)
|
||||
dataType: 'json',
|
||||
success: function(json)
|
||||
{
|
||||
if (json && json.success)
|
||||
if (json && json.error && json.error.length)
|
||||
PS_MRDisplayErrorRelayPoint(json.error, $('#PS_MRSelectedCarrier_' + carrier_id));
|
||||
else if (json && json.success)
|
||||
PS_MRDisplayRelayPoint(json, $('#PS_MRSelectedCarrier_' + carrier_id), carrier_id);
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError)
|
||||
@@ -737,6 +754,7 @@ function PS_MRAddGMapMarker(id_carrier, relayPointNumber, contentBlockid)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#toggleStatusOrderList').click(function()
|
||||
@@ -755,6 +773,10 @@ $(document).ready(function()
|
||||
{
|
||||
deleteSelectedHistories();
|
||||
});
|
||||
$('#PS_MRDisplayPersonalizedOptions').click(function()
|
||||
{
|
||||
$('#PS_MRPersonalizedFields').toggle('fast');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -920,18 +920,22 @@ class MondialRelay extends Module
|
||||
|
||||
if (!Configuration::get('PS_MR_SHOP_NAME'))
|
||||
$warn .= '<div class="warn">'.
|
||||
$this->l('Its seems you updated Mondialrelay without use the uninstall / install method,
|
||||
you have to set up this part to make working the generating ticket process').
|
||||
$this->l('Its seems you updated Mondialrelay without use the uninstall / install method, you have to set up this part to make working the generating ticket process').
|
||||
'</div>';
|
||||
// Form
|
||||
$form = '<form action="'.$_SERVER['REQUEST_URI'].'" method="post" class="form">';
|
||||
$form .= '
|
||||
<fieldset class="PS_MRFormStyle">
|
||||
<legend>
|
||||
<img src="../modules/mondialrelay/images/logo.gif" />'.$this->l('Fields personalization').
|
||||
<img src="../modules/mondialrelay/images/logo.gif" />'.$this->l('Advanced Settings'). ' -
|
||||
<a href="javascript:void(0);" id="PS_MRDisplayPersonalizedOptions"><font style="color:#00b511;">'.$this->l('Click to display / hide the options').'</font> </a>'.
|
||||
'</legend>'.
|
||||
$warn.'
|
||||
<label for="PS_MR_SHOP_NAME">'.$this->l('Main Address').'</label>
|
||||
<div id="PS_MRPersonalizedFields">
|
||||
<div style="margin-bottom:20px;">
|
||||
- '.$this->l('This part allow to override the data sent at MondialRelay when you want to generate Ticket. Some fields are restricted by the length, or forbidden char').'.
|
||||
</div>
|
||||
<label for="PS_MR_SHOP_NAME">'.$this->l('Shop Name').'</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="Expe_ad1" value="'.$addr1.'" /><br />
|
||||
<p>'.$this->l('The key used by Mondialrelay is').' <b>Expe_ad1</b> '.$this->l('and has this default value').'
|
||||
@@ -941,6 +945,8 @@ class MondialRelay extends Module
|
||||
<div class="margin-form">
|
||||
<input type="submit" name="PS_MRSubmitFieldPersonalization" value="' . $this->l('Save') . '" class="button" />
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form><br />';
|
||||
return $form;
|
||||
}
|
||||
@@ -968,15 +974,7 @@ class MondialRelay extends Module
|
||||
$output .= '<a href="index.php?tab=AdminMondialRelay&token='.Tools::getAdminToken('AdminMondialRelay'.(int)(Tab::getIdFromClassName('AdminMondialRelay')).(int)$this->context->employee->id).'" class="green">'.
|
||||
$this->l('the Mondial Relay administration page').'</a></p>';
|
||||
$output .= '</div>
|
||||
<div class="clear"></div>
|
||||
<label>'.$this->l('Google Map').' </label>
|
||||
<div class="margin-form">
|
||||
<input type="radio" name="mr_google_key" id="mr_google_key_on" value="1" '.(Configuration::get('MR_GOOGLE_MAP') ? 'checked="checked" ' : '').'/>
|
||||
<label class="t" for="mr_google_key_on"><img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Yes').'" /></label>
|
||||
<input type="radio" name="mr_google_key" id="mr_google_key_off" value="0" '.(!Configuration::get('MR_GOOGLE_MAP') ? 'checked="checked" ' : '').'/>
|
||||
<label class="t" for="mr_google_key_off"><img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('No').'" /></label>
|
||||
<p>'.$this->l('Displaying a google map on your Mondial Relay carrier may make carrier page loading slower.').'</p>
|
||||
</div>';
|
||||
<div class="clear"></div>';
|
||||
$output .= '<div class="margin-form"><input type="submit" name="submit_order_state" value="' . $this->l('Save') . '" class="button" /></div>';
|
||||
$output .= '</fieldset></form><br>';
|
||||
|
||||
@@ -990,6 +988,9 @@ class MondialRelay extends Module
|
||||
<form action="' . $_SERVER['REQUEST_URI'] . '" method="post" >
|
||||
<fieldset>
|
||||
<legend><img src="../modules/mondialrelay/images/logo.gif" />'.$this->l('Mondial Relay Account Settings').'</legend>
|
||||
<div>
|
||||
- '.$this->l('These parameters are provided by Mondial Relay once you subscribed to their service').'
|
||||
</div>
|
||||
<ul>
|
||||
<li class="PS_MRRequireFields">
|
||||
<sup>* ' . $this->l('Required') . '</sup>
|
||||
|
||||
@@ -308,4 +308,9 @@ div.PS_MRGmapStyle
|
||||
width: 550px;
|
||||
height:250px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
div#PS_MRPersonalizedFields
|
||||
{
|
||||
display:none;
|
||||
}
|
||||
@@ -377,10 +377,14 @@ class MoneyBookers extends PaymentModule
|
||||
}
|
||||
$link = new Link();
|
||||
$admin_dir = substr(_PS_ADMIN_DIR_, strrpos(_PS_ADMIN_DIR_,'/') + 1);
|
||||
$iso_code = strtolower(Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT')));
|
||||
$landingPage = ($iso_code == 'en' || $iso_code == 'us') ? 'http://www.moneybookers.com/ads/partners/index.html?p=Prestashop' :
|
||||
'http://www.moneybookers.com/ads/partners/'.$iso_code.'/index.html?p=Prestashop';
|
||||
|
||||
|
||||
$output .= '
|
||||
</select>
|
||||
<p>'.$this->l('Change your logo position in the Front Office. Works with').'
|
||||
<p>'.$this->l('Change youpr logo position in the Front Office. Works with').'
|
||||
<a href="'.$link->getPageLink('index.php').'?live_edit&ad='.$admin_dir.'&liveToken='.sha1($admin_dir._COOKIE_KEY_).'">'.$this->l(' Live edit.').'</a></p>
|
||||
</div>
|
||||
<div style="text-align:center;">
|
||||
@@ -405,6 +409,10 @@ class MoneyBookers extends PaymentModule
|
||||
.tdMBR { border-left: 1px solid black; border-top: 1px solid black; border-right: 1px solid black; }
|
||||
.tdMBLast { border-top: 1px solid black; border-right: 1px solid black; }
|
||||
</style>
|
||||
|
||||
<p>'.$this->l('Fees available since March 21st 2011').'</p>
|
||||
|
||||
|
||||
<table cellpadding="2" cellspacing="0" style="width: 750px;">
|
||||
<tr><td class="tdMBL" style="background-color: grey;"><b>PrestaShop</b></td><td colspan="2" class="tdMBR" style="background-color: grey;"><b>'.$this->l('Online payment solution by Moneybookers').'</b></td></tr>
|
||||
<tr><td class="tdMBL">'.$this->l('Monthly volume for payments made via Moneybookers').'</td><td class="tdMBL">Quick Checkout Moneybookers ***</td><td class="tdMBR">Moneybookers eWallet **</td></tr>
|
||||
@@ -415,6 +423,8 @@ class MoneyBookers extends PaymentModule
|
||||
<tr><td class="tdMBL">€ 100,000</td><td class="tdMBR">1.2% + 0.19€</td></tr>
|
||||
<tr><td colspan="3" style="border-top: 1px solid black;"><small>'.$this->l('For merchants over €100,000 fees can be negotiated.').' Contact: ecommerce@moneybookers.com</small></td></tr>
|
||||
</table>
|
||||
<br />
|
||||
'.$this->l('To view the last update of the detailed fees').'<a href="'.$landingPage.'"> <b>'.$this->l('Click here').'</b></a>
|
||||
|
||||
<p align="left">
|
||||
** '.$this->l('Moneybookers eWallet').'<br />
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class Disposition
|
||||
class PSCDisposition
|
||||
{
|
||||
const TABLE_NAME = 'disposition';
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ $module_name = 'paysafecard';
|
||||
include(_PS_MODULE_DIR_.$module_name.'/Disposition.php');
|
||||
include(_PS_MODULE_DIR_.$module_name.'/PrepaidServicesAPI.php');
|
||||
|
||||
abstract class PrepaidServices extends PaymentModule
|
||||
abstract class PSCPrepaidServices extends PaymentModule
|
||||
{
|
||||
protected $max_amount = 1000;
|
||||
protected $max_amount_currency = 'EUR';
|
||||
@@ -66,7 +66,7 @@ abstract class PrepaidServices extends PaymentModule
|
||||
$ps_ct_business_type = Configuration::get($this->prefix.'BUSINESS_TYPE') ? Configuration::get($this->prefix.'BUSINESS_TYPE') : 'I';
|
||||
$ps_ct_environment = Configuration::get($this->prefix.'ENVIRONMENT') ? Configuration::get($this->prefix.'ENVIRONMENT') : 'T';
|
||||
|
||||
return parent::install() AND Disposition::createTable() AND $this->_createOrderState() AND
|
||||
return parent::install() AND PSCDisposition::createTable() AND $this->_createOrderState() AND
|
||||
$this->registerHook('payment') AND $this->registerHook('paymentReturn') AND $this->registerHook('adminOrder')
|
||||
AND Configuration::updateValue($this->prefix.'IMMEDIAT_PAYMENT', $ps_ct_immediat_payment)
|
||||
AND Configuration::updateValue($this->prefix.'SALT', $ps_ct_salt)
|
||||
@@ -180,12 +180,12 @@ abstract class PrepaidServices extends PaymentModule
|
||||
$ok_url = Tools::getShopDomainSsl(true, true)._MODULE_DIR_.$this->name.'/payment.php?hash='.$hash;
|
||||
$nok_url = Tools::getShopDomainSsl(true, true).'index.php?controller=order&step=3';
|
||||
|
||||
list($return_code, $error_code, $message) = PrepaidServicesAPI::createDisposition($this->getAPIConfiguration($currency_iso), $mid, $mtid, $amount, $currency_iso, $ok_url, $nok_url, $business_type, $reporting_criteria);
|
||||
list($return_code, $error_code, $message) = PSCPrepaidServicesAPI::createDisposition($this->getAPIConfiguration($currency_iso), $mid, $mtid, $amount, $currency_iso, $ok_url, $nok_url, $business_type, $reporting_criteria);
|
||||
|
||||
if ($return_code == 0)
|
||||
{
|
||||
Disposition::deleteByCartId((int)($cart->id)); // Avoid duplicate disposition (canceled orders in CT for example)
|
||||
Disposition::create((int)($cart->id), $mtid, $amount, $currency_iso);
|
||||
PSCDisposition::deleteByCartId((int)($cart->id)); // Avoid duplicate disposition (canceled orders in CT for example)
|
||||
PSCDisposition::create((int)($cart->id), $mtid, $amount, $currency_iso);
|
||||
$message = $this->getPaymentUrlBase().'?currency='.$currency->iso_code.'&mid='.$mid.'&mtid='.$mtid.'&amount='.$amount.'&language='.$language;
|
||||
}
|
||||
|
||||
@@ -194,31 +194,31 @@ abstract class PrepaidServices extends PaymentModule
|
||||
|
||||
public function getDispositionState($id_cart)
|
||||
{
|
||||
$disposition = Disposition::getByCartId((int)($id_cart));
|
||||
$disposition = PSCDisposition::getByCartId((int)($id_cart));
|
||||
|
||||
if (!array_key_exists('id_disposition', $disposition))
|
||||
die(Tools::displayError());
|
||||
|
||||
return PrepaidServicesAPI::getSerialNumbers($this->getAPIConfiguration($disposition['currency']), Configuration::get($this->prefix.'MERCHANT_ID_'.$disposition['currency']), $disposition['mtid'], $disposition['currency']);
|
||||
return PSCPrepaidServicesAPI::getSerialNumbers($this->getAPIConfiguration($disposition['currency']), Configuration::get($this->prefix.'MERCHANT_ID_'.$disposition['currency']), $disposition['mtid'], $disposition['currency']);
|
||||
}
|
||||
|
||||
public function executeDebit($id_cart, $amount = NULL, $close_flag = 1)
|
||||
{
|
||||
$disposition = Disposition::getByCartId((int)($id_cart));
|
||||
$disposition = PSCDisposition::getByCartId((int)($id_cart));
|
||||
if (!array_key_exists('id_disposition', $disposition))
|
||||
die(Tools::displayError());
|
||||
|
||||
if (!isset($amount) || $amount === '')
|
||||
$amount = $disposition['amount'];
|
||||
|
||||
$result = PrepaidServicesAPI::executeDebit($this->getAPIConfiguration($disposition['currency']), Configuration::get($this->prefix.'MERCHANT_ID_'.$disposition['currency']), $disposition['mtid'], number_format($amount, 2, '.', ''), $disposition['currency'], $close_flag);
|
||||
$result = PSCPrepaidServicesAPI::executeDebit($this->getAPIConfiguration($disposition['currency']), Configuration::get($this->prefix.'MERCHANT_ID_'.$disposition['currency']), $disposition['mtid'], number_format($amount, 2, '.', ''), $disposition['currency'], $close_flag);
|
||||
|
||||
if ($result[0] == 0)
|
||||
{
|
||||
if ($amount == $disposition['amount'] || $close_flag)
|
||||
Disposition::delete((int)($disposition['id_disposition']));
|
||||
PSCDisposition::delete((int)($disposition['id_disposition']));
|
||||
else
|
||||
Disposition::updateAmount((int)($disposition['id_disposition']), (float)($amount));
|
||||
PSCDisposition::updateAmount((int)($disposition['id_disposition']), (float)($amount));
|
||||
}
|
||||
|
||||
return $result;
|
||||
@@ -296,6 +296,14 @@ abstract class PrepaidServices extends PaymentModule
|
||||
|
||||
foreach ($this->_getAllowedCurrencies() AS $currency)
|
||||
{
|
||||
$mid = Configuration::get($this->prefix.'MERCHANT_ID_'.$currency['iso_code']);
|
||||
$certificateExiste = '';
|
||||
$passwordExist = '';
|
||||
if (file_exists($this->certificat_dir.$mid.'.pem'))
|
||||
$certificateExiste = '<div style="color:#00b511; text-align:center;">'.$this->l('A certificate has been found for this configuration').' : '.$mid.'.pem'.'</div><br />';
|
||||
if (Configuration::get($this->prefix.'KEYRING_PW_'.$currency['iso_code']))
|
||||
$passwordExist = '<div style="color:#00b511; text-align:center;">'.$this->l('A password has already been saved');
|
||||
|
||||
$currencies_configuration .= '
|
||||
<tr>
|
||||
<td class="currency_label">'.$this->getL('configuration_in').' '.$currency['name'].' '.$currency['sign'].'</td>
|
||||
@@ -309,10 +317,12 @@ abstract class PrepaidServices extends PaymentModule
|
||||
<div class="margin-form">
|
||||
<input type="file" name="ct_keyring_certificate_'.$currency['iso_code'].'" />
|
||||
</div>
|
||||
'.$certificateExiste.'
|
||||
<label>'.$this->getL('keyring_pw').'</label>
|
||||
<div class="margin-form">
|
||||
<input type="password" name="ct_keyring_pw_'.$currency['iso_code'].'" value=""/>
|
||||
</div>
|
||||
'.$passwordExist.'
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
@@ -509,6 +519,8 @@ abstract class PrepaidServices extends PaymentModule
|
||||
$mid = trim(Tools::getValue('ct_merchant_id_'.$currency['iso_code']));
|
||||
|
||||
Configuration::updateValue($this->prefix.'MERCHANT_ID_'.$currency['iso_code'], $mid);
|
||||
$pass = Tools::getValue('ct_keyring_pw_'.$currency['iso_code']);
|
||||
if (!empty($pass))
|
||||
Configuration::updateValue($this->prefix.'KEYRING_PW_'.$currency['iso_code'], Tools::getValue('ct_keyring_pw_'.$currency['iso_code']));
|
||||
|
||||
if (isset($_FILES['ct_keyring_certificate_'.$currency['iso_code']]))
|
||||
@@ -578,16 +590,16 @@ abstract class PrepaidServices extends PaymentModule
|
||||
if ($order->module != $this->name)
|
||||
return false;
|
||||
|
||||
$disposition = Disposition::getByCartId((int)($order->id_cart));
|
||||
$disposition = PSCDisposition::getByCartId((int)($order->id_cart));
|
||||
if (!$disposition) // No disposition = Order paid
|
||||
return false;
|
||||
|
||||
// check disposition state
|
||||
$res = PrepaidServicesAPI::getSerialNumbers($this->getAPIConfiguration($disposition['currency']), Configuration::get($this->prefix.'MERCHANT_ID_'.$disposition['currency']), $disposition['mtid'], $disposition['currency']);
|
||||
$res = PSCPrepaidServicesAPI::getSerialNumbers($this->getAPIConfiguration($disposition['currency']), Configuration::get($this->prefix.'MERCHANT_ID_'.$disposition['currency']), $disposition['mtid'], $disposition['currency']);
|
||||
$currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
|
||||
|
||||
// if the disposition is not "active"
|
||||
if ($res[5] != PrepaidServicesAPI::DISPOSITION_DISPOSED && $res[5] != PrepaidServicesAPI::DISPOSITION_DEBITED)
|
||||
if ($res[5] != PSCPrepaidServicesAPI::DISPOSITION_DISPOSED && $res[5] != PSCPrepaidServicesAPI::DISPOSITION_DEBITED)
|
||||
{
|
||||
$this->context->smarty->assign(array('disposition_state' => $res[5], 'payment_name' => $order->payment));
|
||||
return $this->display($this->module_dir.'/'.$this->name, 'disposition-error.tpl');
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class PrepaidServicesAPI
|
||||
class PSCPrepaidServicesAPI
|
||||
{
|
||||
const DISPOSITION_CREATED = 'R';
|
||||
const DISPOSITION_DISPOSED = 'S';
|
||||
@@ -70,8 +70,9 @@ class PrepaidServicesAPI
|
||||
$data_array = explode("\n", $data,7);
|
||||
$resultcode = trim($data_array[0]);
|
||||
$errorcode = trim($data_array[1]);
|
||||
$errormessage = trim($data_array[2]);
|
||||
|
||||
//$errormessage = trim($data_array[2]);
|
||||
// Todo : Find a way to have translation
|
||||
$errormessage = 'Transaction could not be initiated due to connection problems. If the problem persists, please contact our support.';
|
||||
return array($resultcode, $errorcode, $errormessage);
|
||||
} else {
|
||||
$resultcode = '9001';
|
||||
@@ -145,8 +146,10 @@ class PrepaidServicesAPI
|
||||
$dataarray=explode("\n", $data,7);
|
||||
$resultcode=trim($dataarray[0]);
|
||||
$errorcode=trim($dataarray[1]);
|
||||
$errormessage=trim($dataarray[2]);
|
||||
//$errormessage=trim($dataarray[2]);
|
||||
|
||||
$errormessage = 'The transaction could not be completed. This may have happened due to a temporary connection problem.'.
|
||||
' Please press the "reload" button in your browser or the link below to reload this page to retry completing your transaction. ';
|
||||
return array ($resultcode, $errorcode, $errormessage);
|
||||
} else {
|
||||
$resultcode = '9001';
|
||||
|
||||
@@ -49,5 +49,3 @@ $_MODULE['<{paysafecard}prestashop>paysafecard_315e941f57cf90350aea15d968e190f8'
|
||||
$_MODULE['<{paysafecard}prestashop>paysafecard_d59048f21fd887ad520398ce677be586'] = 'Per saperne di più';
|
||||
$_MODULE['<{paysafecard}prestashop>paysafecard_ee363d108ef0c9c5a599d3afe04b9e32'] = 'Si è verificato un errore, controlla Messaggi per maggiori informazioni';
|
||||
$_MODULE['<{paysafecard}prestashop>paysafecard_a9ced76f2dd6907220fa95b3a136b04a'] = 'Importo non valido';
|
||||
|
||||
?>
|
||||
@@ -27,10 +27,9 @@
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
exit;
|
||||
|
||||
if (!in_array('PrepaidServices', get_declared_classes())) include_once(_PS_MODULE_DIR_.'paysafecard/PrepaidServices.php');
|
||||
include_once(_PS_MODULE_DIR_.'paysafecard/PrepaidServices.php');
|
||||
|
||||
|
||||
class PaysafeCard extends PrepaidServices
|
||||
class PaysafeCard extends PSCPrepaidServices
|
||||
{
|
||||
public $prefix = 'PS_PSC_';
|
||||
protected $supported_languages = array('de', 'en', 'gr', 'el', 'es', 'it', 'fr', 'nl', 'pl', 'pt', 'si', 'sk', 'tr');
|
||||
|
||||
@@ -28,6 +28,6 @@
|
||||
include(dirname(__FILE__).'/../../config/config.inc.php');
|
||||
require_once(dirname(__FILE__).'/sendtoafriend.php');
|
||||
|
||||
$sendtoafriend = new sendToAFriend($dontTranslate = true);
|
||||
$sendtoafriend = new sendToAFriend();
|
||||
echo $sendtoafriend->displayPageForm();
|
||||
|
||||
|
||||
@@ -1,232 +0,0 @@
|
||||
<?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: 6844 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
class Tm4bSms {
|
||||
|
||||
const __TM4B_SMS_HTTP_HOST__ = 'www.tm4b.com';
|
||||
const __TM4B_SMS_HTTP_SERVICE__ = '/client/api/http.php';
|
||||
const __TM4B_SMS_HTTP_METHOD__ = 'GET';
|
||||
const __TM4B_SMS_MESSAGE_TYPE__ = 'broadcast';
|
||||
|
||||
const __TM4B_SMS_CHECKBALANCE_TYPE__ = 'check_balance';
|
||||
const __TM4B_SMS_CHECKROUTE_TYPE__ = 'check_destination';
|
||||
const __TM4B_SMS_CHECKSTATUS_TYPE__ = 'check_status';
|
||||
|
||||
|
||||
// Keep the Query String for HTTP
|
||||
private $_httpQS = '';
|
||||
|
||||
public $msg;
|
||||
private $_to = array();
|
||||
|
||||
private $errors;
|
||||
private $_user;
|
||||
private $_pass;
|
||||
private $_route;
|
||||
private $_from;
|
||||
|
||||
private $_id;
|
||||
|
||||
function __construct($user, $pass, $route, $from = 'tm4b', $to = array(), $message = '')
|
||||
{
|
||||
$this->msg = $message;
|
||||
$this->_user = $user;
|
||||
$this->_pass = $pass;
|
||||
$this->_route = $route;
|
||||
$this->_from = $from;
|
||||
|
||||
foreach ($to as $num)
|
||||
{
|
||||
$this->addRecipient($num);
|
||||
}
|
||||
$this->_id = array(); // identifier of the sent sms
|
||||
}
|
||||
|
||||
|
||||
// Build the query string for HTTP
|
||||
private function BuildQS($args)
|
||||
{
|
||||
$qs = '';
|
||||
$countArgs = 1;
|
||||
foreach ($args as $key => $value)
|
||||
{
|
||||
if (is_array($value))
|
||||
{
|
||||
$countTo = 1;
|
||||
$qs .= $key . '=';
|
||||
foreach ($value as $index => $recipient)
|
||||
{
|
||||
if ($key == 'id')
|
||||
$qs .= $recipient;
|
||||
else
|
||||
$qs .= urlencode($recipient);
|
||||
|
||||
if ($countTo < sizeof($value))
|
||||
$qs .= '|';
|
||||
$countTo++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$qs .= $key . '=' . urlencode($value);
|
||||
}
|
||||
|
||||
if ($countArgs < sizeof($args))
|
||||
$qs .= '&';
|
||||
$countArgs++;
|
||||
}
|
||||
return $qs;
|
||||
}
|
||||
|
||||
// Send a HTTP Queries through sockets
|
||||
private function SendSocketHTTP()
|
||||
{
|
||||
// init infos
|
||||
if( self::__TM4B_SMS_HTTP_METHOD__ == "GET")
|
||||
{
|
||||
$script = self::__TM4B_SMS_HTTP_SERVICE__ . '?' . $this->_httpQS;
|
||||
}
|
||||
else
|
||||
{
|
||||
$script = self::__TM4B_SMS_HTTP_SERVICE__ ;
|
||||
}
|
||||
|
||||
|
||||
// Build HTTP Header
|
||||
$header = self::__TM4B_SMS_HTTP_METHOD__ . " " . $script . " HTTP/1.1\r\n";
|
||||
$header .= "Host: " . self::__TM4B_SMS_HTTP_HOST__ . "\r\n";
|
||||
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
|
||||
$header .= "Content-Length: " . Tools::strlen($this->_httpQS) . "\r\n";
|
||||
$header .= "Connection: close\r\n\r\n";
|
||||
$header .= $this->_httpQS . "\r\n";
|
||||
|
||||
// Socket connection
|
||||
$socket = fsockopen( self::__TM4B_SMS_HTTP_HOST__ , 80, $errno, $errstr);
|
||||
|
||||
if($socket) // if we're connected
|
||||
{
|
||||
fputs($socket, $header); // Send header
|
||||
while(!feof($socket))
|
||||
{
|
||||
$response[] = fgets($socket); // Grab return codes
|
||||
}
|
||||
fclose($socket);
|
||||
}
|
||||
else
|
||||
{
|
||||
$response = false;
|
||||
}
|
||||
return ($response);
|
||||
}
|
||||
|
||||
|
||||
#############################################################
|
||||
#
|
||||
# PUBLIC METHODS
|
||||
#
|
||||
#############################################################
|
||||
|
||||
// Add a recipent
|
||||
public function AddRecipient($to, $country_code = NULL)
|
||||
{
|
||||
if ($country_code)
|
||||
$to = preg_replace('/^0/', $country_code, $to);
|
||||
array_push($this->_to, $to);
|
||||
}
|
||||
|
||||
// Returns the current balance of the account in credits
|
||||
public function CheckCredits()
|
||||
{
|
||||
$this->_httpQS = $this->BuildQS( array( 'username' => $this->_user,
|
||||
'password' => $this->_pass,
|
||||
'type' => self::__TM4B_SMS_CHECKBALANCE_TYPE__) );
|
||||
$response = $this->SendSocketHTTP();
|
||||
if (isset($response[8]))
|
||||
return $response[8];
|
||||
return '';
|
||||
}
|
||||
|
||||
// Return the cost to send sms to a given country or number
|
||||
public function CheckRoute()
|
||||
{
|
||||
$this->_httpQS = $this->BuildQS( array ( 'username' => $this->_user,
|
||||
'password' => $this->_pass,
|
||||
'type' => self::__TM4B_SMS_CHECKROUTE_TYPE__,
|
||||
'dest' => $this->to,
|
||||
'route' => $this->_route ) );
|
||||
return ($this->SendSocketHTTP());
|
||||
}
|
||||
|
||||
// Send SMS trought various possible methods (SMTP / HTTP)
|
||||
public function Send($sim = 'no')
|
||||
{
|
||||
// Return if we can't send the sms
|
||||
if (empty($this->msg) OR empty($this->_to))
|
||||
return false;
|
||||
|
||||
$sim = ($sim == '0' ? 'no' : 'yes');
|
||||
|
||||
$this->_httpQS = $this->BuildQS( array (
|
||||
'username' => $this->_user,
|
||||
'password' => $this->_pass,
|
||||
'type' => self::__TM4B_SMS_MESSAGE_TYPE__,
|
||||
'to' => $this->_to,
|
||||
'route' => $this->_route,
|
||||
'from' => $this->_from,
|
||||
'msg' => $this->msg,
|
||||
'sim' => $sim
|
||||
)
|
||||
);
|
||||
$ret = $this->SendSocketHTTP();
|
||||
if (is_array($ret))
|
||||
{
|
||||
$this->_id = $ret[8];
|
||||
return $ret[8];
|
||||
}
|
||||
else
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public function isSent()
|
||||
{
|
||||
if (isset($this->_id) AND preg_match('/^MT.*/', $this->_id))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public function CheckStatus()
|
||||
{
|
||||
$this->_httpQS = $this->BuildQS( array (
|
||||
$this->_user,
|
||||
'password' => $this->_pass,
|
||||
'type' => self::__TM4B_SMS_CHECKSTATUS_TYPE__,
|
||||
'id' => $this->_id )
|
||||
);
|
||||
echo 'QS = '.$this->_httpQS."\n";
|
||||
return $this->SendSocketHTTP();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 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/osl-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$
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>tm4b</name>
|
||||
<displayName><![CDATA[SMS Tm4b]]></displayName>
|
||||
<version><![CDATA[1.1]]></version>
|
||||
<description><![CDATA[Sends an SMS for each new order]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[administration]]></tab>
|
||||
<confirmUninstall>Are you sure you want to delete your info?</confirmUninstall>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>0</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
</module>
|
||||
@@ -1,51 +0,0 @@
|
||||
<?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: 7040 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
include(dirname(__FILE__).'/../../config/config.inc.php');
|
||||
include(dirname(__FILE__).'/../../init.php');
|
||||
include(dirname(__FILE__).'/tm4b.php');
|
||||
include(dirname(__FILE__).'/classes/Tm4bSms.php');
|
||||
|
||||
$module = new Tm4b();
|
||||
if (Tools::getValue('token') != $module->token)
|
||||
exit;
|
||||
|
||||
if (!Configuration::get('TM4B_DAILY_REPORT_ACTIVE'))
|
||||
die ('Daily report not active');
|
||||
if (Configuration::get('TM4B_LAST_REPORT') == date('Y-m-d'))
|
||||
die ('Report already sent');
|
||||
Configuration::updateValue('TM4B_LAST_REPORT', date('Y-m-d'));
|
||||
|
||||
$sms = new Tm4bSms(Configuration::get('TM4B_USER'), Configuration::get('TM4B_PASSWORD'), Configuration::get('TM4B_ROUTE'));
|
||||
$sms->msg = $module->getStatsBody();
|
||||
$numbers = explode(',', Configuration::get('TM4B_NEW_ORDER_NUMBERS'));
|
||||
foreach ($numbers as $number)
|
||||
if ($number != '')
|
||||
$sms->addRecipient($number);
|
||||
$sms->Send(Configuration::get('TM4B_SIM'));
|
||||
die ('OK');
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_599f02a21a8d80cfa87a3a42f9aef067'] = 'Sendet eine SMS bei jeder neuen Bestellung';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_2c8be96b677dc6b891a343193822fea4'] = 'Sie sind sicher, dass Sie Ihre Daten löschen möchten?';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_088d3bfa945e4c27ac0fea363bb13d12'] = 'Nachricht erfolgreich gesendet';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_0cda570a27de3fbd0940da019f759721'] = 'Fehler beim Senden der Nachricht';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_884b60418e2f1f9a6a40f12e8ca0a64d'] = 'Login und Telefonnummer';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_a82be0f551b8708bc08eb33cd9ded0cf'] = 'Information';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_8b58aafd28dcaee7f6e92442c96e31db'] = 'Schicken Sie eine Test-SMS:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_43e9e66e3a7acefd0663287c95acd407'] = 'Geben Sie Ihre Telefonnummer ein';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_35ba634a7df95f937550c54b7b94d2c5'] = 'z.B.: 33642424242';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_2e1779891f69b099b16616ae7ea2e76c'] = 'SMS-Guthaben:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_00db7aae85aecb79c75afca7daa8f22e'] = 'Sie haben';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_928735d6f2c63bee316dd511c8ccaf55'] = 'Guthaben';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_f4f70727dc34561dfde1a3c529b6205c'] = 'Einstellungen';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_cac81c648846c9b8c3e6085a45782c7e'] = 'Benutzername:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_b341a59d5636ed3d6a819137495b08a0'] = 'Kennwort:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_6c47d739c79e0f93ec0cd90663a68ebf'] = 'Relais:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_43e7396afc9f4633157a47bf5f5af96c'] = 'SMS Absendertelefonnr.';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_1ee1c44c2dc81681f961235604247b81'] = 'Modus:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_4f502b57d2835715eaa382c7d4c32e94'] = 'Simulation';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_756d97bb256b8580d4d71ee0c547804e'] = 'Betrieb';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_ea24be6a78dd661afe60448e87b75065'] = 'Benachrichtigungen über neue Bestellung:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_93cba07454f06a4a960172bbd6e2a435'] = 'Ja';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_7b357f8e4b60349aeba339f3032e4a84'] = 'SMS schicken, wenn eine neue Bestellung gemacht wird';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_ff914fecb4b37bd6edb2e4515ec1d4dc'] = 'Benachrichtigungen zur Produktmenge:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_2ed5f5c1670d557c67c958d1f230cb2c'] = 'SMS schicken, wenn die Produktmenge aktualisiert wird';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_d0759ad8efa7234c0f9b919f9ec88c2b'] = 'Tagesbericht:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_a5d859ac85a50ed9d8b6d93be6abd217'] = 'Senden Sie einen täglichen Statistikbericht - Sie müssen einen CRON einstellen auf';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_481bfc100d0a3590edb72f53679e310c'] = 'SMS-Empfänger-Telefonnr.';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_b17f3f4dcf653a5776792498a9b44d6a'] = 'Einstellungen aktualisiert';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_c888438d14855d7d96a2724ee9c306bd'] = 'Einstellungen aktualisiert';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_b1a293b0efa4e1e7c35ef375c3cd7a44'] = 'Benutzername ist obligatorisch';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_8c194fef39e0d251494686926884733e'] = 'Kennwort ist obligatorisch';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_6ac6840e86a7b09bf9eb326228060981'] = 'Root ist obligatorisch';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_486493b98a473ebb777dd86bbf264e06'] = 'Herkunft ist obligatorisch';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_30c94c563402b0a87e4b5411518ab542'] = 'Modus ist obligatorisch';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_aea21c9ea4f10d22071eb479eee918c3'] = 'Bitte geben Sie eine Telefonnummer ein';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_713569f69019a591adfda481f6668a06'] = 'Telefonnummer ungültig';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_8394f2c720f3798ff8ef93fe7e331866'] = 'Bestellungen:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_ec3e48bb9aa902ba2ad608547fdcbfdc'] = 'Verkäufe:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_01411a97818b38fc6524d56590ca5a12'] = 'Monat:';
|
||||
@@ -1,4 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
@@ -1,46 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_599f02a21a8d80cfa87a3a42f9aef067'] = 'Enviar un SMS para cada nuevo pedido';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_2c8be96b677dc6b891a343193822fea4'] = '¿Está seguro de querer eliminar toda su información?';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_088d3bfa945e4c27ac0fea363bb13d12'] = 'Mensaje enviado correctamente';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_0cda570a27de3fbd0940da019f759721'] = 'error durante el envío del mensaje';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_884b60418e2f1f9a6a40f12e8ca0a64d'] = 'Login y número de teléfono';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_a82be0f551b8708bc08eb33cd9ded0cf'] = 'Información';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_8b58aafd28dcaee7f6e92442c96e31db'] = 'Probar envío de SMS';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_43e9e66e3a7acefd0663287c95acd407'] = 'Introduzca su número de teléfono';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_35ba634a7df95f937550c54b7b94d2c5'] = 'ej: 33642424242rnrn';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_2e1779891f69b099b16616ae7ea2e76c'] = 'crédito SMS';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_00db7aae85aecb79c75afca7daa8f22e'] = 'Tiene';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_928735d6f2c63bee316dd511c8ccaf55'] = 'de crédito';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_466f8189c781f6e003d6a2a9f6c5b541'] = 'Información sobre la lengüeta CRON';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_60c28ac0d4876263692a88786d2626ef'] = 'URL para la configuración de tarea cron';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_f4f70727dc34561dfde1a3c529b6205c'] = 'configuración';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_cac81c648846c9b8c3e6085a45782c7e'] = 'Nombre de usuario';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_b341a59d5636ed3d6a819137495b08a0'] = 'Contraseña';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_6c47d739c79e0f93ec0cd90663a68ebf'] = 'Relay:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_43e7396afc9f4633157a47bf5f5af96c'] = 'Teléfono del remitente del SMS ';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_1ee1c44c2dc81681f961235604247b81'] = 'modo:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_4f502b57d2835715eaa382c7d4c32e94'] = 'Simulación';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_756d97bb256b8580d4d71ee0c547804e'] = 'Producción';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_ea24be6a78dd661afe60448e87b75065'] = 'Alerta cada nuevo pedido:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_93cba07454f06a4a960172bbd6e2a435'] = 'Sí';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_7b357f8e4b60349aeba339f3032e4a84'] = 'Enviar un SMS si se realiza un nuevo pedido';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_ff914fecb4b37bd6edb2e4515ec1d4dc'] = 'Alerta por cantidad de productos:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_2ed5f5c1670d557c67c958d1f230cb2c'] = 'Enviar un SMS cuando se actualiza el stock del producto';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_d0759ad8efa7234c0f9b919f9ec88c2b'] = 'Informe diario';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_a5d859ac85a50ed9d8b6d93be6abd217'] = 'Enviar un informe diario de las estadísticas. Debe fijar un CRON a';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_481bfc100d0a3590edb72f53679e310c'] = 'teléfono del destinatario del SMS';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_b17f3f4dcf653a5776792498a9b44d6a'] = 'Actualizar configuración';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_c888438d14855d7d96a2724ee9c306bd'] = 'Configuración actualizada';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_b1a293b0efa4e1e7c35ef375c3cd7a44'] = 'El nombre de usuario es obligatorio';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_8c194fef39e0d251494686926884733e'] = 'La contraseña es obligatoria';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_6ac6840e86a7b09bf9eb326228060981'] = 'La ruta es obligatoria';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_486493b98a473ebb777dd86bbf264e06'] = 'El origen es obligatorio';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_30c94c563402b0a87e4b5411518ab542'] = 'El modo es obligatorio';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_aea21c9ea4f10d22071eb479eee918c3'] = 'Por favor, indique un número de teléfono';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_713569f69019a591adfda481f6668a06'] = 'Número de teléfono no válido';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_8394f2c720f3798ff8ef93fe7e331866'] = 'Pedidos:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_ec3e48bb9aa902ba2ad608547fdcbfdc'] = 'Ventas:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_01411a97818b38fc6524d56590ca5a12'] = 'Mes:';
|
||||
@@ -1,46 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_599f02a21a8d80cfa87a3a42f9aef067'] = 'Envoyer un SMS à chaque nouvelle commande';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_2c8be96b677dc6b891a343193822fea4'] = 'Êtes-vous sûr de vouloir supprimer ces informations ?';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_088d3bfa945e4c27ac0fea363bb13d12'] = 'Message bien envoyé';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_0cda570a27de3fbd0940da019f759721'] = 'Erreur lors de l\'envoie du message';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_884b60418e2f1f9a6a40f12e8ca0a64d'] = 'Identifiant et numéro de téléphone';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_a82be0f551b8708bc08eb33cd9ded0cf'] = 'Information';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_8b58aafd28dcaee7f6e92442c96e31db'] = 'Envoyer un SMS de test :';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_43e9e66e3a7acefd0663287c95acd407'] = 'Entrez votre numéro de téléphone';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_35ba634a7df95f937550c54b7b94d2c5'] = 'ex: 33642424242';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_2e1779891f69b099b16616ae7ea2e76c'] = 'Crédits SMS :';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_00db7aae85aecb79c75afca7daa8f22e'] = 'Vous avez';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_928735d6f2c63bee316dd511c8ccaf55'] = 'crédits';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_466f8189c781f6e003d6a2a9f6c5b541'] = 'Information pour la tache CRON';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_60c28ac0d4876263692a88786d2626ef'] = 'URL pour la configuration de la tache CRON:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_cac81c648846c9b8c3e6085a45782c7e'] = 'Identifiant :';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_b341a59d5636ed3d6a819137495b08a0'] = 'Mot de passe :';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_6c47d739c79e0f93ec0cd90663a68ebf'] = 'Relais :';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_43e7396afc9f4633157a47bf5f5af96c'] = 'Numéro de téléphone de l\'expéditeur du SMS';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_1ee1c44c2dc81681f961235604247b81'] = 'Mode :';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_4f502b57d2835715eaa382c7d4c32e94'] = 'Simulation';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_756d97bb256b8580d4d71ee0c547804e'] = 'Production';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_ea24be6a78dd661afe60448e87b75065'] = 'Alerte nouvelle commande';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_93cba07454f06a4a960172bbd6e2a435'] = 'Oui';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_7b357f8e4b60349aeba339f3032e4a84'] = 'Envoi un SMS à chaque nouvelle commande';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_ff914fecb4b37bd6edb2e4515ec1d4dc'] = 'Alerte changement de stock';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_2ed5f5c1670d557c67c958d1f230cb2c'] = 'Envoi un SMS à chaque changement de stock';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_d0759ad8efa7234c0f9b919f9ec88c2b'] = 'Rapport quotidien';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_a5d859ac85a50ed9d8b6d93be6abd217'] = 'Envoi un rapport journalier - vous devez configurer un CRON sur le fichier';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_481bfc100d0a3590edb72f53679e310c'] = 'Numéro de téléphone du destinataire du SMS';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour les informations';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_c888438d14855d7d96a2724ee9c306bd'] = 'Informations mises à jour';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_b1a293b0efa4e1e7c35ef375c3cd7a44'] = 'Identifiant obligatoire';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_8c194fef39e0d251494686926884733e'] = 'Mot de passe obligatoire';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_6ac6840e86a7b09bf9eb326228060981'] = 'Route obligatoire';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_486493b98a473ebb777dd86bbf264e06'] = 'Origine obligatoire';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_30c94c563402b0a87e4b5411518ab542'] = 'Mode obligatoire';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_aea21c9ea4f10d22071eb479eee918c3'] = 'Merci d\'entrer un numéro de téléphone';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_713569f69019a591adfda481f6668a06'] = 'Numéro de téléphone invalide';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_8394f2c720f3798ff8ef93fe7e331866'] = 'Commandes';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_ec3e48bb9aa902ba2ad608547fdcbfdc'] = 'CA';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_01411a97818b38fc6524d56590ca5a12'] = 'Mois';
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 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/osl-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$
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 581 B |
@@ -1,46 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_599f02a21a8d80cfa87a3a42f9aef067'] = 'Invia un SMS per ogni nuovo ordine';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_2c8be96b677dc6b891a343193822fea4'] = 'Sei sicuro di voler cancellare le tue informazioni?';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_088d3bfa945e4c27ac0fea363bb13d12'] = 'Messaggio inviato con successo';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_0cda570a27de3fbd0940da019f759721'] = 'Errore durante l\'invio del messaggio';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_884b60418e2f1f9a6a40f12e8ca0a64d'] = 'Login e numero di telefono';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_a82be0f551b8708bc08eb33cd9ded0cf'] = 'Informazioni';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_8b58aafd28dcaee7f6e92442c96e31db'] = 'Inviare SMS di prova:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_43e9e66e3a7acefd0663287c95acd407'] = 'Inserisci il tuo numero di telefono';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_35ba634a7df95f937550c54b7b94d2c5'] = 'es: 33642424242';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_2e1779891f69b099b16616ae7ea2e76c'] = 'Crediti SMS:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_00db7aae85aecb79c75afca7daa8f22e'] = 'Hai';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_928735d6f2c63bee316dd511c8ccaf55'] = 'crediti';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_f4f70727dc34561dfde1a3c529b6205c'] = 'Impostazioni';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_cac81c648846c9b8c3e6085a45782c7e'] = 'Nome utente:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_b341a59d5636ed3d6a819137495b08a0'] = 'Password:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_6c47d739c79e0f93ec0cd90663a68ebf'] = 'Relay:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_43e7396afc9f4633157a47bf5f5af96c'] = 'N. di telefono del mittente dell\'SMS ';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_1ee1c44c2dc81681f961235604247b81'] = 'Modalità:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_4f502b57d2835715eaa382c7d4c32e94'] = 'Simulazione';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_756d97bb256b8580d4d71ee0c547804e'] = 'Produzione';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_ea24be6a78dd661afe60448e87b75065'] = 'Segnalazioni del nuovo ordine:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_93cba07454f06a4a960172bbd6e2a435'] = 'Sì';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_7b357f8e4b60349aeba339f3032e4a84'] = 'Inviare SMS se viene fatto un nuovo ordine';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_ff914fecb4b37bd6edb2e4515ec1d4dc'] = 'Segnalazioni di quantità di prodotto:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_2ed5f5c1670d557c67c958d1f230cb2c'] = 'Inviare SMS se lo stock di prodotto viene aggiornato';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_d0759ad8efa7234c0f9b919f9ec88c2b'] = 'Rapporto giornaliero:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_a5d859ac85a50ed9d8b6d93be6abd217'] = 'Inviare una relazione quotidiana statistiche - È necessario impostare un CRON per';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_481bfc100d0a3590edb72f53679e310c'] = 'N. telefono ricevente SMS';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_b17f3f4dcf653a5776792498a9b44d6a'] = 'Aggiorna le impostazioni';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_c888438d14855d7d96a2724ee9c306bd'] = 'Impostazioni aggiornate';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_b1a293b0efa4e1e7c35ef375c3cd7a44'] = 'Il nome utente è obbligatorio';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_8c194fef39e0d251494686926884733e'] = 'Password è obbligatoria';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_6ac6840e86a7b09bf9eb326228060981'] = 'Route è obbligatoria';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_486493b98a473ebb777dd86bbf264e06'] = 'L\'origine è obbligatoria';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_30c94c563402b0a87e4b5411518ab542'] = 'Modalità è obbligatoria';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_aea21c9ea4f10d22071eb479eee918c3'] = 'Si prega di inserire un numero di telefono';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_713569f69019a591adfda481f6668a06'] = 'Numero di telefono non valido';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_8394f2c720f3798ff8ef93fe7e331866'] = 'Ordini:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_ec3e48bb9aa902ba2ad608547fdcbfdc'] = 'Vendite:';
|
||||
$_MODULE['<{tm4b}prestashop>tm4b_01411a97818b38fc6524d56590ca5a12'] = 'Mese:';
|
||||
|
||||
?>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 241 B |
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 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/osl-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$
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -1,5 +0,0 @@
|
||||
{shop_name}
|
||||
Kunde: {firstname} {lastname}
|
||||
Bestellung: {order_name}
|
||||
Zahlung: {payment}
|
||||
Gesamt TI: ({total_paid} {currency})
|
||||
@@ -1,5 +0,0 @@
|
||||
{shop_name}
|
||||
Dieser Artikel ist bald ausverkauft:
|
||||
Ref.: {product_ref}
|
||||
Id: {product_id}
|
||||
Menge: {qty}
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 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/osl-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$
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -1,5 +0,0 @@
|
||||
{shop_name}
|
||||
Customer: {firstname} {lastname}
|
||||
Order: {order_name}
|
||||
Payment: {payment}
|
||||
Total TI: ({total_paid} {currency})
|
||||
@@ -1,5 +0,0 @@
|
||||
{shop_name}
|
||||
This product is soon out of stock:
|
||||
Ref: {product_ref}
|
||||
Id: {product_id}
|
||||
Qty: {qty}
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 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/osl-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$
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -1,5 +0,0 @@
|
||||
nombre de la tienda: {shop_name}
|
||||
Este producto es poco fuera de stock:
|
||||
Ref: {product_ref}
|
||||
Id: {product_id}
|
||||
Cantidad: {qty}
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 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/osl-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$
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -1,5 +0,0 @@
|
||||
{shop_name}
|
||||
Client : {firstname} {lastname}
|
||||
Commande : {order_name}
|
||||
Mode de paiement : {payment}
|
||||
Total TTC : ({total_paid} {currency})
|
||||
@@ -1,5 +0,0 @@
|
||||
{shop_name}
|
||||
Ce produit est bientot en rupture de stock :
|
||||
Ref: {product_ref}
|
||||
Id: {product_id}
|
||||
Quantité: {qty}
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 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/osl-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$
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 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/osl-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$
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -1,5 +0,0 @@
|
||||
{shop_name}
|
||||
Cliente: {firstname} {lastname}
|
||||
Ordine: {order_name}
|
||||
Pagamento: {payment}
|
||||
Totale TI: ({total_paid} {currency})
|
||||
@@ -1,5 +0,0 @@
|
||||
{shop_name}
|
||||
Questo prodotto sarà presto non disponibile:
|
||||
Rif: {product_ref}
|
||||
Id: {product_id}
|
||||
Qtà: {qty}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 351 B |
@@ -1,399 +0,0 @@
|
||||
<?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 Tm4b extends Module
|
||||
{
|
||||
private $_html = '';
|
||||
private $_postErrors = array();
|
||||
private $_postSucess;
|
||||
|
||||
private $_data;
|
||||
private $_password;
|
||||
private $_user;
|
||||
private $_originator;
|
||||
private $_route;
|
||||
private $_simulation;
|
||||
private $_new_order_numbers;
|
||||
|
||||
private $_alert_new_order_active;
|
||||
private $_alert_update_quantity_active;
|
||||
private $_daily_report_active;
|
||||
|
||||
public $token;
|
||||
|
||||
const __TM4B_LOWBALANCE__ = '20';
|
||||
const __TM4B_NUMBER_DELIMITOR__ = ',';
|
||||
|
||||
static private $_tpl_sms_files = array(
|
||||
'name' => array(
|
||||
'new_orders' => 'sms_new_order',
|
||||
'out_of_stock' => 'sms_out_of_stock'
|
||||
),
|
||||
'ext' => array(
|
||||
'new_orders' => '.txt',
|
||||
'out_of_stock' => '.txt'
|
||||
)
|
||||
);
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'tm4b';
|
||||
$this->displayName = 'SMS Tm4b';
|
||||
$this->description = $this->l('Sends an SMS for each new order');
|
||||
$this->tab = 'administration';
|
||||
$this->version = 1.1;
|
||||
$this->author = 'PrestaShop';
|
||||
$this->need_instance = 0;
|
||||
|
||||
parent::__construct();
|
||||
|
||||
if ($this->id)
|
||||
{
|
||||
$this->_data = array('shopname' => Configuration::get('PS_SHOP_NAME'));
|
||||
|
||||
/* Get config vars */
|
||||
$this->_password = Configuration::get('TM4B_PASSWORD');
|
||||
$this->_user = Configuration::get('TM4B_USER');
|
||||
$this->_originator = Configuration::get('TM4B_ORIGINATOR');
|
||||
$this->_route = Configuration::get('TM4B_ROUTE');
|
||||
$this->_simulation = Configuration::get('TM4B_SIM');
|
||||
$this->_new_order_numbers = Configuration::get('TM4B_NEW_ORDER_NUMBERS');
|
||||
|
||||
$this->_alert_new_order_active = Configuration::get('TM4B_ALERT_NO_ACTIVE');
|
||||
$this->_alert_update_quantity_active = Configuration::get('TM4B_ALERT_UQ_ACTIVE');
|
||||
$this->_daily_report_active = Configuration::get('TM4B_DAILY_REPORT_ACTIVE');
|
||||
}
|
||||
|
||||
$this->displayName = 'SMS Tm4b';
|
||||
$this->description = $this->l('Sends an SMS for each new order');
|
||||
$this->confirmUninstall = $this->l('Are you sure you want to delete your info?');
|
||||
|
||||
$this->token = md5('tm4b'._COOKIE_KEY_);
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
if (!parent::install() OR
|
||||
!$this->registerHook('newOrder') OR
|
||||
!$this->registerHook('updateQuantity'))
|
||||
return false;
|
||||
|
||||
Configuration::updateValue('TM4B_SIM', 1);
|
||||
Configuration::updateValue('TM4B_ALERT_NO_ACTIVE', 1);
|
||||
Configuration::updateValue('TM4B_ALERT_UQ_ACTIVE', 1);
|
||||
Configuration::updateValue('TM4B_DAILY_REPORT_ACTIVE', 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
public function uninstall()
|
||||
{
|
||||
Configuration::deleteByName('TM4B_PASSWORD');
|
||||
Configuration::deleteByName('TM4B_USER');
|
||||
Configuration::deleteByName('TM4B_ORIGINATOR');
|
||||
Configuration::deleteByName('TM4B_ROUTE');
|
||||
Configuration::deleteByName('TM4B_SIM');
|
||||
Configuration::deleteByName('TM4B_NEW_ORDER_NUMBERS');
|
||||
Configuration::deleteByName('TM4B_ALERT_NO_ACTIVE');
|
||||
Configuration::deleteByName('TM4B_ALERT_UQ_ACTIVE');
|
||||
Configuration::deleteByName('TM4B_DAILY_REPORT_ACTIVE');
|
||||
Configuration::deleteByName('TM4B_LAST_REPORT');
|
||||
|
||||
return parent::uninstall();
|
||||
}
|
||||
|
||||
private function _getTplBody($tpl_file, $vars = array())
|
||||
{
|
||||
$iso = Language::getIsoById((int)(Configuration::get('PS_LANG_DEFAULT')));
|
||||
$file = dirname(__FILE__).'/mails/'.$iso.'/'.$tpl_file;
|
||||
if (!file_exists($file))
|
||||
die($file);
|
||||
$tpl = file($file);
|
||||
$template = str_replace(array_keys($vars), array_values($vars), $tpl);
|
||||
return (implode("\n", $template));
|
||||
}
|
||||
|
||||
public function hookNewOrder($params)
|
||||
{
|
||||
require_once (dirname(__FILE__).'/classes/Tm4bSms.php');
|
||||
|
||||
if ( !(int)($this->_alert_new_order_active) OR empty($this->_user) OR empty($this->_password)
|
||||
OR empty($this->_new_order_numbers))
|
||||
return ;
|
||||
$order = $params['order'];
|
||||
$customer = $params['customer'];
|
||||
$currency = $params['currency'];
|
||||
|
||||
$templateVars = array(
|
||||
'{firstname}' => utf8_decode($customer->firstname),
|
||||
'{lastname}' => utf8_decode($customer->lastname),
|
||||
'{order_name}' => sprintf("%06d", $order->id),
|
||||
'{shop_name}' => Configuration::get('PS_SHOP_NAME'),
|
||||
'{payment}' => $order->payment,
|
||||
'{total_paid}' => $order->total_paid,
|
||||
'{currency}' => $currency->sign);
|
||||
|
||||
$body = $this->_getTplBody(self::$_tpl_sms_files['name']['new_orders'].self::$_tpl_sms_files['ext']['new_orders'], $templateVars);
|
||||
|
||||
$sms = new Tm4bSms($this->_user, $this->_password, $this->_route, $this->_originator);
|
||||
$sms->msg = $body;
|
||||
$numbers = explode(self::__TM4B_NUMBER_DELIMITOR__, $this->_new_order_numbers);
|
||||
foreach ($numbers as $number)
|
||||
if ($number != '')
|
||||
$sms->addRecipient($number);
|
||||
$sms->Send($this->_simulation);
|
||||
}
|
||||
|
||||
public function hookUpdateQuantity($params)
|
||||
{
|
||||
require_once (dirname(__FILE__).'/classes/Tm4bSms.php');
|
||||
if (!(int)($this->_alert_update_quantity_active) OR empty($this->_new_order_numbers))
|
||||
return ;
|
||||
|
||||
if (is_object($params['product']))
|
||||
$params['product'] = get_object_vars($params['product']);
|
||||
|
||||
$product = $params['product'];
|
||||
|
||||
$qty = (int)($params['product']['quantity_attribute'] ? $params['product']['quantity_attribute'] : $params['product']['stock_quantity']) - (int)($params['product']['quantity']);
|
||||
if ($qty <= (int)(Configuration::get('PS_LAST_QTIES')))
|
||||
{
|
||||
$templateVars = array(
|
||||
'{last_qty}' => (int)(Configuration::get('PS_LAST_QTIES')),
|
||||
'{qty}' => $qty,
|
||||
'{product}' => strval($params['product']['name']));
|
||||
|
||||
$body = $this->_getTplBody(self::$_tpl_sms_files['name']['out_of_stock'].self::$_tpl_sms_files['ext']['out_of_stock'], $templateVars);
|
||||
}
|
||||
|
||||
if (!empty($body))
|
||||
{
|
||||
$sms = new Tm4bSms($this->_user, $this->_password, $this->_route, $this->_originator);
|
||||
$sms->msg = $body;
|
||||
$numbers = explode(self::__TM4B_NUMBER_DELIMITOR__, $this->_new_order_numbers);
|
||||
foreach ($numbers as $number)
|
||||
if ($number != '')
|
||||
$sms->addRecipient($number);
|
||||
$sms->Send($this->_simulation);
|
||||
}
|
||||
}
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
require_once (dirname(__FILE__).'/classes/Tm4bSms.php');
|
||||
|
||||
$this->_html = '<h2>'.$this->displayName.'</h2>';
|
||||
|
||||
if (!empty($_POST))
|
||||
{
|
||||
if (isset($_POST['btnTestSms']))
|
||||
{
|
||||
if (!empty($this->_user) AND !empty($this->_password) AND !empty($_POST['test_number']) AND is_numeric($_POST['test_number']))
|
||||
{
|
||||
$sms = new Tm4bSms($this->_user, $this->_password, $this->_route, $this->_originator);
|
||||
$sms->msg = 'Test SMS for your PrestaShop website';
|
||||
$sms->addRecipient($_POST['test_number']);
|
||||
$ret = $sms->Send($this->_simulation);
|
||||
if ($sms->isSent())
|
||||
$this->_html .= $this->displayConfirmation($this->l('Message sent'));
|
||||
else
|
||||
$this->_html .= $this->displayError($this->l('Error while sending message'));
|
||||
}
|
||||
else
|
||||
$this->_html .= $this->displayError($this->l('Login and phone number'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_postValidation();
|
||||
if (!sizeof($this->_postErrors))
|
||||
$this->_postProcess();
|
||||
else
|
||||
foreach ($this->_postErrors AS $err)
|
||||
$this->_html .= $this->displayError($err);
|
||||
}
|
||||
}
|
||||
|
||||
$this->_displayTm4b();
|
||||
$this->_displayForm();
|
||||
|
||||
return $this->_html;
|
||||
}
|
||||
|
||||
private function _displayTm4b()
|
||||
{
|
||||
require_once (dirname(__FILE__).'/classes/Tm4bSms.php');
|
||||
|
||||
$testsms_txt = 'Send';
|
||||
|
||||
$this->_html .= '
|
||||
<fieldset><legend><img src="'.$this->_path.'informations.gif" alt="" title="" /> '.$this->l('Information').'</legend>
|
||||
<form action="'.Tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']).'" method="post">
|
||||
<label>'.$this->l('Send test SMS:').'</label>
|
||||
<div class="margin-form"><input onclick="this.value=\'\'" type="text" style="margin-bottom:10px;" name="test_number" size="30" value="'.Tools::getValue('test_number', $this->l('Enter your phone number')).'">
|
||||
<input class="button" name="btnTestSms" value="'.$testsms_txt.'" type="submit" style="margin-bottom:10px;" /><br />'.$this->l('ex: 33642424242').'</div>';
|
||||
if (!empty($this->_user) AND !empty($this->_password))
|
||||
{
|
||||
$sms = new Tm4bSms($this->_user, $this->_password, $this->_route, $this->_originator);
|
||||
$credits = $sms->CheckCredits();
|
||||
$color = ($credits < self::__TM4B_LOWBALANCE__ ? '#900' : '#080');
|
||||
$this->_html .= '<label>'.$this->l('SMS credits:').'</label>
|
||||
<div class="margin-form" style="color:#000000; font-size:12px;">'.$this->l('You have').' <span style="font-weight: bold; color: '.$color.';">'.$credits.'</span> '.$this->l('credits').'</div>';
|
||||
}
|
||||
$this->_html .= '
|
||||
</form>
|
||||
</fieldset><br />
|
||||
<fieldset>
|
||||
<legend><img src="'.$this->_path.'informations.gif" alt="" title="" /> '.$this->l('Information about CRON tab').'</legend>
|
||||
|
||||
<label>'.$this->l('URL for cron task configuration:').'</label>
|
||||
<b>http://'.Tools::getShopDomain().__PS_BASE_URI__.'modules/'.$this->name.'/cron.php?token='.$this->token.'</b>
|
||||
</fieldset><br />';
|
||||
}
|
||||
|
||||
private function _displayForm()
|
||||
{
|
||||
if (Tools::isSubmit('btnSubmit'))
|
||||
{
|
||||
if ($this->_user)
|
||||
{
|
||||
$_POST['user'] = $this->_user;
|
||||
$_POST['password'] = $this->_password;
|
||||
$_POST['route'] = $this->_route;
|
||||
$_POST['originator'] = $this->_originator;
|
||||
$_POST['simulation'] = $this->_simulation;
|
||||
$_POST['new_order_numbers'] = str_replace(self::__TM4B_NUMBER_DELIMITOR__, "\n", $this->_new_order_numbers);
|
||||
$_POST['alert_new_order'] = $this->_alert_new_order_active;
|
||||
$_POST['alert_update_quantity'] = $this->_alert_update_quantity_active;
|
||||
$_POST['daily_report'] = $this->_daily_report_active;
|
||||
}
|
||||
}
|
||||
|
||||
$this->_html .= '
|
||||
<fieldset>
|
||||
<legend><img src="'.$this->_path.'prefs.gif" alt="" title="" /> '.$this->l('Settings').'</legend>
|
||||
<form action="'.Tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']).'" method="post">
|
||||
<label>'.$this->l('Username:').'</label>
|
||||
<div class="margin-form"><input type="text" name="user" value="'.Tools::htmlentitiesUTF8(Tools::getValue('user')).'" /></div>
|
||||
<label>'.$this->l('Password:').'</label>
|
||||
<div class="margin-form"><input type="text" name="password" value="'.Tools::htmlentitiesUTF8(Tools::getValue('password')).'" /></div>
|
||||
<label>'.$this->l('Relay:').'</label>
|
||||
<div class="margin-form"><select name="route">
|
||||
<option value="GD01" '.(Tools::getValue('route') == 'GD01' ? 'selected="selected"' : '').'>Global I</option>
|
||||
<option value="GD02" '.(Tools::getValue('route') == 'GD02' ? 'selected="selected"' : '').'>Global II</option>
|
||||
<option value="USS1" '.(Tools::getValue('route') == 'USS1' ? 'selected="selected"' : '').'>USA Direct</option>
|
||||
</select></div>
|
||||
<label>'.$this->l('SMS sender\'s phone #').'</label>
|
||||
<div class="margin-form"><input type="text" name="originator" value="'.Tools::htmlentitiesUTF8(Tools::getValue('originator')).'" style="margin-bottom:10px;" /><br />'.$this->l('ex: 33642424242').'</div>
|
||||
<label>'.$this->l('Mode:').'</label>
|
||||
<div class="margin-form"><input type="radio" name="simulation" value="1" style="vertical-align: middle;" '.(Tools::getValue('simulation') == '1' ? 'checked' : '').' /> <span style="color: #900;">'.$this->l('Simulation').'</span>
|
||||
<input type="radio" name="simulation" value="0" style="vertical-align: middle;" '.(!Tools::getValue('simulation') ? 'checked' : '').' /> <span style="color: #080;">'.$this->l('Production').'</div>
|
||||
<br />
|
||||
<label>'.$this->l('Alerts on new order:').'</label>
|
||||
<div class="margin-form"><div style="color:#000000; font-size:12px; margin-bottom:6px"><input type="checkbox" value="1" name="alert_new_order" '.(Tools::getValue('alert_new_order') == '1' ? 'checked' : '').' /> '.$this->l('Yes').'</div>'.$this->l('Send SMS if a new order is made').'</div>
|
||||
<label class="clear">'.$this->l('Alerts on product quantity:').'</label>
|
||||
<div class="margin-form"><div style="color:#000000; font-size:12px; margin-bottom:6px"><input type="checkbox" value="1" name="alert_update_quantity" '.(Tools::getValue('alert_update_quantity') == '1' ? 'checked' : '').' /> '.$this->l('Yes').'</div>'.$this->l('Send SMS if the stock of product is updated').'</div>
|
||||
<label class="clear">'.$this->l('Daily report:').'</label>
|
||||
<div class="margin-form"><div style="color:#000000; font-size:12px; margin-bottom:6px"><input type="checkbox" value="1" name="daily_report" '.(Tools::getValue('daily_report') == '1' ? 'checked' : '').' /> '.$this->l('Yes').'</div>'.$this->l('Send a daily stats report - You must set a CRON to').' /modules/tm4b/cron.php</div>
|
||||
<br />
|
||||
<label>'.$this->l('SMS receiver\'s phone #').'</label>
|
||||
<div class="margin-form"><input type="text" name="new_order_numbers" size="30" value="'.Tools::htmlentitiesUTF8(Tools::getValue('new_order_numbers')).'" style="margin-bottom:10px;" /><br />'.$this->l('ex: 33642424242').'</div>
|
||||
<br />
|
||||
<div class="margin-form"><input class="button" name="btnSubmit" value="'.$this->l('Update settings').'" type="submit" /></div>
|
||||
</form>
|
||||
</fieldset>';
|
||||
}
|
||||
|
||||
private function _postProcess()
|
||||
{
|
||||
Configuration::updateValue('TM4B_PASSWORD', Tools::getValue('password'));
|
||||
Configuration::updateValue('TM4B_USER', Tools::getValue('user'));
|
||||
Configuration::updateValue('TM4B_ORIGINATOR', Tools::getValue('originator'));
|
||||
Configuration::updateValue('TM4B_ROUTE', Tools::getValue('route'));
|
||||
Configuration::updateValue('TM4B_SIM', Tools::getValue('simulation'));
|
||||
Configuration::updateValue('TM4B_ALERT_NO_ACTIVE', (int)Tools::isSubmit('alert_new_order'));
|
||||
Configuration::updateValue('TM4B_ALERT_UQ_ACTIVE', (int)Tools::isSubmit('alert_update_quantity'));
|
||||
Configuration::updateValue('TM4B_DAILY_REPORT_ACTIVE', (int)Tools::isSubmit('daily_report'));
|
||||
|
||||
$numbers = explode("\n", Tools::getValue('new_order_numbers'));
|
||||
$this->_new_order_numbers = '';
|
||||
foreach ($numbers as $number)
|
||||
{
|
||||
if (preg_match("/([0-9]+)/", $number, $regs))
|
||||
$this->_new_order_numbers .= $regs[1].self::__TM4B_NUMBER_DELIMITOR__;
|
||||
}
|
||||
Configuration::updateValue('TM4B_NEW_ORDER_NUMBERS', $this->_new_order_numbers);
|
||||
$this->_html .= $this->displayConfirmation($this->l('Settings updated'));
|
||||
}
|
||||
|
||||
private function _postValidation()
|
||||
{
|
||||
if (!Tools::getValue('user') || Validate::isGenericName(Tools::getValue('user')) != true)
|
||||
$this->_postErrors[] = $this->l('Username is mandatory');
|
||||
elseif (!Tools::getValue('password') || Validate::isPasswd(Tools::getValue('password')) != true)
|
||||
$this->_postErrors[] = $this->l('Password is mandatory');
|
||||
elseif (!Tools::getValue('route') OR (Tools::getValue('route') != 'GD01' AND Tools::getValue('route') != 'GD02' AND Tools::getValue('route') != 'USS1'))
|
||||
$this->_postErrors[] = $this->l('Route is mandatory');
|
||||
elseif (!Tools::getValue('originator'))
|
||||
$this->_postErrors[] = $this->l('Origin is mandatory');
|
||||
elseif (!Tools::isSubmit('simulation') OR (Tools::getValue('simulation') != 0 AND Tools::getValue('simulation') != 1))
|
||||
$this->_postErrors[] = $this->l('Mode is mandatory');
|
||||
elseif (!Tools::getValue('new_order_numbers'))
|
||||
$this->_postErrors[] = $this->l('Please enter a phone number');
|
||||
elseif (preg_match('/([^0-9[:space:],])/', $_POST['new_order_numbers'], $regs))
|
||||
$this->_postErrors[] = $this->l('Phone number invalid');
|
||||
}
|
||||
|
||||
public function getStatsBody()
|
||||
{
|
||||
$currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
|
||||
$currency->sign = $currency->iso_code;
|
||||
$query = '
|
||||
SELECT SUM(o.`total_paid_real`) as total_sales, COUNT(o.`total_paid_real`) as total_orders
|
||||
FROM `'._DB_PREFIX_.'orders` o
|
||||
WHERE (
|
||||
SELECT IF(os.`id_order_state` = 8, 0, 1)
|
||||
FROM `'._DB_PREFIX_.'orders` oo
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_history` oh ON oh.`id_order` = oo.`id_order`
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_state` os ON os.`id_order_state` = oh.`id_order_state`
|
||||
WHERE oo.`id_order` = o.`id_order`
|
||||
ORDER BY oh.`date_add` DESC, oh.`id_order_history` DESC
|
||||
LIMIT 1
|
||||
) = 1 ';
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query.'
|
||||
AND o.`date_add` >= DATE_SUB(\''.date('Y-m-d').' 20:00:00\', INTERVAL 1 DAY)
|
||||
AND o.`date_add` < \''.date('Y-m-d').' 20:00:00\'');
|
||||
$result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($query.'AND o.`date_add` LIKE \''.date('Y-m').'-%\'');
|
||||
|
||||
return date('Y-m-d')."\n".
|
||||
$this->l('Orders:').' '.(int)$result['total_orders']."\n".
|
||||
$this->l('Sales:').' '.Tools::displayPrice($result['total_sales'], $currency, true)."\n".
|
||||
'('.$this->l('Month:').' '.Tools::displayPrice($result2['total_sales'], $currency, true).')';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1503,4 +1503,3 @@ div.star_hover a, div.star a:hover { background-position: 0 -32px }
|
||||
border: 2px solid #D0D3D8;
|
||||
}
|
||||
|
||||
.
|
||||
|
||||
Reference in New Issue
Block a user