toutpratique/modules/soflexibilite/classes/SoFlexibiliteThirdParty.php
2017-02-01 07:39:20 -08:00

53 lines
2.2 KiB
PHP

<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from Common-Services Co., Ltd.
* Use, copy, modification or distribution of this source file without written
* license agreement from the SARL SMC is strictly forbidden.
* In order to obtain a license, please contact us: contact@common-services.com
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe Common-Services Co., Ltd.
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la Common-Services Co. Ltd. est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter Common-Services Co., Ltd. a l'adresse: contact@common-services.com
* ...........................................................................
*
* @package soflexibilite
* @author Alexandre D.
* @copyright Copyright (c) 2011-2015 Common Services Co Ltd - 90/25 Sukhumvit 81 - 10260 Bangkok - Thailand
* @license Commercial license
* Support by mail : support.soflexibilite@common-services.com
*/
class SoFlexibiliteThirdParty
{
public static function fixExpeditor($id_carrier_so)
{
$expeditor_conf = Configuration::getMultiple(array(
'EXPEDITOR_CARRIER_CODES_'.$id_carrier_so['SOFLEXIBILITE_DOM_ID'],
'EXPEDITOR_CARRIER_CODES_'.$id_carrier_so['SOFLEXIBILITE_DOS_ID'],
'EXPEDITOR_CARRIER_CODES_'.$id_carrier_so['SOFLEXIBILITE_BPR_ID'],
'EXPEDITOR_CARRIER_CODES_'.$id_carrier_so['SOFLEXIBILITE_A2P_ID'],
));
if (Module::isInstalled('expeditor')) {
foreach ($expeditor_conf as $exp_carrier_conf => $val) {
if ($val !== 'SO') {
Configuration::updateValue($exp_carrier_conf, 'SO');
ConfigureMessage::success(
'Une erreur avec le module Expeditor Inet a &eacute;t&eacute; corrig&eacute; ('.
$exp_carrier_conf.').'
);
}
}
}
}
}