[-] BO : fix #PSTEST-718 combinations images not saved
This commit is contained in:
@@ -150,8 +150,10 @@ class CombinationCore extends ObjectModel
|
|||||||
WHERE `id_product_attribute` = '.(int)($this->id)) === false)
|
WHERE `id_product_attribute` = '.(int)($this->id)) === false)
|
||||||
return false;
|
return false;
|
||||||
$sqlValues = array();
|
$sqlValues = array();
|
||||||
|
|
||||||
foreach ($ids_image as $value)
|
foreach ($ids_image as $value)
|
||||||
$sqlValues[] = '('.(int)$this->id.', '.(int)$value['id'].')';
|
$sqlValues[] = '('.(int)$this->id.', '.(int)$value.')';
|
||||||
|
|
||||||
Db::getInstance()->execute('
|
Db::getInstance()->execute('
|
||||||
INSERT INTO `'._DB_PREFIX_.'product_attribute_image` (`id_product_attribute`, `id_image`)
|
INSERT INTO `'._DB_PREFIX_.'product_attribute_image` (`id_product_attribute`, `id_image`)
|
||||||
VALUES '.implode(',', $sqlValues)
|
VALUES '.implode(',', $sqlValues)
|
||||||
|
|||||||
Reference in New Issue
Block a user