Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
Changement marque, page support, CI, coquilles
Browse files Browse the repository at this point in the history
  • Loading branch information
pandreani-opendsi committed Jun 3, 2024
1 parent 37026e2 commit 497e9cf
Show file tree
Hide file tree
Showing 22 changed files with 900 additions and 44 deletions.
4 changes: 2 additions & 2 deletions .easya_info.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"dol_min": 14,
"dol_max": 18
"dlb_min_version": 14,
"dlb_max_version": 18
}
3 changes: 3 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include:
- project: "opendsi/ci-templates"
file: "/dolibarr/module/main.yml"
9 changes: 8 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# ChangeLog

## 14.0.1
## [14.0.2] - 03-06-2024
- Changement de marque, page support, ajout CI, corrections de coquilles.

## [14.0.1]
- Changement de numérotation

## 4.1.72
Expand Down Expand Up @@ -884,3 +887,7 @@
## 3.9.0.0

- Initial version.


[Non Distribué]: https://github.com/OPEN-DSI/ecommerceng_woosync/compare/14.0.2...HEAD
[14.0.2]: https://github.com/OPEN-DSI/ecommerceng_woosync/commits/14.0.2
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

## You have to rename the folder to ecommerceng when you download the zip file or make a git clone. In other case the module will not work

Use it at you onwn risk Open-DSI does not provide support for the use, installation or bug fixing for this software. For this you have to acquire a time from our sales service https://www.easya.solutions/contact. You can also consult our company for any installation, configuration or development services.
Use it at you onwn risk Easya Solution does not provide support for the use, installation or bug fixing for this software. For this you have to acquire a time from our sales service https://www.easya.solutions/contact. You can also consult our company for any installation, configuration or development services.

Before any use, please refer to the documentatio to check the available functionnality
Before any use, please refer to the documentation to check the available functionnality
https://link.easya.solutions/woosync_doc


Utilisation à vos risques et périls. Open-DSI ne fournit pas de support à l’utilisation, à l'installation ni de correction de bugs pour ce logiciel. Pour cela vous devrez faire l’acquisition d’un crédit temps auprès de notre service commercial : https://www.easya.solutions/contact. Vous pouvez également nous consulter pour toute prestation d’installation, configuration ou développement.
Utilisation à vos risques et périls. Easya Solutions ne fournit pas de support à l’utilisation, à l'installation ni de correction de bugs pour ce logiciel. Pour cela vous devrez faire l’acquisition d’un crédit temps auprès de notre service commercial : https://www.easya.solutions/contact. Vous pouvez également nous consulter pour toute prestation d’installation, configuration ou développement.

Avant toute utilisation, merci de prendre connaissance de la documentation pour vérifier si le module répond en l'état à vos besoins
https://link.easya.solutions/woosync_doc
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.0.1
14.0.2
5 changes: 3 additions & 2 deletions admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
dol_include_once('/ecommerceng/core/modules/modECommerceNg.class.php');

$langs->load("admin");
$langs->load("ecommerce@ecommerceng");
$langs->load("ecommerceng@ecommerceng");
$langs->load("opendsi@ecommerceng");

if (!$user->admin && !$user->rights->ecommerceng->site) accessforbidden();
Expand Down Expand Up @@ -75,7 +75,8 @@
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print load_fiche_titre($langs->trans("ECommerceSetup"),$linkback,'title_setup');

include dol_buildpath('/ecommerceng/admin/tpl/selectsite.tpl.php');
// include dol_buildpath('/ecommerceng/admin/tpl/selectsite.tpl.php');
print '<br>';

$head=ecommercengConfigSitePrepareHead($object);

Expand Down
103 changes: 103 additions & 0 deletions admin/changelog.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?php
/* Copyright (C) 2007-2015 Laurent Destailleur <[email protected]>
* Copyright (C) 2019 Open-DSI <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

/**
* \file htdocs/custom/ecommerceng/admin/about.php
* \ingroup ecommerceng
* \brief Page about of ecommerceng module
*/

