[-] BO: Fix PSCFV-3911

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17188 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2012-09-05 12:49:57 +00:00
parent dbd39f3a5b
commit f4b42a63a9
2 changed files with 10 additions and 4 deletions
@@ -1137,7 +1137,13 @@ class AdminProductsControllerCore extends AdminController
{
$result = parent::loadObject($opt);
if ($result)
{
if ($this->object->id)
if (!$this->object->isAssociatedToShop() && $this->object->id_shop_default)
$this->object = new $this->className((int)$this->object->id, false, null, (int)$this->object->id_shop_default);
$this->object->loadStockData();
}
return $result;
}
@@ -2691,7 +2697,7 @@ class AdminProductsControllerCore extends AdminController
$root = Category::getRootCategory();
$default_category = Tools::getValue('id_category', Context::getContext()->shop->id_category);
if (!$product->id)
if (!$product->id || !$product->isAssociatedToShop())
$selected_cat = Category::getCategoryInformations(Tools::getValue('categoryBox', array($default_category)), $this->default_form_language);
else
{