From b9de42493c2e72ad26f676a7e06668595b4a875f 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 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13254 b9a71923-0436-4b27-9f14-aed3839534dd --- 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)