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

This commit is contained in:
dSevere committed 2011-12-15 17:36:54 +00:00
1 parent 92e27ca7e6
commit e0471f3406
3 files changed
+4 -4

No files matched your search

@@ -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);