diff --git a/admin/themes/default/template/controllers/normal_products/informations.tpl b/admin/themes/default/template/controllers/normal_products/informations.tpl index 66435dda0..a49e34a81 100644 --- a/admin/themes/default/template/controllers/normal_products/informations.tpl +++ b/admin/themes/default/template/controllers/normal_products/informations.tpl @@ -237,24 +237,23 @@
-
diff --git a/controllers/admin/AdminNormalProductsController.php b/controllers/admin/AdminNormalProductsController.php index 741e71fdd..b6ec03e28 100644 --- a/controllers/admin/AdminNormalProductsController.php +++ b/controllers/admin/AdminNormalProductsController.php @@ -2227,6 +2227,10 @@ class AdminNormalProductsControllerCore extends AdminController $_POST['price_calculation_method'] = array_sum(array_map('intval', Tools::getValue('price_calculation_method'))); } + if (is_array(Tools::getValue('selling_preference_type'))) { + $_POST['selling_preference_type'] = array_sum(array_map('intval', Tools::getValue('selling_preference_type'))); + } + $className = 'Product'; // @todo : the call_user_func seems to contains only statics values (className = 'Product') $rules = call_user_func(array($this->className, 'getValidationRules'), $this->className); diff --git a/js/admin/normal_products.js b/js/admin/normal_products.js index b5f53dee7..131b29c42 100644 --- a/js/admin/normal_products.js +++ b/js/admin/normal_products.js @@ -573,12 +573,6 @@ product_tabs['Informations'] = new function(){ var withRoomType = $('#sp_with_room_type').is(':checked'); var withHotel = $('#sp_with_hotel').is(':checked'); var standalone = $('#sp_standalone').is(':checked'); - const sellingPreference = - (withRoomType ? SELLING_PREFERENCE_WITH_ROOM_TYPE : 0) | - (withHotel ? SELLING_PREFERENCE_WITH_HOTEL : 0) | - (standalone ? SELLING_PREFERENCE_WITH_STANDALONE : 0); - - $('#selling_preference_type').val(sellingPreference); var $autoAddOff = $('#auto_add_to_cart_off'); var $autoAddCheckedInput;