// Merge -> revision 9288

This commit is contained in:
rMalie
2011-10-12 16:04:28 +00:00
parent a6f2eb5639
commit a07c14fafd
32 changed files with 1529 additions and 633 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ class AdminMondialRelay extends AdminTab
$html .= '<div class="error">'.
$this->l('Thanks to kindly correct the following errors on ').
' <a href="index.php?tab=AdminContact&token='.Tools::getAdminToken('AdminContact'.
(int)(Tab::getIdFromClassName('AdminContact')).(int)$this->context->id_employee).'" style="color:#f00;">'.
(int)Tab::getIdFromClassName('AdminContact').(int)$this->context->id_employee).'" style="color:#f00;">&nbsp;'.
$this->l('the contact page').'</a>:<ul>';
foreach($errorListTicket as $type => $error)
$html .= '<li>'.$type.': '.$error.'</li>';
+1
View File
@@ -46,6 +46,7 @@ $_MODULE['<{mondialrelay}prestashop>mondialrelay_c888438d14855d7d96a2724ee9c306b
$_MODULE['<{mondialrelay}prestashop>mondialrelay_07213a0161f52846ab198be103b5ab43'] = 'erreurs';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_cb5e100e5a9a3e7f6d1fd97512215282'] = 'erreur';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_350c1cc4343826a89f08a33bb49c6d98'] = 'Configuration du Module Mondial Relay';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_192a5439bcfb850e8885cd4b5e01ced4'] = 'Essayez de désactiver le cache et de forcer la compilation smarty si vous rencontrez le moindre problème après une mise à jour du module';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_d21a9f93917604d5490ad529a7cf1ff9'] = 'Pour créer un transporteur Mondial Relay';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_c6a2e6af5fff47adb3afd780b97d9b4b'] = 'Remplissez et sauvegarder vos paramètres Mondial Relay';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_94fbe32464fcfa902feed9f256439833'] = 'Créez un transporteur via le formulaire ‘’ajouter un transporteur’’ ci-dessous';
+14 -25
View File
@@ -540,37 +540,26 @@ class MondialRelay extends Module
{
}
/*
** Update the carrier id to use the new one if changed
*/
public function hookupdateCarrier($params)
{
// TODO : History shipping
/*if ((int)($params['id_carrier']) != (int)($params['carrier']->id))
if ((int)($params['id_carrier']) != (int)($params['carrier']->id))
{
$serviceSelected = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'mr_method` WHERE `id_carrier` = '.(int)$params['id_carrier']);
$update = array('id_carrier' => (int)($params['carrier']->id), 'id_carrier_history' => pSQL($serviceSelected['id_carrier_history'].'|'.(int)($params['carrier']->id)));
Db::getInstance()->autoExecute(_DB_PREFIX_.'mr_method', $update, 'UPDATE', '`id_carrier` = '.(int)$params['id_carrier']);
}*/
// TODO : Delete for shipping history
$new_carrier = $params['carrier'];
// Depends of the Prestashop version, the matches key isn't the same
if ((_PS_VERSION_ >= '1.4' && $new_carrier->external_module_name == 'mondialrelay') ||
$new_carrier->name = 'mondialrelay')
{
$mr_data = Db::getInstance()->getRow('
SELECT *
FROM `'._DB_PREFIX_.'mr_method`
WHERE `id_carrier` = '.(int)($params['id_carrier']));
Db::getInstance()->execute('
INSERT INTO `'._DB_PREFIX_.'mr_method`
(mr_Name, mr_Pays_list, mr_ModeCol, mr_ModeLiv, mr_ModeAss, id_carrier)
VALUES (
"'.pSQL($mr_data['mr_Name']).'",
"'.pSQL($mr_data['mr_Pays_list']).'",
"'.pSQL($mr_data['mr_ModeCol']).'",
"'.pSQL($mr_data['mr_ModeLiv']).'",
"'.pSQL($mr_data['mr_ModeAss']).'",
'.(int)($new_carrier->id).')');
(
SELECT
mr_Name,
mr_Pays_list,
mr_ModeCol,
mr_ModeLiv,
mr_ModeAss,
"'.(int)$params['carrier']->id.'"
FROM `'._DB_PREFIX_.'mr_method`
WHERE id_carrier ='.(int)$params['id_carrier'].')');
}
}