// adding ovverride method initProcess for display Informations Tab
This commit is contained in:
@@ -118,6 +118,7 @@ input.button[disabled=disabled]:hover{background-color:#FFF6D3}
|
|||||||
.table tr td{border-bottom:1px solid #ccc;color:#333;font-size:11px;padding: 4px 4px 4px 6px;}
|
.table tr td{border-bottom:1px solid #ccc;color:#333;font-size:11px;padding: 4px 4px 4px 6px;}
|
||||||
.table tr:hover td{background:#fff1b5}
|
.table tr:hover td{background:#fff1b5}
|
||||||
.table tr.filter:hover td{background:#F1F9FF}
|
.table tr.filter:hover td{background:#F1F9FF}
|
||||||
|
.table tr td:hover table tr td{background:none}
|
||||||
.table tr.action_details td{background:#FAFAFA;}
|
.table tr.action_details td{background:#FAFAFA;}
|
||||||
.table tr.alt_row.action_details td{background:#E8E8E8;}
|
.table tr.alt_row.action_details td{background:#E8E8E8;}
|
||||||
.table tr td.empty{border-bottom:none;background:white!important}
|
.table tr td.empty{border-bottom:none;background:white!important}
|
||||||
|
|||||||
@@ -171,13 +171,13 @@ class AdminHomeControllerCore extends AdminController
|
|||||||
private function getQuickLinks()
|
private function getQuickLinks()
|
||||||
{
|
{
|
||||||
$quick_links['first'] = array(
|
$quick_links['first'] = array(
|
||||||
'href' => $this->context->link->getAdminLink('AdminCatalog').'&addcategory',
|
'href' => $this->context->link->getAdminLink('AdminCategories').'&addcategory',
|
||||||
'title' => $this->l('New category'),
|
'title' => $this->l('New category'),
|
||||||
'description' => $this->l('Create a new category and organize your products.'),
|
'description' => $this->l('Create a new category and organize your products.'),
|
||||||
);
|
);
|
||||||
|
|
||||||
$quick_links['second'] = array(
|
$quick_links['second'] = array(
|
||||||
'href' => $this->context->link->getAdminLink('AdminCatalog').'&addproduct',
|
'href' => $this->context->link->getAdminLink('AdminProducts').'&addproduct',
|
||||||
'title' => $this->l('New product'),
|
'title' => $this->l('New product'),
|
||||||
'description' => $this->l('Fill up your catalog with new articles and attributes.'),
|
'description' => $this->l('Fill up your catalog with new articles and attributes.'),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1509,8 +1509,8 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
// Trick's
|
// Trick's
|
||||||
if ($edit == 1)
|
if ($edit == 1)
|
||||||
{
|
{
|
||||||
$id_product_download_attribute = ProductDownload::getIdFromIdAttribute((int) $product->id, $id_product_attribute);
|
$id_product_download_attribute = ProductDownload::getIdFromIdAttribute((int)$product->id, $id_product_attribute);
|
||||||
$id_product_download = ($id_product_download_attribute) ? (int) $id_product_download_attribute : (int) Tools::getValue('virtual_product_id');
|
$id_product_download = ($id_product_download_attribute) ? (int)$id_product_download_attribute : (int)Tools::getValue('virtual_product_id');
|
||||||
} else
|
} else
|
||||||
$id_product_download = Tools::getValue('virtual_product_id');
|
$id_product_download = Tools::getValue('virtual_product_id');
|
||||||
|
|
||||||
@@ -1551,16 +1551,16 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
$filename = ProductDownload::getNewFilename();
|
$filename = ProductDownload::getNewFilename();
|
||||||
|
|
||||||
$download = new ProductDownload($id_product_download);
|
$download = new ProductDownload($id_product_download);
|
||||||
$download->id_product = (int) $product->id;
|
$download->id_product = (int)$product->id;
|
||||||
$download->id_product_attribute = (int) $id_product_attribute;
|
$download->id_product_attribute = (int)$id_product_attribute;
|
||||||
$download->display_filename = $virtual_product_name;
|
$download->display_filename = $virtual_product_name;
|
||||||
$download->filename = $filename;
|
$download->filename = $filename;
|
||||||
$download->date_add = date('Y-m-d H:i:s');
|
$download->date_add = date('Y-m-d H:i:s');
|
||||||
$download->date_expiration = $virtual_product_expiration_date ? $virtual_product_expiration_date.' 23:59:59' : '';
|
$download->date_expiration = $virtual_product_expiration_date ? $virtual_product_expiration_date.' 23:59:59' : '';
|
||||||
$download->nb_days_accessible = (int) $virtual_product_nb_days;
|
$download->nb_days_accessible = (int)$virtual_product_nb_days;
|
||||||
$download->nb_downloadable = (int) $virtual_product_nb_downloable;
|
$download->nb_downloadable = (int)$virtual_product_nb_downloable;
|
||||||
$download->active = 1;
|
$download->active = 1;
|
||||||
$download->is_shareable = (int) $is_shareable;
|
$download->is_shareable = (int)$is_shareable;
|
||||||
|
|
||||||
if ($download->save())
|
if ($download->save())
|
||||||
return true;
|
return true;
|
||||||
@@ -1570,8 +1570,8 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
/* unactive download product if checkbox not checked */
|
/* unactive download product if checkbox not checked */
|
||||||
if ($edit == 1)
|
if ($edit == 1)
|
||||||
{
|
{
|
||||||
$id_product_download_attribute = ProductDownload::getIdFromIdAttribute((int) $product->id, $id_product_attribute);
|
$id_product_download_attribute = ProductDownload::getIdFromIdAttribute((int)$product->id, $id_product_attribute);
|
||||||
$id_product_download = ($id_product_download_attribute) ? (int) $id_product_download_attribute : (int) Tools::getValue('virtual_product_id');
|
$id_product_download = ($id_product_download_attribute) ? (int)$id_product_download_attribute : (int)Tools::getValue('virtual_product_id');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$id_product_download = ProductDownload::getIdFromIdProduct($product->id);
|
$id_product_download = ProductDownload::getIdFromIdProduct($product->id);
|
||||||
@@ -1636,14 +1636,29 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
/* Assign tags to this product */
|
/* Assign tags to this product */
|
||||||
foreach ($languages as $language)
|
foreach ($languages as $language)
|
||||||
if ($value = Tools::getValue('tags_'.$language['id_lang']))
|
if ($value = Tools::getValue('tags_'.$language['id_lang']))
|
||||||
$tagError &= Tag::addTags($language['id_lang'], (int)($product->id), $value);
|
$tagError &= Tag::addTags($language['id_lang'], (int)$product->id, $value);
|
||||||
return $tagError;
|
return $tagError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function initProcess()
|
||||||
|
{
|
||||||
|
parent::initProcess();
|
||||||
|
if (isset($_GET['add'.$this->table]))
|
||||||
|
{
|
||||||
|
if ($this->tabAccess['add'] === '1')
|
||||||
|
{
|
||||||
|
$this->action = 'Informations';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$this->_errors[] = Tools::displayError('You do not have permission to add here.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function initContent($token = null)
|
public function initContent($token = null)
|
||||||
{
|
{
|
||||||
if ($this->action == 'save')
|
if ($this->action == 'save')
|
||||||
$this->action = '';
|
$this->action = '';
|
||||||
|
|
||||||
// this is made to "save and stay" feature
|
// this is made to "save and stay" feature
|
||||||
$this->tpl_form_vars['show_product_tab_content'] = Tools::getValue('action');
|
$this->tpl_form_vars['show_product_tab_content'] = Tools::getValue('action');
|
||||||
if (Tools::getValue('id_product') || ((Tools::isSubmit('submitAddproduct') OR Tools::isSubmit('submitAddproductAndPreview') OR Tools::isSubmit('submitAddproductAndStay') OR Tools::isSubmit('submitSpecificPricePriorities') OR Tools::isSubmit('submitPriceAddition') OR Tools::isSubmit('submitPricesModification')) AND count($this->_errors)) OR Tools::isSubmit('updateproduct') OR Tools::isSubmit('addproduct'))
|
if (Tools::getValue('id_product') || ((Tools::isSubmit('submitAddproduct') OR Tools::isSubmit('submitAddproductAndPreview') OR Tools::isSubmit('submitAddproductAndStay') OR Tools::isSubmit('submitSpecificPricePriorities') OR Tools::isSubmit('submitPriceAddition') OR Tools::isSubmit('submitPricesModification')) AND count($this->_errors)) OR Tools::isSubmit('updateproduct') OR Tools::isSubmit('addproduct'))
|
||||||
@@ -1694,9 +1709,8 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
$this->tpl_form_vars['tabs_toolbar_save_buttons'] = $this->tabs_toolbar_save_buttons;
|
$this->tpl_form_vars['tabs_toolbar_save_buttons'] = $this->tabs_toolbar_save_buttons;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$languages = Language::getLanguages(false);
|
$languages = Language::getLanguages(false);
|
||||||
$default_language = (int)(Configuration::get('PS_LANG_DEFAULT'));
|
$default_language = (int)Configuration::get('PS_LANG_DEFAULT');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user