// Change this following line to use the correct relative path (../, ../../, etc)
$res=0;
if (! $res && file_exists("../../main.inc.php")) $res=@include '../../main.inc.php'; // to work if your module directory is into a subdir of root htdocs directory
if (! $res && file_exists("../../../main.inc.php")) $res=@include '../../../main.inc.php'; // to work if your module directory is into a subdir of root htdocs directory
if (! $res) die("Include of main fails");
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
dol_include_once('/ecommerceng/lib/eCommerce.lib.php');
dol_include_once('/ecommerceng/lib/opendsi_common.lib.php');
dol_include_once('/ecommerceng/core/modules/modECommerceNg.class.php');

$langs->loadLangs(array("admin", "orders", "companies", "bills", "accountancy", "banks", "oauth", "ecommerce@ecommerceng", "woocommerce@ecommerceng", "opendsi@ecommerceng"));

if (!$user->admin) accessforbidden();









$object = new eCommerceSite($db);
if (!($id > 0)) {
$sites = $object->listSites();
if (!empty($sites)) {
$id = array_values($sites)[0]['id'];
}
$action = '';
}
if ($id > 0) {
$result = $object->fetch($id);
if ($result < 0) {
accessforbidden($object->errorsToString());
} elseif ($result == 0) {
$langs->load('errors');
accessforbidden($langs->trans('ErrorRecordNotFound'));
}
} else {
accessforbidden($langs->trans('ErrorRecordNotFound'));
}

/*if (empty($conf->facture->enabled) && empty($conf->facture->enabled)) {
accessforbidden($langs->trans('ModuleDisabled'));
} */






/**
* View
*/

$wikihelp='EN:ECommerceNg_En|FR:ECommerceNg_Fr|ES:ECommerceNg_Es';
llxHeader('', $langs->trans("ECommerceSetup"), $wikihelp);

$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print load_fiche_titre($langs->trans("ECommerceSetup"),$linkback,'title_setup');
print "<br>\n";


$head=ecommercengConfigSitePrepareHead($object);

print dol_get_fiche_head($head, 'changelog', $langs->trans("Module107100Name"), 0, 'opendsi@ecommerceng');

$changelog = opendsi_common_getChangeLog('ecommerceng');

print '<div class="moduledesclong">'."\n";
print (!empty($changelog) ? $changelog : $langs->trans("NotAvailable"));
print '<div>'."\n";

print dol_get_fiche_end();


llxFooter();

$db->close();
6 changes: 3 additions & 3 deletions admin/order.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
dol_include_once('/ecommerceng/admin/class/data/eCommerceDict.class.php');
dol_include_once('/ecommerceng/class/data/eCommercePaymentGateways.class.php');

$langs->loadLangs(array("admin", "orders", "companies", "bills", "accountancy", "banks", "oauth", "ecommerce@ecommerceng", "woocommerce@ecommerceng"));
$langs->loadLangs(array("admin", "orders", "companies", "bills", "accountancy", "banks", "oauth", "ecommerce@ecommerceng", "woocommerce@ecommerceng", "opendsi@ecommerceng"));

if (!$user->admin && !$user->rights->ecommerceng->site) accessforbidden();

Expand Down Expand Up @@ -267,7 +267,7 @@
$form = new Form($db);
$formmail = new FormMail($db);

$wikihelp='';
$wikihelp='EN:ECommerceNg_En|FR:ECommerceNg_Fr|ES:ECommerceNg_Es';
llxHeader('', $langs->trans("ECommerceSetup"), $wikihelp, '', 0, 0, array(
'/ecommerceng/js/form.js',
));
Expand Down Expand Up @@ -297,7 +297,7 @@

$head=ecommercengConfigSitePrepareHead($object);

dol_fiche_head($head, 'order_invoice', $langs->trans("Module107100Name"), 0, 'eCommerce@ecommerceng');
print dol_get_fiche_head($head, 'order_invoice', $langs->trans("Module107100Name"), 0, 'opendsi@ecommerceng');

print '<div class="tabsAction tabsActionNoBottom">';
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=synchronize_payment_gateways&token='.ecommercengNewToken().'">'.$langs->trans('ECommerceUpdatePaymentGateways').'</a>';
Expand Down
6 changes: 3 additions & 3 deletions admin/product.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
dol_include_once('/ecommerceng/lib/eCommerce.lib.php');
dol_include_once('/ecommerceng/admin/class/data/eCommerceDict.class.php');

