20require
'../../main.inc.php';
21require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
22require_once DOL_DOCUMENT_ROOT.
'/variants/lib/variants.lib.php';
23require_once DOL_DOCUMENT_ROOT.
'/core/lib/product.lib.php';
25$langs->loadLangs(array(
"admin",
"products"));
27$action =
GETPOST(
'action',
'alphanohtml');
30if (!$user->admin || !isModEnabled(
'variants')) {
42 $value =
GETPOST(
'PRODUIT_ATTRIBUTES_HIDECHILD');
44 if (!
dolibarr_set_const($db,
'PRODUIT_ATTRIBUTES_HIDECHILD', $value,
'chaine', 0,
'', $conf->entity)) {
49 if (!
dolibarr_set_const($db,
'PRODUIT_ATTRIBUTES_SEPARATOR',
GETPOST(
'PRODUIT_ATTRIBUTES_SEPARATOR'),
'chaine', 0,
'', $conf->entity)) {
54 if (!
dolibarr_set_const($db,
'VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT',
GETPOST(
'VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT'),
'chaine', 0,
'', $conf->entity)) {
64$title = $langs->trans(
'ModuleSetup').
' '.$langs->trans(
'Module610Name');
67$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
74print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
75print
'<input type="hidden" name="token" value="'.newToken().
'">';
76print
'<input type="hidden" name="action" value="update">';
78print
'<table class="noborder centpercent">';
80print
'<tr class="liste_titre">';
81print
'<th>'.$langs->trans(
"Parameters").
'</th>'.
"\n";
82print
'<th class="right" width="60">'.$langs->trans(
"Value").
'</th>'.
"\n";
85print
'<tr class="oddeven"><td>'.$langs->trans(
'HideProductCombinations').
'</td><td>';
86print $form->selectyesno(
"PRODUIT_ATTRIBUTES_HIDECHILD",
getDolGlobalString(
'PRODUIT_ATTRIBUTES_HIDECHILD'), 1).
'</td></tr>';
88print
'<tr class="oddeven"><td>'.$langs->trans(
'CombinationsSeparator').
'</td>';
89if (isset($conf->global->PRODUIT_ATTRIBUTES_SEPARATOR)) {
94print
'<td class="right"><input size="3" type="text" class="flat" name="PRODUIT_ATTRIBUTES_SEPARATOR" value="'.$separator.
'"></td></tr>';
96print
'<tr class="oddeven"><td>'.$form->textwithpicto($langs->trans(
'AllowStockMovementVariantParent'), $langs->trans(
'AllowStockMovementVariantParentHelp')).
'</td><td>';
97print $form->selectyesno(
"VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT",
getDolGlobalString(
'VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT'), 1).
'</td></tr>';
101print
'<br><div class="center"><input type="submit" value="'.$langs->trans(
"Save").
'" class="button button-save"></div>';
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
adminProductAttributePrepareHead()
Prepare array with list of tabs.