- {if !$product->active}
+ {if !$product->active && $product->isAssociatedToShop()}
diff --git a/admin-dev/themes/default/template/controllers/products/informations.tpl b/admin-dev/themes/default/template/controllers/products/informations.tpl
index 5945f203c..4df54dfba 100644
--- a/admin-dev/themes/default/template/controllers/products/informations.tpl
+++ b/admin-dev/themes/default/template/controllers/products/informations.tpl
@@ -150,11 +150,11 @@
diff --git a/classes/ObjectModel.php b/classes/ObjectModel.php
index 20f790814..4503cd4f9 100644
--- a/classes/ObjectModel.php
+++ b/classes/ObjectModel.php
@@ -547,8 +547,7 @@ abstract class ObjectModelCore
{
$fields['id_shop'] = (int)$id_shop;
$all_fields['id_shop'] = (int)$id_shop;
- $where = $this->def['primary'].' = '.(int)$this->id.' AND id_shop = '.(int)$id_shop;
- $result &= Db::getInstance()->update($this->def['table'].'_shop', $fields, $where, 0, $null_values);
+ $result &= Db::getInstance()->insert($this->def['table'].'_shop', $fields, $null_values, true, Db::REPLACE);
}
}
|