Difference between revisions of "Module Woocommerce EN"
P.scoffoni (talk | contribs) (Rewrite of the page) |
|||
Line 2: | Line 2: | ||
[[Category:Woocommerce]] | [[Category:Woocommerce]] | ||
[[Category:E-commerce]] | [[Category:E-commerce]] | ||
− | + | <div style="text-align:center; float:right; font-size:80%; background: #eef; border: 1px solid #ccf; margin-bottom: 0px; margin-left: 2px; margin-right: 2px; padding: 1px; height: 92px"> | |
− | + | [[Documentation Développeur|Retour index<br>Documentation développeur]]<br> | |
− | <keywords content="Woocommerce, Dolibarr, synchro, synch, interface" /> | + | [[File:File_Doc_dev.png|link=Documentation Développeur]]</div> |
+ | |||
+ | <div style="text-align:center; float:right; font-size:80%; background: #eef; border: 1px solid #ccf; margin-bottom: 0px; margin-left: 2px; margin-right: 2px; padding: 1px; height: 92px; min-width: 100px;"> | ||
+ | [[User documentation|Return to user<br>documentation index]]<br> | ||
+ | [[File:File_Doc_user.png|link=User documentation]] | ||
+ | </div> | ||
+ | |||
+ | <keywords content="Woocommerce, Dolibarr, synchro, synch, interface"/> | ||
= Overview = | = Overview = | ||
− | { | + | {| border="0" width="100%" cellpadding="0" cellspacing="0" class="dolbox" |
− | | | + | |- |
− | | | + | |valign="top" style="max-width: 200px" | Module Name ||WooSync |
− | | | + | |- |
− | | | + | || Editor / Editeur ||[https://www.open-dsi.fr Open-DSI] |
− | + | |- | |
− | | | + | || Download or buy page / Page achat ou téléchargement|| |
− | | | + | * [https://www.dolistore.com/fr/modules/851-Woosync.html dolistore]<br> |
− | | | + | * [https://www.open-dsi.fr/produit/souscription-annuelle-woosync/ boutique open-dsi] |
− | Woocomerce version 3.x | + | |- |
− | | | + | || Status / Statut / Estado ||Stable |
− | + | |- | |
+ | || Prerequisites / Prérequis|| | ||
+ | * Dolibarr min version 4.x | ||
+ | * Woocomerce min version 3.x | ||
+ | |- | ||
+ | || Last update date / Date mise à jour fiche / Fecha última actualización || {{REVISIONYEAR}}-{{REVISIONMONTH}}-{{REVISIONDAY}} | ||
+ | |- | ||
+ | | valign="top"| Note / Nota || WooSync is a fork of [https://www.dolistore.com/fr/modules/729-ECommerceNG---Module-Synchro-Magento.html EcommerceNG] developed by TecLib | ||
+ | |} | ||
= Feature/Plugin = | = 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. | ||
− | The | + | = 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 = | = Installation = | ||
− | + | WooSync module has to be installed in your Dolibarr directory <code>htdocs/custom</code> to work properly. To connect to Woocommerce app, Dolibarr uses by default Woocommerce's WebServices (REST API v2). | |
− | |||
== Dolibarr module == | == Dolibarr module == | ||
− | + | * Download the archive file of module (.zip file) | |
− | + | * Unzip the folder into the <code>htdocs/custom</code> directory of your Dolibarr. | |
− | = Setup | + | * Module is then visible into list of available modules (<span style="font-variant: small-caps;">Home > Setup > Modules/applications</span>) and can be activated. |
− | |||
== Setup on Woocomerce side == | == Setup on Woocomerce side == | ||
− | + | * The option <span style="font-variant: small-caps;">Enable guest checkout</span> had better be disabled;<br> | |
+ | * The <span style="font-variant: small-caps;">New User Default Role</span> has to be set on "Client";<br> | ||
+ | * WooSync has been tested without any other application than WP Oauth server and WP Mail SMTP by WPForms.<br> | ||
== Setup on Dolibarr side == | == Setup on Dolibarr side == | ||
+ | From <span style="font-variant: small-caps;">Home > Setup > Other</span>, hidden rules can be enabled : | ||
+ | * <code>ECOMMERCENG_DISABLE_LOG_IN_NOTE</code> at <code>1</code> to disable the log in the private note of orders from WooCommerce in Dolibarr;<br> | ||
+ | * <code>ECOMMERCENG_SHOW_DEBUG_TOOLS</code> at <code>1</code> to show init/purge/debug tools into site page;<br> | ||
+ | * <code>ECOMMERCENG_DISABLED_ERROR_FOR_SOCIETE_ID_0</code> at <code>1</code> to disable the error at the creation of an order when societe id = 0 (administrator, anonymous, ...);<br> | ||
+ | * <code>ECOMMERCENG_SHOW_DEBUG_TOOLS</code> at <code>1</code> to display debug options;<br> | ||
+ | * <code>ECOMMERCE_WOOCOMMERCE_DEFAULT_TVA</code> at <code>1</code> to set default TVA rate to use;<br> | ||
+ | * <code>ECOMMERCENG_ENABLED_SYNCHRONIZE_IMAGES_PRODUCT_BUTTON</code> at <code>1</code> to display the button to force picture synchronization on <span style="font-variant: small-caps;">lnked files</span> tab of product card;<br> | ||
+ | * <code>ECOMMERCENG_WOOCOMMERCE_DISABLED_SYNCHRO_IMAGE</code> at <code>1</code> to prevent picture synchronization;<br> | ||
+ | * <code>ECOMMERCENG_SHIPPING_NOT_DISPLAY_IF_NULL</code> at <code>1</code> not to display free shipping fees on Dolibar orders. | ||
− | + | =Items Synchronization between Dolibarr and WooCommerce= | |
− | + | The <span style="color:#9B5C8F;">'''WooCommerce ⇒ Dolibarr'''</span> synchronization is made by a '''manual operation''' : It requires the user to click on "Woocommerce to Dolibarr sync" button. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | = | + | The <span style="color:#3C70A0;">'''Dolibarr ⇒ WooCommerce'''</span> synchronization is made '''in real time'''. No manual operation is required. |
− | |||
− | + | {| class="wikitable" | |
− | {|class="wikitable | + | !Items||Synchronization||Action||Comment |
|- | |- | ||
− | + | |rowspan="2"|'''Categories''' | |
− | + | (thirdparties & products/services) | |
+ | |style="color:#3C70A0;"|'''Dolibarr ⇒ WooCommerce''' | ||
+ | |style="color:#3C70A0;"|None | ||
+ | |style="color:#3C70A0;"|''In a future version, categories created in Dolibarr will be synchronized in WooCommerce'' | ||
|- | |- | ||
− | | | + | |style="color:#9B5C8F;"|'''WooCommerce ⇒ Dolibarr''' |
− | Due to the fact that there is no option to search the last categories, | + | |style="color:#9B5C8F;"|They are synchronized as sub-categories of the parent category declared in Dolibarr (WooCommerce module settings) |
− | + | |style="color:#9B5C8F;"|Table <code>llx_ecommerce_category</code> 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. | ||
|- | |- | ||
− | | | + | |rowspan="2"|'''Thirdparties & contacts''' |
+ | |style="color:#3C70A0;"|'''Dolibarr ⇒ WooCommerce''' | ||
+ | |style="color:#3C70A0;"|None | ||
+ | |style="color:#3C70A0;"|<!-- ''In a future version, thirdparties & contacts created in Dolibarr will be synchronized in WooCommerce'' --> | ||
|- | |- | ||
− | | | + | |style="color:#9B5C8F;"|'''WooCommerce ⇒ Dolibarr''' |
− | + | |style="color:#9B5C8F;"|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. | |
− | + | |style="color:#9B5C8F;"|'''Synchronized data''' : | |
− | | | + | * Company Name (if filled in, thirdparty name. If not, thirdparty is created as a contact) |
− | + | * Lastname | |
− | + | * firstname | |
− | + | * Adress | |
− | + | * ZIP | |
+ | * Town | ||
|- | |- | ||
− | | | + | |rowspan="2"|'''Products / Services''' |
− | + | |style="color:#3C70A0;"|'''Dolibarr ⇒ WooCommerce''' | |
− | + | |style="color:#3C70A0;"|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"). | ||
+ | |style="color:#3C70A0;"|'''Synchronized data''' : | ||
+ | * Product (event <code>PRODUCT_MODIFY</code>) | ||
+ | ** Réf. ⇒ UGS; | ||
+ | ** Label ⇒ Name; | ||
+ | ** Status (published (for sale) or pending); | ||
+ | ** Description ⇒ empty; | ||
+ | ** Description boutique ⇒ Description; | ||
+ | ** Description courte boutique ⇒ Short description; | ||
+ | ** Price ⇒ Régular price; | ||
+ | ** Weigth (Kg) | ||
+ | ** Stock quantity; | ||
+ | ** In stock | ||
+ | * Product Variant | ||
+ | We recommand to create variant in WooCommerce. | ||
+ | <!-- (event <code>PRODUCT_MODIFY</code>) | ||
+ | ** Réf. ⇒ UGS; | ||
+ | ** Price ⇒ Régular price; | ||
+ | ** Weigth (Kg) | ||
+ | * Stock (event <code>STOCK_MOVEMENT</code>) --> | ||
+ | |- | ||
+ | |style="color:#9B5C8F;"|'''WooCommerce ⇒ Dolibarr''' | ||
+ | |style="color:#9B5C8F;"|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 <span style="font-variant: small-caps;">Ecommerce to Dolibarr</span>, 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. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | |style="color:#9B5C8F;"|'''Synchronized data''' : | ||
+ | * Product type ⇒ Product or Service if set as "virtual" | ||
+ | * UGS ⇒ Ref. | ||
+ | '''Note >''' It requires the activation of 'Elephant' code generator in Dolibarr module Products/services | ||
+ | * Name ⇒ Label | ||
+ | * Description ⇒ empty | ||
+ | * Statut pour le site "boutique_wordpress" ⇒ Status | ||
+ | * Description ⇒ Description boutique | ||
+ | * Short description ⇒ Description courte boutique | ||
+ | * Tag/category ⇒ Category | ||
+ | * Weigth (Kg) ⇒ Weight | ||
+ | * Price ⇒ Price | ||
+ | * En vente ⇒ Purchasable | ||
+ | * Product finished type ⇒ Fixed at Manufactured | ||
+ | * Min price ⇒ Price | ||
+ | * Url ⇒ Permalink | ||
+ | * Stock quantity ⇒ Stock quantity | ||
+ | <br> | ||
+ | '''Product Variation :''' | ||
+ | * Product type ⇒ Service if set as "virtual" | ||
+ | * UGS ⇒ Ref. | ||
+ | * Name ⇒ Label | ||
+ | * Description ⇒ empty | ||
+ | * Weigth (Kg) ⇒ | ||
+ | * Price ⇒ | ||
+ | * Purchasable ⇒ to sell | ||
+ | * Product finished type ⇒ Fixed at Manufactured | ||
+ | * Price ⇒ Price | ||
+ | * Permalink ⇒ URL | ||
+ | * Stock quantity ⇒ Stock quantity | ||
+ | Other fields are retrieved from the parents products. | ||
+ | <br> | ||
+ | Table <code>llx_ecommerce_product</code> is updated to remember the link between dolibarr product id and remote Woocommerce id<br> | ||
|- | |- | ||
− | | | + | |rowspan="2"|'''Orders''' |
+ | |style="color:#3C70A0;"|'''Dolibarr ⇒ WooCommerce''' | ||
+ | |style="color:#3C70A0;"|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) | ||
+ | |style="color:#3C70A0;"|Status synchronization (events <code>ORDER_MODIFY</code>, <code>ORDER_CLOSE</code> and <code>ORDER_CLASSIFY_BILLED</code>) : | ||
+ | * Cancelled ⇒ cancelled; | ||
+ | * Validated ⇒ pending; | ||
+ | * Accepted & shipment on process ⇒ processing; | ||
+ | * Closed ⇒ completed. | ||
|- | |- | ||
− | | | + | |style="color:#9B5C8F;"|'''WooCommerce ⇒ Dolibarr''' |
+ | |style="color:#9B5C8F;"|They are also created in Dolibarr | ||
+ | |style="color:#9B5C8F;"|'''Note >''' The orders created by another person than Customer user (Administrator, Anonymous, ...) are not created/modified | ||
+ | '''Synchronized data''' : | ||
+ | * Ref client ⇒ Id order in Woocommerce | ||
+ | * Purchase order date ⇒ Created date in Woocommerce | ||
+ | * Delivery date ⇒ Completed date in Woocommerce | ||
+ | * Status | ||
+ | ** Pending ⇒ Validated, | ||
+ | ** On-hold & processing ⇒ Accepted, | ||
+ | ** Cancelled & Failed ⇒ Cancelled, | ||
+ | ** Completed & Refunded ⇒ Closed; | ||
+ | * Payment status | ||
+ | ** Pending & processing & on-hold & cancelled & Failed ⇒ Not paid | ||
+ | **Completed & Refunded ⇒ Paid | ||
+ | * Private note ⇒ Customer's notes in Woocommerce | ||
+ | * Product ⇒ Description (Name in Woocommerce); | ||
+ | * Product type ⇒ Fixed at Simple | ||
+ | * Price ⇒ | ||
+ | * Quantity ⇒ | ||
+ | * VAT rate (Calculated with total and total tax closed to VAT rate in Dolibarr) ⇒ | ||
+ | * Shipping line of the product (Displayed by default or ECOMMERCENG_SHIPPING_NOT_DISPLAY_IF_NULL) | ||
+ | * Description ⇒ Shipping - ' & Shipping method title in Woocommerce if present | ||
+ | * Price ⇒ Total shipping in Woocommerce | ||
+ | * VAT rate (Calculated with shipping total and shipping tax closed to VAT rate in Dolibarr)|| | ||
+ | * Order address ⇒ Billing Contact/addresses in Thirdparties | ||
+ | * Invoice address ⇒ Billing Contact/addresses in Thirdparties | ||
+ | * Shipping address ⇒ Shipping Contact/addresses in Thirdparties | ||
+ | Table <code>llx_ecommerce_order</code> is updated to remember the link of dolibarr order id and remote Woocommerce id | ||
|- | |- | ||
− | | | + | |rowspan="2"|'''Shipment''' |
+ | |style="color:#3C70A0;"|'''Dolibarr ⇒ WooCommerce''' | ||
+ | |style="color:#3C70A0;"|Shipments are created from orders in Dolibarr. | ||
+ | |style="color:#3C70A0;"|Orders status are updated and synchronized in real time in WooCommerce (see above). | ||
|- | |- | ||
− | | | + | |style="color:#9B5C8F;"|'''WooCommerce ⇒ Dolibarr''' |
+ | |style="color:#9B5C8F;"|None | ||
+ | |style="color:#9B5C8F;"|None | ||
|- | |- | ||
− | | | + | |rowspan="2"|'''Invoices''' |
+ | |style="color:#3C70A0;"|'''Dolibarr ⇒ WooCommerce''' | ||
+ | |style="color:#3C70A0;"|Invoices are created from shipments in Dolibarr. | ||
+ | | | ||
|- | |- | ||
− | | | + | |style="color:#9B5C8F;"|'''WooCommerce ⇒ Dolibarr''' |
+ | |style="color:#9B5C8F;"|None | ||
+ | |style="color:#9B5C8F;"|None | ||
|- | |- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 20:15, 1 March 2018
<keywords content="Woocommerce, Dolibarr, synchro, synch, interface"/>
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 | 2018-03-1 |
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 |