$langs->loadLangs(array("admin", "companies", "bills", "accountancy", "banks", "oauth", "ecommerce@ecommerceng", "woocommerce@ecommerceng"));
$langs->loadLangs(array("admin", "companies", "bills", "accountancy", "banks", "oauth", "ecommerce@ecommerceng", "woocommerce@ecommerceng", "opendsi@ecommerceng"));

if (!$user->admin && !$user->rights->ecommerceng->site) accessforbidden();

Expand Down Expand Up @@ -265,7 +265,7 @@
$formaccounting = new FormAccounting($db);

$v10p = version_compare(DOL_VERSION, "10.0.0") >= 0;
$wikihelp='';
$wikihelp='EN:ECommerceNg_En|FR:ECommerceNg_Fr|ES:ECommerceNg_Es';
llxHeader('', $langs->trans("ECommerceSetup"), $wikihelp, '', 0, 0, array(
'/ecommerceng/js/form.js',
));
Expand Down Expand Up @@ -299,7 +299,7 @@

$head=ecommercengConfigSitePrepareHead($object);

dol_fiche_head($head, 'product', $langs->trans("Module107100Name"), 0, 'eCommerce@ecommerceng');
print dol_get_fiche_head($head, 'product', $langs->trans("Module107100Name"), 0, 'opendsi@ecommerceng');

print '<div class="tabsAction tabsActionNoBottom">';
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=synchronize_attributes&token='.ecommercengNewToken().'">'.$langs->trans('ECommerceWoocommerceUpdateDictAttributes').'</a>';
Expand Down
6 changes: 3 additions & 3 deletions admin/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

use OAuth\Common\Storage\DoliStorage;

$langs->loadLangs(array("admin", "companies", "bills", "accountancy", "banks", "oauth", "ecommerce@ecommerceng", "woocommerce@ecommerceng"));
$langs->loadLangs(array("admin", "companies", "bills", "accountancy", "banks", "oauth", "ecommerce@ecommerce", "woocommerce@ecommerceng", "opendsi@ecommerceng"));

if (!$user->admin && !$user->rights->ecommerceng->site) accessforbidden();

Expand Down Expand Up @@ -278,7 +278,7 @@

$form = new Form($db);

$wikihelp='';
$wikihelp='EN:ECommerceNg_En|FR:ECommerceNg_Fr|ES:ECommerceNg_Es';
llxHeader('', $langs->trans("ECommerceSetup"), $wikihelp);

$formconfirm = '';
Expand Down Expand Up @@ -306,7 +306,7 @@

$head=ecommercengConfigSitePrepareHead($object);

dol_fiche_head($head, 'settings', $langs->trans("Module107100Name"), 0, 'eCommerce@ecommerceng');
print dol_get_fiche_head($head, 'settings', $langs->trans("Module107100Name"), 0, 'opendsi@ecommerceng');

