diff --git a/classes/Combination.php b/classes/Combination.php index 78f0a0a66..27148b7b3 100644 --- a/classes/Combination.php +++ b/classes/Combination.php @@ -134,7 +134,8 @@ class CombinationCore extends ObjectModel public function setAttributes($ids_attribute) { - if ($this->deleteAssociations()) + $result = $this->deleteAssociations(); + if ($result && !empty($ids_attribute)) { $sql_values = array(); foreach ($ids_attribute as $value) @@ -144,10 +145,8 @@ class CombinationCore extends ObjectModel INSERT INTO `'._DB_PREFIX_.'product_attribute_combination` (`id_attribute`, `id_product_attribute`) VALUES '.implode(',', $sql_values) ); - - return $result; } - return false; + return $result; } public function setWsProductOptionValues($values)