[-] BO : #PSFV-646 - Fix problem with button save & preview
// Replace some "else if" by "elseif"
This commit is contained in:
@@ -29,7 +29,7 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
/** @var integer Max image size for upload
|
/** @var integer Max image size for upload
|
||||||
* As of 1.5 it is recommended to not set a limit to max image size
|
* As of 1.5 it is recommended to not set a limit to max image size
|
||||||
**/
|
*/
|
||||||
protected $max_file_size = null;
|
protected $max_file_size = null;
|
||||||
protected $max_image_size = null;
|
protected $max_image_size = null;
|
||||||
|
|
||||||
@@ -924,6 +924,17 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
else
|
else
|
||||||
$this->errors[] = Tools::displayError('You do not have permission to delete here.');
|
$this->errors[] = Tools::displayError('You do not have permission to delete here.');
|
||||||
}
|
}
|
||||||
|
// Product preview
|
||||||
|
elseif (Tools::isSubmit('submitAddProductAndPreview'))
|
||||||
|
{
|
||||||
|
$this->display = 'edit';
|
||||||
|
$this->action = 'save';
|
||||||
|
if (Tools::getValue('id_product'))
|
||||||
|
{
|
||||||
|
$this->id_object = Tools::getValue('id_product');
|
||||||
|
$this->object = new Product((int)Tools::getValue('id_product'));
|
||||||
|
}
|
||||||
|
}
|
||||||
// Update attachments
|
// Update attachments
|
||||||
elseif (Tools::isSubmit('submitAddAttachments'))
|
elseif (Tools::isSubmit('submitAddAttachments'))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user