// Fix combination edition

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14773 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-04-19 14:50:14 +00:00
parent 5eaacd2162
commit c6ac41fd05
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -531,8 +531,8 @@ abstract class ObjectModelCore
foreach (Shop::getContextListShopID() as $id_shop)
{
$fields['id_shop'] = $id_shop;
$where = 'id_product = '.(int)$this->id.' AND id_shop = '.(int)$id_shop;
if (Db::getInstance()->getValue('SELECT id_product FROM '._DB_PREFIX_.$this->def['table'].'_shop WHERE '.$where))
$where = $this->def['primary'].' = '.(int)$this->id.' AND id_shop = '.(int)$id_shop;
if (Db::getInstance()->getValue('SELECT '.$this->def['primary'].' FROM '._DB_PREFIX_.$this->def['table'].'_shop WHERE '.$where))
$result &= Db::getInstance()->update($this->def['table'].'_shop', $fields, $where, 0, $null_values);
else
$result &= Db::getInstance()->insert($this->def['table'].'_shop', $fields, $null_values);