forked from Wavyzz/dolibarr
Use isModEnabled
This commit is contained in:
@@ -55,7 +55,7 @@ if (isModEnabled('project')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
}
|
||||
|
||||
if (!empty($conf->variants->enabled)) {
|
||||
if (isModEnabled('variants')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php';
|
||||
}
|
||||
|
||||
@@ -976,7 +976,7 @@ if (empty($reshook)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error && !empty($conf->variants->enabled) && $prod_entry_mode != 'free') {
|
||||
if (!$error && isModEnabled('variants') && $prod_entry_mode != 'free') {
|
||||
if ($combinations = GETPOST('combinations', 'array')) {
|
||||
//Check if there is a product with the given combination
|
||||
$prodcomb = new ProductCombination($db);
|
||||
|
||||
@@ -2313,7 +2313,7 @@ class Form
|
||||
}
|
||||
$out .= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/product/ajax/products.php', $urloption, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT, 1, $ajaxoptions);
|
||||
|
||||
if (!empty($conf->variants->enabled) && is_array($selected_combinations)) {
|
||||
if (isModEnabled('variants') && is_array($selected_combinations)) {
|
||||
// Code to automatically insert with javascript the select of attributes under the select of product
|
||||
// when a parent of variant has been selected.
|
||||
$out .= '
|
||||
|
||||
@@ -94,7 +94,7 @@ function product_prepare_head($object)
|
||||
$h++;
|
||||
}
|
||||
|
||||
if (!empty($conf->variants->enabled) && ($object->isProduct() || $object->isService())) {
|
||||
if (isModEnabled('variants') && ($object->isProduct() || $object->isService())) {
|
||||
global $db;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php';
|
||||
|
||||
@@ -58,7 +58,7 @@ if (isModEnabled('project')) {
|
||||
}
|
||||
require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP
|
||||
|
||||
if (!empty($conf->variants->enabled)) {
|
||||
if (isModEnabled('variants')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php';
|
||||
}
|
||||
|
||||
@@ -485,7 +485,7 @@ if (empty($reshook)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error && !empty($conf->variants->enabled) && $prod_entry_mode != 'free') {
|
||||
if (!$error && isModEnabled('variants') && $prod_entry_mode != 'free') {
|
||||
if ($combinations = GETPOST('combinations', 'array')) {
|
||||
//Check if there is a product with the given combination
|
||||
$prodcomb = new ProductCombination($db);
|
||||
|
||||
@@ -55,7 +55,7 @@ if (isModEnabled('project')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
}
|
||||
|
||||
if (!empty($conf->variants->enabled)) {
|
||||
if (isModEnabled('variants')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php';
|
||||
}
|
||||
if (isModEnabled('accounting')) {
|
||||
@@ -1465,7 +1465,7 @@ if (empty($reshook)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error && !empty($conf->variants->enabled) && $prod_entry_mode != 'free') {
|
||||
if (!$error && isModEnabled('variants') && $prod_entry_mode != 'free') {
|
||||
if ($combinations = GETPOST('combinations', 'array')) {
|
||||
//Check if there is a product with the given combination
|
||||
$prodcomb = new ProductCombination($db);
|
||||
|
||||
Reference in New Issue
Block a user