// adding ovverride method initProcess for display Informations Tab

This commit is contained in:
lLefevre committed 2011-12-08 15:41:12 +00:00
1 parent 133e64cc55
commit 53e4c68c35
3 files changed
+20 -5

No files matched your search

+1
View File
@@ -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}
+2 -2
View File
@@ -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.'),
); );
+17 -3
View File
@@ -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
{ {