Module Woocommerce EN
Overview
Module Name | WooSync |
Editor / Editeur | Open-DSI |
Download or buy page / Page achat ou téléchargement | |
Status / Statut / Estado | Stable |
Prerequisites / Prérequis |
|
Last update date / Date mise à jour fiche / Fecha última actualización | 2024-01-3 |
Note / Nota | WooSync is a fork of EcommerceNG developed by TecLib |
Feature/Plugin
WooSync synchronizes data between WooCommerce and Dolibarr : thirdparties and contacts, products, orders... automatically from Dolibarr to WooCommerce and manually from WooCommerce to Dolibarr.
Development
The development of this module is not included into the standard GIT repository of Dolibarr; but inside a dedicated repository, managed by Open-DSI.
- GIT Repository: https://github.com/OPEN-DSI/ecommerceng
Installation
WooSync module has to be installed in your Dolibarr directory htdocs/custom
to work properly. To connect to Woocommerce app, Dolibarr uses by default Woocommerce's WebServices (REST API v2).
Dolibarr module
- Download the archive file of module (.zip file)
- Unzip the folder into the
htdocs/custom
directory of your Dolibarr. - Module is then visible into list of available modules (Home > Setup > Modules/applications) and can be activated.
Setup on Woocomerce side
- The option Enable guest checkout had better be disabled;
- The New User Default Role has to be set on "Client";
- WooSync has been tested without any other application than WP Oauth server and WP Mail SMTP by WPForms.
Setup on Dolibarr side
From Home > Setup > Other, hidden rules can be enabled :
ECOMMERCENG_DISABLE_LOG_IN_NOTE
at1
to disable the log in the private note of orders from WooCommerce in Dolibarr;ECOMMERCENG_SHOW_DEBUG_TOOLS
at1
to show init/purge/debug tools into site page;ECOMMERCENG_DISABLED_ERROR_FOR_SOCIETE_ID_0
at1
to disable the error at the creation of an order when societe id = 0 (administrator, anonymous, ...);ECOMMERCENG_SHOW_DEBUG_TOOLS
at1
to display debug options;ECOMMERCE_WOOCOMMERCE_DEFAULT_TVA
at1
to set default TVA rate to use;ECOMMERCENG_ENABLED_SYNCHRONIZE_IMAGES_PRODUCT_BUTTON
at1
to display the button to force picture synchronization on lnked files tab of product card;ECOMMERCENG_WOOCOMMERCE_DISABLED_SYNCHRO_IMAGE
at1
to prevent picture synchronization;ECOMMERCENG_SHIPPING_NOT_DISPLAY_IF_NULL
at1
not to display free shipping fees on Dolibar orders.
Items Synchronization between Dolibarr and WooCommerce
The WooCommerce ⇒ Dolibarr synchronization is made by a manual operation : It requires the user to click on "Woocommerce to Dolibarr sync" button.
The Dolibarr ⇒ WooCommerce synchronization is made in real time. No manual operation is required.
Items | Synchronization | Action | Comment |
---|---|---|---|
Categories
(thirdparties & products/services) |
Dolibarr ⇒ WooCommerce | None | In a future version, categories created in Dolibarr will be synchronized in WooCommerce |
WooCommerce ⇒ Dolibarr | They are synchronized as sub-categories of the parent category declared in Dolibarr (WooCommerce module settings) | Table llx_ecommerce_category is updated to save the link between Dolibarr category id and remote WooCommerce id.
Warning > Due to the fact that there is no option to search the last modified categories, their synchronization might be slown down by the high number of categories. | |
Thirdparties & contacts | Dolibarr ⇒ WooCommerce | None | |
WooCommerce ⇒ Dolibarr | Thirdparties are created in Dolibarr as customers in the category declared in the module setting page. Shipping and billing addresses are created as contacts. WooSync checks email adresses before creating a new thirdparty. | Synchronized data :
| |
Products / Services | Dolibarr ⇒ WooCommerce | Products are synchronized in real time if they are linked to the ecommerce category declared in the module setup.
Pictures are synchronized in real time. Several rules can be enabled (See above : "Setup on Dolibarr side"). |
Synchronized data :
We recommand to create variant in WooCommerce. |
WooCommerce ⇒ Dolibarr | They are set up in Dolibarr and linked to the category declared in the module setup.
If the module Suppliers is enabled and Stock synchronization direction is set on Ecommerce to Dolibarr, products will be initialised/updated in the warehouse defined in the WooSync module setup in Dolibarr. Variants have to be created in WooCommerce. They will be synchronized as product/services in Dolibarr. |
Synchronized data :
Note > It requires the activation of 'Elephant' code generator in Dolibarr module Products/services
Other fields are retrieved from the parents products.
| |
Orders | Dolibarr ⇒ WooCommerce | Orders created in Dolibarr are NOT synchronized.
Only modified status in Dolibarr will be updated on orders synchronized from WooCommerce (a link has to be present) |
Status synchronization (events ORDER_MODIFY , ORDER_CLOSE and ORDER_CLASSIFY_BILLED ) :
|
WooCommerce ⇒ Dolibarr | They are also created in Dolibarr | Note > The orders created by another person than Customer user (Administrator, Anonymous, ...) are not created/modified
Synchronized data :
Table | |
Shipment | Dolibarr ⇒ WooCommerce | Shipments are created from orders in Dolibarr. | Orders status are updated and synchronized in real time in WooCommerce (see above). |
WooCommerce ⇒ Dolibarr | None | None | |
Invoices | Dolibarr ⇒ WooCommerce | Invoices are created from shipments in Dolibarr. | |
WooCommerce ⇒ Dolibarr | None | None |