//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,9 +2233,12 @@ class AdminProductsControllerCore extends AdminController
$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.'));
return;
}
// Product for multishop
$this->context->smarty->assign('bullet_common_field', '');
if (Shop::isFeatureActive() && $this->display == 'edit')