52 $this->rights_class =
'variants';
56 $this->family =
"products";
58 $this->module_position =
'50';
60 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
62 $this->
description =
'Allows creating products variant based on new attributes';
64 $this->version =
'dolibarr';
66 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
70 $this->picto =
'product';
73 $this->module_parts = array();
77 $this->dirs = array();
80 $this->config_page_url = array(
'admin.php@variants');
83 $this->hidden =
false;
84 $this->depends = array(
'modProduct');
85 $this->requiredby = array();
86 $this->conflictwith = array();
87 $this->phpmin = array(7, 0);
88 $this->need_dolibarr_version = array(3, 0);
89 $this->langfiles = array(
"products");
92 $this->
const = array();
100 if (!isset($conf->variants->enabled)) {
102 $conf->variants->enabled = 0;
104 $this->dictionaries = array();
108 $this->boxes = array();
111 $this->rights = array();
114 $this->rights[$r][0] = $this->numero + 1;
115 $this->rights[$r][1] =
'Read attributes of variants';
116 $this->rights[$r][4] =
'read';
118 $this->rights[$r][0] = $this->numero + 2;
119 $this->rights[$r][1] =
'Create/Update attributes of variants';
120 $this->rights[$r][4] =
'write';
122 $this->rights[$r][0] = $this->numero + 3;
123 $this->rights[$r][1] =
'Delete attributes of variants';
124 $this->rights[$r][4] =
'delete';