From 4e1a3ee434e12389d3dce8e144a89166423ca0e6 Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Mon, 13 Feb 2012 13:50:37 +0000 Subject: [PATCH] [-] BO : fix #PSTEST-718 combinations images not saved --- classes/Combination.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/Combination.php b/classes/Combination.php index af00caa02..9524ec2e2 100644 --- a/classes/Combination.php +++ b/classes/Combination.php @@ -150,8 +150,10 @@ class CombinationCore extends ObjectModel WHERE `id_product_attribute` = '.(int)($this->id)) === false) return false; $sqlValues = array(); + foreach ($ids_image as $value) - $sqlValues[] = '('.(int)$this->id.', '.(int)$value['id'].')'; + $sqlValues[] = '('.(int)$this->id.', '.(int)$value.')'; + Db::getInstance()->execute(' INSERT INTO `'._DB_PREFIX_.'product_attribute_image` (`id_product_attribute`, `id_image`) VALUES '.implode(',', $sqlValues)