// Fix combination edition
This commit is contained in:
1 parent
092a4bd451
commit
4639e5549b
2 files changed
+3
-3
No files matched your search
@@ -531,8 +531,8 @@ abstract class ObjectModelCore
|
|||||||
foreach (Shop::getContextListShopID() as $id_shop)
|
foreach (Shop::getContextListShopID() as $id_shop)
|
||||||
{
|
{
|
||||||
$fields['id_shop'] = $id_shop;
|
$fields['id_shop'] = $id_shop;
|
||||||
$where = 'id_product = '.(int)$this->id.' AND id_shop = '.(int)$id_shop;
|
$where = $this->def['primary'].' = '.(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))
|
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);
|
$result &= Db::getInstance()->update($this->def['table'].'_shop', $fields, $where, 0, $null_values);
|
||||||
else
|
else
|
||||||
$result &= Db::getInstance()->insert($this->def['table'].'_shop', $fields, $null_values);
|
$result &= Db::getInstance()->insert($this->def['table'].'_shop', $fields, $null_values);
|
||||||
|
|||||||
+1
-1
@@ -2752,7 +2752,7 @@ class ProductCore extends ObjectModel
|
|||||||
FROM `'._DB_PREFIX_.'product_attribute` pa
|
FROM `'._DB_PREFIX_.'product_attribute` pa
|
||||||
'.Shop::addSqlAssociation('product_attribute', 'pa').'
|
'.Shop::addSqlAssociation('product_attribute', 'pa').'
|
||||||
WHERE product_attribute_shop.`default_on` = 1
|
WHERE product_attribute_shop.`default_on` = 1
|
||||||
AND pa`id_product` = '.(int)$this->id
|
AND pa.`id_product` = '.(int)$this->id
|
||||||
);
|
);
|
||||||
if ($row)
|
if ($row)
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in new issue
Block a user