fix CMT when other countries than BE or FR

This commit is contained in:
Marion Muszynski 2017-01-24 15:41:19 +01:00
parent 846fc44bc3
commit cb34675312
2 changed files with 5 additions and 3 deletions

View File

@ -99,7 +99,7 @@ class SoFlexibiliteDeliverySave extends SoFlexibilite
$soDelivery->indice = pSQL($indice);
$soDelivery->postcode = pSQL($codePostal);
$soDelivery->city = pSQL($commune);
$soDelivery->country = (($type == 'CMT' || $type == 'BDP') ? pSQL('BE') : pSQL('FR'));
$soDelivery->country = pSQL(substr(Tools::getValue('pays', 'FR'), 0, 2));
$soDelivery->address1 = pSQL($adresse1);
$soDelivery->address2 = pSQL('');
$soDelivery->lieudit = pSQL('');

View File

@ -686,7 +686,8 @@ $(document).ready(function () {
adresse1: $('#' + idPoint).find('.address1').text(),
code_postal: $('#' + idPoint).find('.code_postal').text(),
commune: $('#' + idPoint).find('.commune').text(),
id_cart: $('#soflexibilite_cart_id').val()
id_cart: $('#soflexibilite_cart_id').val(),
pays: $("#sl-0-country").val()
},
success: function (data) {
/* if (window.console) {
@ -728,7 +729,8 @@ $(document).ready(function () {
address2: $(fullid).find('.pr-indice').val(),
postcode: $(fullid).find('.code_postal').html(),
city: $(fullid).find('.commune').html(),
country: $(fullid).is('.BPR, .A2P, .CIT, .CDI') ? 'France' : 'Belgique'
country: $("#sl-0-country").val()
//country: $(fullid).is('.BPR, .A2P, .CIT, .CDI') ? 'France' : 'Belgique'
}));
$('#custMail').val(sf_customer_mail);
$('#custPhone').val(sf_customer_phone);