// AdminProductsController fixed
This commit is contained in:
@@ -3220,7 +3220,7 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data = $this->createTemplate($this->tpl_form);
|
$data = $this->createTemplate($this->tpl_form);
|
||||||
if ((bool)$product->id)
|
if (Validate::isLoadedObject($product))
|
||||||
{
|
{
|
||||||
$attribute_js = array();
|
$attribute_js = array();
|
||||||
$attributes = Attribute::getAttributes($this->context->language->id, true);
|
$attributes = Attribute::getAttributes($this->context->language->id, true);
|
||||||
@@ -3240,8 +3240,7 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
$data->assign('currency', $currency);
|
$data->assign('currency', $currency);
|
||||||
|
|
||||||
$images = Image::getImages($this->context->language->id, $product->id);
|
$images = Image::getImages($this->context->language->id, $product->id);
|
||||||
if ($product->id)
|
|
||||||
{
|
|
||||||
$data->assign('tax_exclude_option', Tax::excludeTaxeOption());
|
$data->assign('tax_exclude_option', Tax::excludeTaxeOption());
|
||||||
$data->assign('ps_weight_unit', Configuration::get('PS_WEIGHT_UNIT'));
|
$data->assign('ps_weight_unit', Configuration::get('PS_WEIGHT_UNIT'));
|
||||||
|
|
||||||
@@ -3262,9 +3261,6 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
++$i;
|
++$i;
|
||||||
}
|
}
|
||||||
$data->assign('images', $images);
|
$data->assign('images', $images);
|
||||||
}
|
|
||||||
else
|
|
||||||
$this->content .= '<b>'.$this->l('You must save this product before adding combinations').'.</b>';
|
|
||||||
|
|
||||||
// @todo
|
// @todo
|
||||||
$data->assign('up_filename', strval(Tools::getValue('virtual_product_filename_attribute')));
|
$data->assign('up_filename', strval(Tools::getValue('virtual_product_filename_attribute')));
|
||||||
@@ -3277,7 +3273,10 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
$data->assign('product', $product);
|
||||||
$this->displayWarning($this->l('You must save this product before adding combinations.'));
|
$this->displayWarning($this->l('You must save this product before adding combinations.'));
|
||||||
|
}
|
||||||
|
|
||||||
$this->tpl_form_vars['custom_form'] = $data->fetch();
|
$this->tpl_form_vars['custom_form'] = $data->fetch();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user