*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
$langs->loadLangs(array("admin", "products"));
// Security check
if (! $user->admin || (empty($conf->product->enabled) && empty($conf->service->enabled)))
accessforbidden();
if ($_POST) {
$value = GETPOST('PRODUIT_ATTRIBUTES_HIDECHILD');
if (dolibarr_set_const($db, 'PRODUIT_ATTRIBUTES_HIDECHILD', $value, 'chaine', 0, '', $conf->entity)) {
setEventMessage($langs->trans('RecordSaved'));
} else {
setEventMessage($langs->trans('CoreErrorMessage'), 'errors');
}
if (dolibarr_set_const($db, 'PRODUIT_ATTRIBUTES_SEPARATOR', GETPOST('PRODUIT_ATTRIBUTES_SEPARATOR'), 'chaine', 0, '', $conf->entity)) {
setEventMessage($langs->trans('RecordSaved'));
} else {
setEventMessage($langs->trans('CoreErrorMessage'), 'errors');
}
}
$title = $langs->trans('ModuleSetup').' '.$langs->trans('ProductAttributes');
llxHeader('', $title);
$linkback=''.$langs->trans("BackToModuleList").'';
print load_fiche_titre($title,$linkback,'title_setup');
dol_fiche_head(array(), 'general', $tab, 0, 'product');
print '
';
llxFooter();
$db->close();