-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from Eoxia/1.2.0
1.2.0
- Loading branch information
Showing
38 changed files
with
1,605 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
.idea | ||
.tx | ||
.editorconfig | ||
test |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,25 @@ | ||
# CHANGELOG WPSHOP FOR <a href="https://www.dolibarr.org">DOLIBARR ERP CRM</a> | ||
|
||
## 0.1.0 | ||
# 1.2.0 | ||
- Création d'un Utilisateur API avec affectation des droits limité pour préserver une sécurité optimale. | ||
- Rajout de fichier index pour éviter de naviguer librement dans les fichiers du module. | ||
- Rajout du flux de création automatique sur les propositions commerciales, commande, facture et paiements. | ||
- Rajout de traduction. | ||
- Réalisation d'une page personnaliser de paiment en ligne. | ||
- Création et configuration des traductions d'un produit. (description,titre) | ||
- Synchronisation avec les informations du plugins de traductions WPML sur Wordpress. | ||
- Création d'un post relatif à la traduction du produit Dolibarr sur Wordpress. | ||
|
||
#1.1.1 | ||
Modifications DOL_DOCUMENT_ROOT en include_once | ||
WPshop ID sur les produits unique | ||
|
||
#1.1.0 | ||
Rajout des la synchronisation direct des médias | ||
Corrections de nombreux bugs | ||
|
||
## 1.0.0 | ||
Initial version | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,44 @@ | ||
# DoliWPshop | ||
# DoliWPshop pour [DOLIBARR ERP CRM](https://www.dolibarr.org) | ||
|
||
Module for Dolibarr ERP/CRM to connect WPshop Plugin from WordPress. | ||
Module pour Dolibarr ERP/CRM connecté le plugin WPshop de WordPress. | ||
|
||
## Fonctionnalités | ||
|
||
- Connecter le plugin WPshop de WordPress et l'ERP/CRM Dolibarr. | ||
-Synchronisation des produits, tiers et médias. | ||
- Utilisation du service de paiement en ligne Dolibarr. | ||
- Récupération des documents et images lié au produits. | ||
- Flux de création automatique sur les propositions commerciales, commande, facture et paiements. | ||
|
||
Retrouver d'autre module développée par [EOXIA](https://www.eoxia.com/) sur [Dolistore.com](https://www.dolistore.com). | ||
|
||
## Traduction | ||
|
||
La traduction de ce module peut être définie manuellement en éditant les fichiers dans le dossier *langs*. | ||
|
||
## Installation | ||
|
||
### Méthode 1 : | ||
|
||
- Depuis le menu "Déployer/Installer un module externe" de Dolibarr : | ||
- Glisser l'archive ZIP 'module_doliwpshop-x.x.x' et cliquer sur "ENVOYER" | ||
- Activer le module dans la liste des Modules/Applications installés | ||
|
||
### Méthode 2 : | ||
|
||
- Dans le dossier "dolibarr/htdocs/custom" copier la ligne suivante : | ||
``` | ||
git clone https://github.com/Eoxia/doliwpshop.git | ||
``` | ||
|
||
## Licenses | ||
|
||
Ce module est publié sous licence AGPLv3. | ||
|
||
### Documentation | ||
|
||
Le wiki de ce module est accessible sur la page suivante : | ||
https://wiki.dolibarr.org/index.php/Module_DoliWPshop | ||
|
||
La documentation de ce module est accessible sur la page suivante : | ||
https://wpshop.fr/documentation/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
// Silence is golden. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
<?php | ||
/* Copyright (C) 2021 EOXIA <[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 <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/** | ||
* \file htdocs/custom/doliwpshop/admin/product_lang_extrafields.php | ||
* \ingroup doliwpshop | ||
* \brief Page to setup extra fields of traduction | ||
*/ | ||
|
||
// Load Dolibarr environment | ||
$res = 0; | ||
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) | ||
if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; | ||
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME | ||
$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; | ||
while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } | ||
if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; | ||
if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; | ||
// Try main.inc.php using relative path | ||
if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; | ||
if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; | ||
if (!$res) die("Include of main fails"); | ||
|
||
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; | ||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; | ||
|
||
// Load translation files required by the page | ||
$langs->loadLangs(array('companies', 'admin', 'products')); | ||
|
||
$extrafields = new ExtraFields($db); | ||
$form = new Form($db); | ||
|
||
// List of supported format | ||
$tmptype2label = ExtraFields::$type2label; | ||
$type2label = array(''); | ||
foreach ($tmptype2label as $key => $val) { | ||
$type2label[$key] = $langs->transnoentitiesnoconv($val); | ||
} | ||
|
||
$action = GETPOST('action', 'aZ09'); | ||
$attrname = GETPOST('attrname', 'alpha'); | ||
$elementtype = 'product_lang'; //Must be the $element of the class that manage extrafield | ||
|
||
if (!$user->admin) { | ||
accessforbidden(); | ||
} | ||
|
||
|
||
/* | ||
* Actions | ||
*/ | ||
|
||
require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; | ||
|
||
|
||
|
||
/* | ||
* View | ||
*/ | ||
|
||
$title = $langs->trans('ProductLangsExtraFields'); | ||
$textobject = $langs->trans("ProductsAndServices"); | ||
if (empty($conf->product->enabled)) { | ||
$title = $langs->trans('ServiceSetup'); | ||
$textobject = $langs->trans('Services'); | ||
} elseif (empty($conf->service->enabled)) { | ||
$title = $langs->trans('ProductSetup'); | ||
$textobject = $langs->trans('Products'); | ||
} | ||
|
||
$help_url = ''; | ||
llxHeader('', $title, $help_url); | ||
|
||
|
||
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>'; | ||
print load_fiche_titre($title, $linkback, 'title_setup'); | ||
|
||
|
||
$head = product_admin_prepare_head(); | ||
|
||
print dol_get_fiche_head($head, 'productLangAttributes', $textobject, -1, 'product'); | ||
|
||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; | ||
|
||
print dol_get_fiche_end(); | ||
|
||
|
||
// Buttons | ||
if ($action != 'create' && $action != 'edit') { | ||
print '<div class="tabsAction">'; | ||
print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>"; | ||
print "</div>"; | ||
} | ||
|
||
|
||
// Creation of an optional field | ||
if ($action == 'create') { | ||
print '<br><div id="newattrib"></div>'; | ||
print load_fiche_titre($langs->trans('NewAttribute')); | ||
|
||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; | ||
} | ||
|
||
// Edition of an optional field | ||
if ($action == 'edit' && !empty($attrname)) { | ||
print "<br>"; | ||
print load_fiche_titre($langs->trans("FieldEdition", $attrname)); | ||
|
||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; | ||
} | ||
|
||
// End of page | ||
llxFooter(); | ||
$db->close(); |
Oops, something went wrong.