if ($object->id > 0) {
print '<div class="tabsAction tabsActionNoBottom">';
Expand Down
6 changes: 3 additions & 3 deletions admin/stock.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
dol_include_once('/ecommerceng/class/html.formecommerceng.class.php');
dol_include_once('/ecommerceng/class/data/eCommerceRemoteWarehouses.class.php');

$langs->loadLangs(array("admin", "stocks", "ecommerce@ecommerceng", "woocommerce@ecommerceng"));
$langs->loadLangs(array("admin", "stocks", "ecommerce@ecommerceng", "woocommerce@ecommerceng", "opendsi@ecommerceng"));

if (!$user->admin && !$user->rights->ecommerceng->site) accessforbidden();

Expand Down Expand Up @@ -135,7 +135,7 @@
$formproduct = new FormProduct($db);
$formecommerceng = new FormECommerceNg($db);

$wikihelp='';
$wikihelp='EN:ECommerceNg_En|FR:ECommerceNg_Fr|ES:ECommerceNg_Es';
llxHeader('', $langs->trans("ECommerceSetup"), $wikihelp);

$formconfirm = '';
Expand Down Expand Up @@ -163,7 +163,7 @@

$head=ecommercengConfigSitePrepareHead($object);

dol_fiche_head($head, 'stock', $langs->trans("Module107100Name"), 0, 'eCommerce@ecommerceng');
print dol_get_fiche_head($head, 'stock', $langs->trans("Module107100Name"), 0, 'opendsi@ecommerceng');

if (!empty($object->parameters['enable_warehouse_plugin_support'])) {
print '<div class="tabsAction tabsActionNoBottom">';
Expand Down
6 changes: 3 additions & 3 deletions admin/thirdparty.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
dol_include_once('/ecommerceng/lib/eCommerce.lib.php');
dol_include_once('/ecommerceng/admin/class/data/eCommerceDict.class.php');

$langs->loadLangs(array("admin", "companies", "bills", "accountancy", "banks", "oauth", "ecommerce@ecommerceng", "woocommerce@ecommerceng"));
$langs->loadLangs(array("admin", "companies", "bills", "accountancy", "banks", "oauth", "ecommerce@ecommerce", "woocommerce@ecommerceng", "opendsi@ecommerceng"));

if (!$user->admin && !$user->rights->ecommerceng->site && !empty($conf->societe->enabled)) accessforbidden();

Expand Down Expand Up @@ -139,7 +139,7 @@
$form = new Form($db);
$category_static = new Categorie($db);

$wikihelp='';
$wikihelp='EN:ECommerceNg_En|FR:ECommerceNg_Fr|ES:ECommerceNg_Es';
llxHeader('', $langs->trans("ECommerceSetup"), $wikihelp, '', 0, 0, array(
'/ecommerceng/js/form.js',
));
Expand All @@ -151,7 +151,7 @@

$head=ecommercengConfigSitePrepareHead($object);

dol_fiche_head($head, 'thirdparty', $langs->trans("Module107100Name"), 0, 'eCommerce@ecommerceng');
print dol_get_fiche_head($head, 'thirdparty', $langs->trans("Module107100Name"), 0, 'opendsi@ecommerceng');

/**
* Settings.
Expand Down
11 changes: 6 additions & 5 deletions core/modules/modECommerceNg.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,18 @@ function __construct($db)
$this->family = 'easya';
$this->familyinfo = array('easya' => array('position' => '001', 'label' => $langs->trans("easyaFamily")));
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = 'EcommerceNg'; // Must be same than value used for if $conf->ecommerceng->enabled
$this->name = preg_replace('/^mod/i', '', get_class($this)); // Must be same than value used for if $conf->ecommerceng->enabled
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
$this->description = "Module to synchronise Dolibarr with ECommerce platform (currently ecommerce supported: WooCommerce)";
$this->descriptionlong = "See page https://wiki.dolibarr.org/index.php/Module_Magento_EN for more information";
$this->editor_name = '<b>Easya Solutions</b> (Ex Open-Dsi)';
$this->editor_name = '<b>Easya Solutions</b>)';
$this->editor_web = 'https://easya.solutions';
$this->editor_url = "https://easya.solutions";
$this->editor_email = '[email protected]';

// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = file_get_contents(__DIR__.'/../../VERSION');
$this->url_last_version = 'https://git.open-dsi.fr/dolibarr-extension/'.strtolower($this->name).'/-/raw/2022.5.3/VERSION';
$this->url_last_version = 'https://git.open-dsi.fr/dolibarr-extension/'.strtolower($this->name).'/-/raw/2024/VERSION';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_' . strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
Expand Down Expand Up @@ -114,8 +114,9 @@ function __construct($db)
// Dependencies
$this->depends = array("modSociete", "modProduct", "modCategorie", "modWebServices"); // List of modules id that must be enabled if this module is enabled
$this->requiredby = array(); // List of modules id to disable if this one is disabled
$this->phpmin = array(5, 3); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(3, 9); // Minimum version of Dolibarr required by module
$easya_info = json_decode(file_get_contents(__DIR__.'/../../.easya_info.json'));
$this->phpmin = explode('.', $easya_info->php_min_version); // Minimum version of PHP required by module
$this->need_dolibarr_version = explode('.', $easya_info->dlb_min_version); // Minimum version of Dolibarr required by module
$this->langfiles = array("ecommerce@ecommerceng", "woocommerce@ecommerceng");

// Constants
Expand Down
Binary file added img/object_opendsi copy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/object_opendsi_big.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/opendsi_dolibarr_preferred_partner.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 497e9cf

Please sign in to comment.