diff --git a/ChangeLog.md b/ChangeLog.md
index bbe7b64..3b88f6b 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,9 @@
# ChangeLog
+## 4.1.62.0
+- Ajout d'une option sur le parametrage des "attributs" de produit pour definir l'affichage de celui-ci sur WooCommerce
+- Correction de la page "A propos"
+
## 4.1.61.0
- Ajout d'un champ dans la liste des factures pour afficher le delta entre le total TTC et le total HT plus total TVA
- Ajout d'un script pour corriger les factures en recreant les lignes de celles-ci (et modifie le prix des lignes existantes de la commande liƩ, ne creer pas les nouvelle lignes manquantes)
diff --git a/VERSION b/VERSION
index 9ae0c12..6b1b7f6 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-4.1.61
\ No newline at end of file
+4.1.62
\ No newline at end of file
diff --git a/admin/about.php b/admin/about.php
index 7862e81..b9b3c8e 100644
--- a/admin/about.php
+++ b/admin/about.php
@@ -34,7 +34,35 @@
$langs->load("ecommerce@ecommerceng");
$langs->load("opendsi@ecommerceng");
-if (!$user->admin) accessforbidden();
+if (!$user->admin && !$user->rights->ecommerceng->site) accessforbidden();
+
+$id = GETPOST('id', 'int');
+$action = GETPOST('action', 'aZ09');
+$confirm = GETPOST('confirm', 'aZ09');
+
+$object = new eCommerceSite($db);
+if (empty($action) && !($id > 0) && strlen($id) == 0) {
+ $sites = $object->listSites();
+ if (!empty($sites)) {
+ $id = array_values($sites)[0]['id'];
+ }
+}
+if ($id > 0) {
+ $result = $object->fetch($id);
+ if ($result < 0) {
+ accessforbidden($object->errorsToString());
+ } elseif ($result == 0) {
+ $langs->load('errors');
+ accessforbidden($langs->trans('ErrorRecordNotFound'));
+ }
+}
+
+/**
+ * Actions
+ */
+$error = 0;
+
+include dol_buildpath('/ecommerceng/admin/actions_selectsite.inc.php');
/**
@@ -46,12 +74,13 @@
$linkback=''.$langs->trans("BackToModuleList").'';
print load_fiche_titre($langs->trans("ECommerceSetup"),$linkback,'title_setup');
-print "
\n";
+
+include dol_buildpath('/ecommerceng/admin/tpl/selectsite.tpl.php');
$head=ecommercengConfigSitePrepareHead($object);
print dol_get_fiche_head($head, 'about', $langs->trans("Module107100Name"), 0, 'opendsi@ecommerceng');
-
+print '
';
$modClass = new modECommerceNg($db);
$ECommerceNgVersion = !empty($modClass->getVersion()) ? $modClass->getVersion() : 'NC';
diff --git a/admin/actions_extrafields.inc.php b/admin/actions_extrafields.inc.php
index 20c0edc..f1b604b 100644
--- a/admin/actions_extrafields.inc.php
+++ b/admin/actions_extrafields.inc.php
@@ -35,6 +35,7 @@
$activated_list = array();
$value_list = array();
+ $show_list = array();
foreach ($extra_fields_list[$table_element]['extra_fields'] as $key => $label) {
// default value
$activated = GETPOST("ef_dft_state_{$table_element}_{$key}", 'int') ? 1 : 0;
@@ -56,9 +57,13 @@
$value = $activated ? GETPOST("ef_att_value_{$table_element}_{$key}", 'alphanohtml') :
(!empty($object->parameters['extra_fields'][$table_element]['values']['att'][$key]) ? $object->parameters['extra_fields'][$table_element]['values']['att'][$key] : null);
if (isset($value)) $value_list['att'][$key] = $value;
+ $show = $activated ? GETPOST("ef_att_show_{$table_element}_{$key}", 'alphanohtml') :
+ (!empty($object->parameters['extra_fields'][$table_element]['show']['att'][$key]) ? $object->parameters['extra_fields'][$table_element]['show']['att'][$key] : null);
+ if (isset($show)) $show_list['att'][$key] = $show;
}
$object->parameters['extra_fields'][$table_element]['activated'] = $activated_list;
$object->parameters['extra_fields'][$table_element]['values'] = $value_list;
+ $object->parameters['extra_fields'][$table_element]['show'] = $show_list;
$result = $object->update($user);
diff --git a/admin/tpl/extrafields.tpl.php b/admin/tpl/extrafields.tpl.php
index 637b03a..aefa0a6 100644
--- a/admin/tpl/extrafields.tpl.php
+++ b/admin/tpl/extrafields.tpl.php
@@ -75,6 +75,7 @@
$activated_info = $object->parameters['extra_fields'][$table_element]['activated'];
$values_info = $object->parameters['extra_fields'][$table_element]['values'];
+ $show_info = $object->parameters['extra_fields'][$table_element]['show'];
foreach ($info['extra_fields'] as $key => $label) {
if (!empty($extrafields->attributes[$table_element]['langfile'][$key])) $langs->load($extrafields->attributes[$table_element]['langfile'][$key]);
@@ -83,6 +84,7 @@
if (!empty($info['default'])) {
$not_supported = in_array($extrafields->attributes[$table_element]['type'][$key], [ 'date', 'datetime' ]);
+ $target_class = 'ef_dft_' . $table_element . '_' . $key;
$default_value = '';
if (isset($extrafields->attributes[$table_element]['default'][$key])) $default_value = $extrafields->attributes[$table_element]['default'][$key];
$value = isset($values_info['dft'][$key]) ? $values_info['dft'][$key] : $default_value;
@@ -92,33 +94,37 @@
print $langs->trans('NotSupported');
} else {
// print $extrafields->showInputField($key, $value, ($activated ? '' : ' disabled'), '', 'ef_dft_value_' . $table_element . '_', '', 0, $table_element);
- print '';
+ print '';
}
print '' . "\n";
print '