diff --git a/adm/helpers/HelperFormBootstrap.php b/adm/helpers/HelperFormBootstrap.php
index 77ffdd6b..2c69d4d7 100644
--- a/adm/helpers/HelperFormBootstrap.php
+++ b/adm/helpers/HelperFormBootstrap.php
@@ -107,7 +107,7 @@ class HelperFormBootstrap{
';
+} else {
+ $select = '';
+}
+
+$data['data'] = $select;
+$data['id_before'] = (int)$id_select;
+$data['id_select'] = (int)$select_upd;
+die(json_encode($data));
diff --git a/modules/categoryfamily/models/CategoryFamily.php b/modules/categoryfamily/models/CategoryFamily.php
index 3b05bce9..18b179d9 100755
--- a/modules/categoryfamily/models/CategoryFamily.php
+++ b/modules/categoryfamily/models/CategoryFamily.php
@@ -133,6 +133,24 @@ class CategoryFamilyCore extends ObjectModel {
return TRUE;
}
+ public static function addAssociations2($id_category, $family) {
+ self::deleteAssociations($id_category);
+
+ if (isset($family)) {
+ Db::getInstance()->execute('
+ INSERT INTO
+ `'._DB_PREFIX_.'category_family_association`
+ (`id_category_family`, `id_category`)
+ VALUES (
+ '.(int)$family.',
+ '.(int)$id_category.'
+ )
+ ');
+ }
+
+ return true;
+ }
+
public static function loadAssociations($id_category, $id_lang) {
global $cookie, $smarty;
$category_family = array();