Skip to content

Commit

Permalink
4.0.6 fix term and condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Brouwers committed Mar 28, 2017
1 parent 58fec00 commit 621ff61
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of La Poste SA
*/

# 4.0.6
[-] MO :fix terms and conditions

# 4.0.5
[-] MO :fix town name

Expand Down
10 changes: 5 additions & 5 deletions colissimo_simplicite.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct()
{
$this->name = 'colissimo_simplicite';
$this->tab = 'shipping_logistics';
$this->version = '4.0.5';
$this->version = '4.0.6';
$this->author = 'Quadra Informatique';
$this->module_key = '8b991db851bdf7c64ca441f1a4481964';
$this->need_instance = 1;
Expand Down Expand Up @@ -347,7 +347,7 @@ protected function getConfigForm()
'values' => array(
'query' => array(
array(
'id' => 'DATA',
'id' => 'ACCEPT',
'name' => $this->l('I accept that informations concerning the number of parcels are sent to our partner La poste - Colissimo'),
'val' => 1
),
Expand Down Expand Up @@ -635,7 +635,7 @@ protected function postProcess()
}
$reload_credit = false;

if (Configuration::get('COLISSIMO_PERSONAL_DATA')) {
if (Configuration::get('COLISSIMO_PERSONAL_ACCEPT')) {
if (Tools::getValue('COLISSIMO_PERSONAL_PHONE') && (Tools::getValue('COLISSIMO_PERSONAL_PHONE') != Configuration::get('COLISSIMO_PERSONAL_PHONE'))) {
$reload_credit = true;
}
Expand All @@ -650,7 +650,7 @@ protected function postProcess()
}
}

if (!Configuration::get('COLISSIMO_PERSONAL_DATA') || $reload_credit) {
if (!Configuration::get('COLISSIMO_PERSONAL_ACCEPT') || $reload_credit) {
if (!(bool)preg_match('#^(([\d]{2})([\s]){0,1}){5}$#', Tools::getValue('COLISSIMO_PERSONAL_PHONE'))) {
$this->context->controller->errors[] = $this->l('Phone number is incorrect');
}
Expand All @@ -673,7 +673,7 @@ protected function postProcess()
Configuration::updateValue('COLISSIMO_PERSONAL_SIRET', Tools::getValue('COLISSIMO_PERSONAL_SIRET'));
Configuration::updateValue('COLISSIMO_PERSONAL_ACCEPT', Tools::getValue('COLISSIMO_PERSONAL_ACCEPT'));
if ($this->savePreactivationRequest()) {
Configuration::updateValue('COLISSIMO_PERSONAL_DATA', 1);
Configuration::updateValue('COLISSIMO_PERSONAL_ACCEPT', 1);
}
}
}
Expand Down

0 comments on commit 621ff61

Please sign in to comment.