51 $this->rights_class =
'variants';
55 $this->family =
"products";
57 $this->module_position =
'50';
59 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
61 $this->
description =
'Allows creating products variant based on new attributes';
63 $this->version =
'dolibarr';
65 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
69 $this->picto =
'product';
72 $this->module_parts = array();
76 $this->dirs = array();
79 $this->config_page_url = array(
'admin.php@variants');
82 $this->hidden =
false;
83 $this->depends = array(
'modProduct');
84 $this->requiredby = array();
85 $this->conflictwith = array();
86 $this->phpmin = array(7, 0);
87 $this->need_dolibarr_version = array(3, 0);
88 $this->langfiles = array(
"products");
91 $this->
const = array();
99 if (!isset($conf->variants->enabled)) {
100 $conf->variants =
new stdClass();
101 $conf->variants->enabled = 0;
103 $this->dictionaries = array();
107 $this->boxes = array();
110 $this->rights = array();
113 $this->rights[$r][0] = $this->numero + $r;
114 $this->rights[$r][1] =
'Read attributes of variants';
115 $this->rights[$r][4] =
'read';
117 $this->rights[$r][0] = $this->numero + $r;
118 $this->rights[$r][1] =
'Create/Update attributes of variants';
119 $this->rights[$r][4] =
'write';
121 $this->rights[$r][0] = $this->numero + $r;
122 $this->rights[$r][1] =
'Delete attributes of variants';
123 $this->rights[$r][4] =
'delete';