//fixed bug "this product does not exist in this shop."

This commit is contained in:
vAugagneur
2012-07-26 14:03:08 +00:00
parent ebc27fbf65
commit 60efea8140
@@ -2233,8 +2233,11 @@ class AdminProductsControllerCore extends AdminController
$product = $this->object; $product = $this->object;
if ($this->display == 'edit' && Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP && !$product->isAssociatedToShop($this->context->shop->id)) if ($this->display == 'edit' && Validate::isLoadedObject($product) && Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP && !$product->isAssociatedToShop($this->context->shop->id))
{
$this->displayWarning($this->l('Warning: this product does not exist in this shop.')); $this->displayWarning($this->l('Warning: this product does not exist in this shop.'));
return;
}
// Product for multishop // Product for multishop
$this->context->smarty->assign('bullet_common_field', ''); $this->context->smarty->assign('bullet_common_field', '');