// bug fix with suppliers and warehouses on product save action in back-office

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11286 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
dSevere
2011-12-15 17:36:54 +00:00
parent db959d2334
commit 9a58359cb6
3 changed files with 8 additions and 8 deletions
@@ -35,7 +35,7 @@
}); });
</script> </script>
<input type="hidden" name="supplier_loaded" value="1">
{if isset($product->id)} {if isset($product->id)}
<h4>{l s='Suppliers of the current product'}</h4> <h4>{l s='Suppliers of the current product'}</h4>
@@ -35,7 +35,7 @@
}); });
</script> </script>
<input type="hidden" name="warehouse_loaded" value="1">
{if isset($product->id)} {if isset($product->id)}
<h4>{l s='Product location in warehouses'}</h4> <h4>{l s='Product location in warehouses'}</h4>
@@ -2078,7 +2078,7 @@ class AdminProductsControllerCore extends AdminController
*/ */
public function processSuppliers($token) public function processSuppliers($token)
{ {
if (Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product')))) if (Tools::getValue('supplier_loaded') && Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product'))))
{ {
// Get all id_product_attribute // Get all id_product_attribute
$attributes = $product->getAttributesResume($this->context->language->id); $attributes = $product->getAttributesResume($this->context->language->id);
@@ -2256,7 +2256,7 @@ class AdminProductsControllerCore extends AdminController
*/ */
public function processWarehouses($token) public function processWarehouses($token)
{ {
if (Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product')))) if (Tools::getValue('warehouse_loaded') && Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product'))))
{ {
// Get all id_product_attribute // Get all id_product_attribute
$attributes = $product->getAttributesResume($this->context->language->id); $attributes = $product->getAttributesResume($this->context->language->id);