Merge branch 'ticket-11056'

This commit is contained in:
Marion Muszynski 2017-01-05 11:18:19 +01:00
commit b250ea6d3d

View File

@ -464,8 +464,8 @@ class AdminPrivateSalesSales extends AdminTab {
WHERE c.`deleted` != 1
');
// $carriers_default = array(87, 88, 89); // prod
$carriers_default = array(45, 47, 48); // dev
$carriers_default = array(87, 88, 89); // prod
// $carriers_default = array(45, 47, 48); // dev
echo '<label>'.$this->l('Carriers:').'</label>
<div class="margin-form">
@ -500,11 +500,9 @@ class AdminPrivateSalesSales extends AdminTab {
carriers_selected.push($(el).val());
});
$(".carriers_info div.info").html(carriers_info);
console.log($.inArray("45",carriers_selected));
if ($.inArray("45",carriers_selected)!= -1 && $.inArray("47",carriers_selected)!= -1 && $.inArray("48",carriers_selected)!= -1) {
if ($.inArray("87",carriers_selected)!= -1 && $.inArray("88",carriers_selected)!= -1 && $.inArray("89",carriers_selected)!= -1) {
$("#delivery_mode option[value=\'1\']").attr("selected","selected");
} else if ($.inArray("45",carriers_selected)!= -1) {
console.log("test");
} else if ($.inArray("87",carriers_selected)!= -1) {
$("#delivery_mode option[value=\'2\']").attr("selected","selected");
} else if ($.inArray("22",carriers_selected)!= -1) {
$("#delivery_mode option[value=\'3\']").attr("selected","selected");
@ -517,9 +515,9 @@ class AdminPrivateSalesSales extends AdminTab {
});
var selected_carriers = [];
if($(this).val() == 1) {
selected_carriers = ["45", "47", "48"];
selected_carriers = ["87", "88", "89"];
} else if($(this).val() == 2) {
selected_carriers = ["45"];
selected_carriers = ["87"];
} else if($(this).val() == 3) {
selected_carriers = ["22"];
}