Difference between revisions of "Module Woocommerce EN"

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
Line 20: Line 20:
 
= Feature/Plugin =
 
= Feature/Plugin =
  
The Woocommerce module must be installed on your Dolibarr instance (htdocs/custom) to work properly. To access Woocommerce Dolibarr is using using default Woocommerce's WebServices (REST API v2).  
+
The Woocommerce module must be installed on your Dolibarr instance (htdocs/custom) to work properly. To access Woocommerce, Dolibarr is using by default  
 +
the Woocommerce's WebServices (REST API v2).  
 
Warning: The module in still in developpement stage and it uses the same core as [https://wiki.dolibarr.org/index.php/Module_Magento_EN Module ECommerce NG (Magento) EN].
 
Warning: The module in still in developpement stage and it uses the same core as [https://wiki.dolibarr.org/index.php/Module_Magento_EN Module ECommerce NG (Magento) EN].
  
Line 49: Line 50:
 
To be defined
 
To be defined
  
== The consequences in Dolibarr due to changes in Woocommerce
+
== Syncronize Woocommerce with Dolibarr
 
{|class="wikitable sortable"
 
{|class="wikitable sortable"
 
|-
 
|-
!Actions in Woocommerce !!Changements in Dolibarr !! When !! Note
+
!Actions in Woocommerce !!Adjustments in Dolibarr !! When !! Note
 
|-
 
|-
|Create/modify categories in Woocommerce ||  They are changing in Dolibarr into sub-categories of the parent categorie used for Mangeto categories (defined in the module setup) || Clicking on "Woocommerce to Dolibarr sync" button || <div style="color: #600">NA</div>Table llx_ecommerce_category is updated to store a link between dolibarr category id and remote Woocommerce id. Due to a lack of search on last modified time on Woocommerce API, this sync may be slow if you have a high number of categories
+
|Categories established/modified  in Woocommerce ||  They are changing in Dolibarr into sub-categories of the parent category, used for Mageto categories (defined in the module setup) || It requires the user to click on "Woocommerce to Dolibarr sync" button || <div style="color: #600">NA</div>Table llx_ecommerce_category is updated to remember the link between dolibarr categorie id and remote Woocommerce id.  
 +
Due to the fact that there is no option to search the last categories, modified over time, this sync might be slow down by the high number of categories
 +
 
 +
|- Products created/modified products/stock in Woocommerce || They are set up in Dolibarr (and linked to its categories <span style="color: #600">NA</span>).<br>If the module supply is enabled and '''Supply synchronisation direction''' was set to "ecommerce2dolibarr", it will be initialised/updated in the warehouse
 +
(defined in the eCommerce dolibarr module setup) || It requires the user to click on "Woocommerce to Dolibarr sync" button || <div style="color: #060">Available</div>Table llx_ecommerce_product is updated to remember the link between dolibarr product id and remote Woocommerce id<br><br>Informations concerned:<br>&nbsp;&nbsp;- Product : Product type (Product or Service(=Virtual in Woocommerce)), Ref (UGS in Woocommerce, Activated 'Elephant' code generator in module preferences if UGS is probably empty), Label (Name in Woocommerce), Description, Weigth (Kg), Price, envente (Purchasable in Woocommerce), Product finished type (Fixed at Manufactured), Min price (Price in Woocommerce), Url (Permalink in Woocommerce), Stock quantity<br>&nbsp;&nbsp;- Product Variation : Product type (Product or Service(=Virtual in Woocommerce)), Ref (UGS in Woocommerce, Activated 'Elephant' code generator in module preferences if UGS is maybe empty), Label (Name & liste (attribute name: attribute option) in Woocommerce), Description, Weigth (Kg), Price, envente (Purchasable in Woocommerce), Product finished type (Fixed at Manufactured), Min price (Price in Woocommerce), Url (Permalink in Woocommerce), Stock quantity
 
|-
 
|-
| Products or Stock created/modified into Woocommerce || Created into Dolibarr (and linked to its categories <span style="color: #600">NA</span>).<br>If module stock is enabled and '''Stock synchronisation direction''' was set to "ecommerce2dolibarr", stock is also initialised/updated into warehouse defined into eCommerce dolibarr module setup || Manual click on "Woocommerce to Dolibarr sync" button || <div style="color: #060">Available</div>Table llx_ecommerce_product is updated to store a link between dolibarr product id and remote Woocommerce id<br><br>Informations concerned:<br>&nbsp;&nbsp;- Product : Product type (Product or Service(=Virtual in Woocommerce)), Ref (UGS in Woocommerce, Activated 'Elephant' code generator in module preferences if UGS is maybe empty), Label (Name in Woocommerce), Description, Weigth (Kg), Price, envente (Purchasable in Woocommerce), Product finished type (Fixed at Manufactured), Min price (Price in Woocommerce), Url (Permalink in Woocommerce), Stock quantity<br>&nbsp;&nbsp;- Product Variation : Product type (Product or Service(=Virtual in Woocommerce)), Ref (UGS in Woocommerce, Activated 'Elephant' code generator in module preferences if UGS is maybe empty), Label (Name & liste (attribute name: attribute option) in Woocommerce), Description, Weigth (Kg), Price, envente (Purchasable in Woocommerce), Product finished type (Fixed at Manufactured), Min price (Price in Woocommerce), Url (Permalink in Woocommerce), Stock quantity
+
| Thirdparties and contacts/addresses created/modified into Woocommerce || They are also created in Dolibarr || It requires the user to click on "Woocommerce to Dolibarr sync" button || <div style="color: #060">Available</div>Table llx_ecommerce_societe and llx_ecommerce_socpeople is updated to remember the link between dolibarr thirdparty id and remote Woocommerce id. To determine if a thirdparty already exists, Woocommerce checks the ref. To determine if a contact already exists, Woocommerce checks all fields: firstname, lastname, address, zip, town (and thirdparty).<br><br>Informations concerned:<br>&nbsp;&nbsp;- Thirdparties : Name (First name & Last Name), Email, Type client (Fixed at Client/Prospect)<br>&nbsp;&nbsp;- Contact/addresses - Billing: Type (Fixed at Invoice), Name and last name ('Billing' by default or ECOMMERCENG_BILLING_CONTACT_NAME), Email, Address (Address 1 & Address 2), City, Postcode, Country, Phone<br>&nbsp;&nbsp;- Contact/addresses - Shipping (If not set, set from billing address): Type (Fixed at Delivery), Name and last name ('Shipping' by default or ECOMMERCENG_SHIPPING_CONTACT_NAME), Address (Address 1 & Address 2), City, ZIP, Country
 +
 
 
|-
 
|-
| Thirdparties and contact/addresses created/modified into Woocommerce || Created into Dolibarr || Manual click on "Woocommerce to Dolibarr sync" button || <div style="color: #060">Available</div>Table llx_ecommerce_societe and llx_ecommerce_socpeople is updated to store a link between dolibarr thirdparty id and remote Woocommerce id. To know if a thirdparty already exists, Woocommerce check on the ref. To know if a contact already exists, Woocommerce check on all fields firstname, lastname, address, zip, town (and thirdparty).<br><br>Informations concerned:<br>&nbsp;&nbsp;- Thirdparties : Name (First name & Last Name), Email, Type client (Fixed at Client/Prospect)<br>&nbsp;&nbsp;- Contact/addresses - Billing: Type (Fixed at Invoice), Name and last name ('Billing' by default or ECOMMERCENG_BILLING_CONTACT_NAME), Email, Address (Address 1 & Address 2), City, Postcode, Country, Phone<br>&nbsp;&nbsp;- Contact/addresses - Shipping (If not set, set from billing address): Type (Fixed at Delivery), Name and last name ('Shipping' by default or ECOMMERCENG_SHIPPING_CONTACT_NAME), Address (Address 1 & Address 2), City, Postcode, Country
+
| Orders created/modified in Woocommerce || They are also created in Dolibarr || It requires the user to click on "Woocommerce to Dolibarr sync" button || <div style="color: #060">Available</div>Table llx_ecommerce_order is updated to remember the link of dolibarr order id and remote Woocommerce id<br><br>Informations concerned:<br>&nbsp;&nbsp; The orders created by an other person than Customer user (Administrator, Anonymous, ...) are not created/modified<br>&nbsp;&nbsp;- Order: 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)<br>&nbsp;&nbsp;- Item: 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)<br>&nbsp;&nbsp;- Shipping line into item (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)<br>&nbsp;&nbsp;- Order address: Billing Contact/addresses in Thirdparties<br>&nbsp;&nbsp;- Invoice address: Billing Contact/addresses in Thirdparties<br>&nbsp;&nbsp;- Shipping address: Shipping Contact/addresses in Thirdparties
  
 
|-
 
|-
| Orders created/modified into Woocommerce || Created into Dolibarr || Manual click on "Woocommerce to Dolibarr sync" button || <div style="color: #060">Available</div>Table llx_ecommerce_commande is updated to store link of dolibarr order id and remote Woocommerce id<br><br>Informations concerned:<br>&nbsp;&nbsp;Order created by Other than Customer user (Administrator, Anonymous, ...) is not created/modified<br>&nbsp;&nbsp;- Order: Ref client (Id order in Woocommerce), Date commande (Created date in Woocommerce), Delivery date (Completed date in Woocommerce), Status (pending => Validated, on-hold & processing => Accepted, cancelled & Failed => Cancelled, Completed & Refunded => Closed), Billed status (pending & processing & on-hold & cancelled & Failed => Not paid, Completed & Refunded => Paid), Private note (Customer note in Woocommerce)<br>&nbsp;&nbsp;- Item: 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)<br>&nbsp;&nbsp;- Shipping line into item (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)<br>&nbsp;&nbsp;- Order address: Billing Contact/addresses in Thirdparties<br>&nbsp;&nbsp;- Invoice address: Billing Contact/addresses in Thirdparties<br>&nbsp;&nbsp;- Shipping address: Shipping Contact/addresses in Thirdparties
+
| Shipment created/modified in Woocommerce || By creating a shipment in Woocommerce the statut of the order is changing from "pending" to "processing". Considering the modified status of the order, see the cas above "Order created/modified in Woocommerce". || It requires the user to click on "Woocommerce to Dolibarr sync" button ||<div style="color: #600">NA</div>''Note:'' The shipment is not downloaded onto Dolibarr, only the status of Dolibarr Order will be changed according to the Woocommerce order.<br>''Note:'' You may choose to manage shipment in Dolibarr or in Woocommerce (we recommand to create/update the shipments on Dolibarr rather than on Woocommerce).
  
 
|-
 
|-
| Shipment created/modified in Woocommerce || Creating a shipment in Woocommerce is changing Woocommerce status of the Order from "pending" to "processing". Because it is changing status of order, see case "Order created/modified into Woocommerce". || Manual click on "Woocommerce to Dolibarr sync" button ||<div style="color: #600">NA</div>''Note:'' The shipment is not downloaded into Dolibarr, only status of Dolibarr Order will be changed like is the Woocommerce order.<br>''Note:'' You may choose to manage shipment on Dolibarr or Woocommerce (we recommand to create/update shipments on Dolibarr and not into Woocommerce).
+
|Invoices created/modified in Woocommerce || They are also created in Dolibarr (with correct status but without payments) || It requires the user to click on "Woocommerce to Dolibarr sync" button || <div style="color: #600">NA</div>Table llx_ecommerce_the bill is updated to host a link between dolibarr invoice id and remote Woocommerce id.<br>''Note:'' The payment must still be registered manually on Dolibarr.
|-
 
| Invoices created/modified into Woocommerce || Created into Dolibarr (with correct status but without payments) || Manual click on "Woocommerce to Dolibarr sync" button || <div style="color: #600">NA</div>Table llx_ecommerce_facture is updated to store a link between dolibarr invoice id and remote Woocommerce id.<br>''Note:'' Payment must still be recorded manually on Dolibarr.
 
 
|}
 
|}
 +
TODO In a future version of the module,the "Woocommerce to Dolibarr sync" button could be replaced with a scheduled job/script to launch it automaticaly every hour.
  
 +
== Synchronize Dolibarr with Woocomerce ==
  
TODO In a future version, the "Woocommerce to Dolibarr sync" button could be replaced with a scheduled job/script to launch it automaticaly every hour for example.
+
The synchronization  is happening in real time.
 
 
== Synchronize from Dolibarr to Woocomerce ==
 
 
 
Synchronizing is done in real time.
 
  
 
{|class="wikitable sortable"
 
{|class="wikitable sortable"
 
|-
 
|-
!Action into Dolibarr !! Effect into Woocomerce !! When !! Note
+
!Actions in Dolibarr !! Adjustments in Woocomerce !! When !! Note
 
|-
 
|-
| Categories created into Dolibarr || No update is currently done on Woocomerce. In a future version, creation will be done into Woocomerce if category is inside the parent category for Woocomerce, defined into module setup || No creation/update is currently done on Woocomerce. In a future version, sync will be in real time || <div style="color: #600">NA</div>
+
| Categories created into Dolibarr || Currently there is no update in Woocomerce. In a future version of the module, it will be possible if the category belongs to the parent category of Woocomerce, defined in the module setup || There is no set up /update currently done in Woocomerce. In a updated version, the sync will happen in real time || <div style="color: #600">NA</div>
 
|-
 
|-
| Categories modified into Dolibarr || No update is currently done on Woocomerce. In a future version, update will be done into Woocomerce if category is linked to Woocomerce (category was created by a "Woocomerce to Dolibarr sync") || No creation/update is currently done on Woocomerce. In a future version, sync will be in real time || <div style="color: #600">NA</div>
+
| Categories modified in Dolibarr || No update is currently done in Woocomerce. In a future version of the module, Woocomerce will be updated if the category is linked to Woocomerce (category was setted up  by a "Woocomerce to Dolibarr sync") || There is no set up /update currently done in Woocomerce. In a future version of the module, the sync will happen in real time || <div style="color: #600">NA</div>
 
|-
 
|-
| Products created into Dolibarr || None. In a future, creation will be done into Woocomerce if product has a category inside tree of Woocomerce categories || No creation is currently done on Woocomerce. In a future version, sync will be in real time ||<div style="color: #060">TODO</div>
+
| Products created in Dolibarr || None. In a future version of the module, the the products will be set up in Woocomerce if the category belongs to the  the nested categories of Woocommerce|| No prodoctut category is set up in Woocomerce. In a future version of the module, the sync will happen in real time ||<div style="color: #060">TODO</div>
 
|-
 
|-
| Products or Stock modified into Dolibarr || Update into Woocommerce is done if product is linked to Woocommerce (product was created by a "Woocommerce to Dolibarr sync")<br>If module stock is enabled and '''Stock synchronisation direction''' was set to "dolibarr2ecommerce", then stock is also overwritten on Woocommerce|| Real time || <div style="color: #060">Available</div><br>Informations concerned:<br>&nbsp;&nbsp;- Product (PRODUCT_MODIFY event): Name (Label in Dolibarr), Status (publish (en vente) or pending), Description, UGS (Ref in Dolibarr), Regular price (Price in Dolibarr), Weigth (Kg)<br>&nbsp;&nbsp;- Product Variation (PRODUCT_MODIFY event): Description, UGS (Ref in Dolibarr), Regular price (Price in Dolibarr), Weigth (Kg)<br>&nbsp;&nbsp;- Stock (STOCK_MOVEMENT event): Stock quantity, In stock
+
| Products or Stock modified in Dolibarr || The update in Woocommerce is done if the product is linked to Woocommerce (product was created by a "Woocommerce to Dolibarr sync")<br>If the module stock is enabled and '''Stock synchronisation direction''' was set up to "dolibarr2ecommerce", then the stock is also overwritten on Woocommerce|| In real time || <div style="color: #060">Available</div><br>Informations concerned:<br>&nbsp;&nbsp;- Product (PRODUCT_MODIFY event): Name (Label in Dolibarr), Status (published (for sale) or pending), Description, UGS (Ref in Dolibarr), Regular price (Price in Dolibarr), Weigth (Kg)<br>&nbsp;&nbsp;- Product Variation (PRODUCT_MODIFY event): Description, UGS (Ref in Dolibarr), Regular price (Price in Dolibarr), Weigth (Kg)<br>&nbsp;&nbsp;- Stock (STOCK_MOVEMENT event): Stock quantity, In stock
 +
 
 +
 
 
|-
 
|-
| Thirdparties created || None. In a future version, creation will be done into Woocommerce if thirdparty has the category of Woocommerce thirdparties (defined into setup) || No creation is currently done on MaWoocommerceento. In a future version, sync will be in real time || <div style="color: #600">NA</div>
+
| Thirdparties created || None. In a future version of the module, this will be created in Woocommerce if it belongs to the category of Woocommerce thirdparties (defined in setup) || There is no set up currently done in Woocommerce. In a future version of the module, the sync will happen in real time || <div style="color: #600">NA</div>
 
|-
 
|-
| Thirdparties modified into Dolibarr || Update into Woocommerce is done if thirdparty is linked to Woocommerce (thirdparty was created by a "Woocommerce to Dolibarr sync") || Real time || <div style="color: #060">Available</div><br>Informations concerned:<br>&nbsp;&nbsp;- Thirdparties (COMPANY_MODIFY event): Email
+
| Thirdparties modified into Dolibarr || The update in Woocommerce is done if the thirdparty belonged to Woocommerce (thirdparty was set up by a "Woocommerce to Dolibarr sync") || In real time || <div style="color: #060">Available</div><br>Informations concerned:<br>&nbsp;&nbsp;- Thirdparties (COMPANY_MODIFY event): Email
 
|-
 
|-
| Contact/addresses created into Dolibarr || None. In a future version, creation will be done into Woocommerce if thirdparty has the category of Woocommerce thirdparties (defined into setup) || No creation is currently done on Woocommerce. In a future version, sync will be in real time || <div style="color: #600">NA</div>
+
| Contacts/addresses created in Dolibarr || None. In a future version od the module, they will be created in Woocommerce if the thirdparty was set up as a category of Woocommerce thirdparties (defined into setup) || There is no set up currently done in Woocommerce. In a future version of the module, the sync will happen in real time || <div style="color: #600">NA</div>
 
|-
 
|-
| Contact/addresses modified into Dolibarr || Update into Woocommerce is done if contact/address is linked to Woocommerce (contact/address was created by a "Woocommerce to Dolibarr sync") || Real time || <div style="color: #060">Available</div><br>Informations concerned:<br>&nbsp;&nbsp;- Contact/addresses Billing (CONTACT_MODIFY event): Address 1 (First address line in Dolibarr), Address 2 (Next address lines in Dolibarr), City (Town in Dolibarr), Postcode (Zip in Dolibarr), Country, Phone (Phone pro in Dolibarr)<br>&nbsp;&nbsp;- Contact/addresses Shipping (CONTACT_MODIFY event): Address 1 (First address line in Dolibarr), Address 2 (Next address lines in Dolibarr), City (Town in Dolibarr), Postcode (Zip in Dolibarr), Country
+
| Contacts/addresses modified in Dolibarr || The update into Woocommerce is done if the contact/address is linked to Woocommerce (contact/address was created by a "Woocommerce to Dolibarr sync") || In real time || <div style="color: #060">Available</div><br>Informations concerned:<br>&nbsp;&nbsp;- Contacts/addresses Billing (CONTACT_MODIFY event): Address 1 (First address row in Dolibarr), Address 2 (Next address row in Dolibarr), City (Town in Dolibarr), Postcode (Zip in Dolibarr), Country, Phone (Phone pro in Dolibarr)<br>&nbsp;&nbsp;- Contact/addresses Shipping (CONTACT_MODIFY event): Address 1 (First address row in Dolibarr), Address 2 (Next address row in Dolibarr), City (Town in Dolibarr), Postcode (Zip in Dolibarr), Country
 
|-
 
|-
| Orders created (validated) into Dolibarr || None ||  || Orders created directly into backoffice does not need to appear into ecommerce. See next line for Orders modified.
+
| Orders created (validated) in Dolibarr || None ||  || Orders are created directly into backoffice, there is no need to appear into ecommerce. See next cas below.
 
|-
 
|-
| Orders modified into Dolibarr || Order will be updated into Woocommerce if order is linked to Woocommerce (order was created by a "Woocommerce to Dolibarr sync") || Real time || <div style="color: #060">Available</div><br>Informations concerned:<br>&nbsp;&nbsp;- Order (ORDER_MODIFY & ORDER_CLOSE & ORDER_CLASSIFY_BILLED events): Status (cancelled => cancelled, validated => pending, accepted & shipment on process => processing, closed => completed)
+
| Orders modified into Dolibarr || The Order will be updated in Woocommerce if it is linked to Woocommerce (the order was created by a "Woocommerce to Dolibarr sync") || In real time || <div style="color: #060">Available</div><br>Informations concerned:<br>&nbsp;&nbsp;- Order (ORDER_MODIFY & ORDER_CLOSE & ORDER_CLASSIFY_BILLED events): Status (cancelled => cancelled, validated => pending, accepted & shipment on process => processing, closed => completed)
 
|-
 
|-
| Shipments created (validated) into Dolibarr || Shipment will be created/modified into Woocommerce if source order of shipment was created by a "Woocommerce to Dolibarr sync" || Real time || <div style="color: #600">NA</div>
+
| Shipments created (validated) in Dolibarr || Shipment will be created/modified in Woocommerce if the source order of shipment was created by a "Woocommerce to Dolibarr sync" || In real time || <div style="color: #600">NA</div>
 
|-
 
|-
| Shipments modified (closed) into Dolibarr || This step does not exists on Mangento, so nothing is done ||  || <div style="color: #600">NA</div>
+
| Shipments modified (closed) in Dolibarr || The task is unavailable because there is no procedure in  Magento. ||  || <div style="color: #600">NA</div>
 +
 
 
|-
 
|-
| Invoice created (validated) into Dolibarr || None. In a future, invoice will be created/modified into Woocommerce if source order was coming from Woocommerce || No creation/update is currently done on Woocommerce. In a future version, sync will be in real time || <div style="color: #060">TODO</div>
+
| Invoices created (validated) in Dolibarr || None. In a future version of the module, the invoice will be created/modified in Woocommerce if the source order is rooted in  Woocommerce || There is no set up /update currently done in  Woocommerce. In a future version of the module, the sync will be happen in real time || <div style="color: #060">TODO</div>
 
|-
 
|-
| Invoice modified into Dolibarr (for exemple when status change to paid because of a payment entered) || None. In a future, invoice will be created/modified into Woocommerce if source order was coming from Woocommerce || No creation/update is currently done on Woocommerce. In a future version, sync will be in real time || <div style="color: #600">NA</div>
+
| Invoices modified in Dolibarr (When the  status of the bill updates into "paid", due to the payment) || None. In a future version of the module, the invoice will be created/modified into Woocommerce if the source order is rooted in Woocommerce || There is no set up /update currently done in Woocommerce. In a future version of the module, the sync will happen in real time || <div style="color: #600">NA</div>
 
|-
 
|-
| Stock of a product modified into Dolibarr (whatever is reason: shipment processed, order or invoice validated, depending on your Dolibarr setup of the stock change rule, manuel change of stock or inventory)|| Stock is updated on Woocommerce if product exists also in Woocommerce || Real time || <div style="color: #060">Available</div><br>Informations concerned:<br>&nbsp;&nbsp;- Stock (STOCK_MOVEMENT event): Stock quantity, In stock
+
| Stock of products  modified in Dolibarr (for any reason: the shipment is  processed, the order or invoice is validated, depending on the settings that were done in Dollibar in regards to change in the stock. The stock or inventory could be changed also manually)|| Stock is updated on Woocommerce if the product exists also in Woocommerce || In real time || <div style="color: #060">Available</div><br>Informations concerned:<br>&nbsp;&nbsp;- Stock (STOCK_MOVEMENT event): Stock quantity, In stock
 
|}
 
|}
  
 
= Development =
 
= Development =
Development of this module is not included into standard GIT repository of Dolibarr but inside a dedicated repository managed by Open-DSI.
+
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
 
* GIT Repository: https://github.com/OPEN-DSI/ecommerceng
  

Revision as of 10:33, 28 July 2017

<keywords content="Woocommerce, Dolibarr, synchro, synch, interface" />

Overview

Module name Woocommerce
Editor / Editeur Open-DSI continues the work of Teclib
Download or buy page / Page achat ou téléchargement
Status / Statut / Estado Development / Développement
Prerequisites / Prérequis

Dolibarr min version: 4.0.0+ Woocomerce version 3.x+    Dolibarr max version: {{{maxversion}}}

Last update date / Date mise à jour fiche / Fecha última actualización 2017-07-28
Note / Nota

Feature/Plugin

The Woocommerce module must be installed on your Dolibarr instance (htdocs/custom) to work properly. To access Woocommerce, Dolibarr is using by default

the Woocommerce's WebServices (REST API v2). 

Warning: The module in still in developpement stage and it uses the same core as Module ECommerce NG (Magento) EN.

Installation

Woocommerce

To be defined

Dolibarr module

From the application

  • Download the archive file of module (.zip file)
  • Go on menu Home -> Setup -> Modules -> Deploy external module and submit the file.
  • Module is then visible into list of available modules (Home -> Setup -> Modules) and can be activated.

Manually

  • Download the archive file of module (.zip file)
  • Put the file into the root directory of Dolibarr.
  • Uncompress the archive file, for example with command
unzip modulefile.zip
  • Module is then visible into list of available modules (Home -> Setup -> Modules) and can be activated.

Setup

To use this module, you must first enable it using an administrator account, via the menu option "Home - Setup - Modules".

Choose the tab where the module is listed. Then click on "Activate".

The module is now activated.

If a cog icon appears Cog circle.svg on module thumb or at end of the line of the module, click on it to access the setup page specific to the module.

Setup on Woocomerce side

To be defined

Setup on Dolibarr side

Setup > Other setup:

ECOMMERCENG_DISABLE_LOG_IN_NOTE => 1 (Disable the log in the private note)
ECOMMERCENG_DISABLE_MAGENTO_PRICE_TYPE => 1 (Disable the price type managment for magento)
ECOMMERCENG_BILLING_CONTACT_NAME => 'Choose your Billing contact/address name' (Set name for the billing contact/address)
ECOMMERCENG_SHIPPING_CONTACT_NAME => 'Choose your Shipping contact/address name' (Set name for shipping contact/address)
ECOMMERCENG_SHOW_DEBUG_TOOLS => 0 (Show init/purge/debug tools into site page)
ECOMMERCENG_DISABLED_ERROR_FOR_SOCIETE_ID_0 => 1 (Disable error for the creation of an order when societe id = 0 (Administrator, anonymous, ...))

Usage

To be defined

== Syncronize Woocommerce with Dolibarr

(defined in the eCommerce dolibarr module setup) || It requires the user to click on "Woocommerce to Dolibarr sync" button ||
Available
Table llx_ecommerce_product is updated to remember the link between dolibarr product id and remote Woocommerce id

Informations concerned:
  - Product : Product type (Product or Service(=Virtual in Woocommerce)), Ref (UGS in Woocommerce, Activated 'Elephant' code generator in module preferences if UGS is probably empty), Label (Name in Woocommerce), Description, Weigth (Kg), Price, envente (Purchasable in Woocommerce), Product finished type (Fixed at Manufactured), Min price (Price in Woocommerce), Url (Permalink in Woocommerce), Stock quantity
  - Product Variation : Product type (Product or Service(=Virtual in Woocommerce)), Ref (UGS in Woocommerce, Activated 'Elephant' code generator in module preferences if UGS is maybe empty), Label (Name & liste (attribute name: attribute option) in Woocommerce), Description, Weigth (Kg), Price, envente (Purchasable in Woocommerce), Product finished type (Fixed at Manufactured), Min price (Price in Woocommerce), Url (Permalink in Woocommerce), Stock quantity
Actions in Woocommerce Adjustments in Dolibarr When Note
Categories established/modified in Woocommerce They are changing in Dolibarr into sub-categories of the parent category, used for Mageto categories (defined in the module setup) It requires the user to click on "Woocommerce to Dolibarr sync" button
NA
Table llx_ecommerce_category is updated to remember the link between dolibarr categorie id and remote Woocommerce id.

Due to the fact that there is no option to search the last categories, modified over time, this sync might be slow down by the high number of categories

Thirdparties and contacts/addresses created/modified into Woocommerce They are also created in Dolibarr It requires the user to click on "Woocommerce to Dolibarr sync" button
Available
Table llx_ecommerce_societe and llx_ecommerce_socpeople is updated to remember the link between dolibarr thirdparty id and remote Woocommerce id. To determine if a thirdparty already exists, Woocommerce checks the ref. To determine if a contact already exists, Woocommerce checks all fields: firstname, lastname, address, zip, town (and thirdparty).

Informations concerned:
  - Thirdparties : Name (First name & Last Name), Email, Type client (Fixed at Client/Prospect)
  - Contact/addresses - Billing: Type (Fixed at Invoice), Name and last name ('Billing' by default or ECOMMERCENG_BILLING_CONTACT_NAME), Email, Address (Address 1 & Address 2), City, Postcode, Country, Phone
  - Contact/addresses - Shipping (If not set, set from billing address): Type (Fixed at Delivery), Name and last name ('Shipping' by default or ECOMMERCENG_SHIPPING_CONTACT_NAME), Address (Address 1 & Address 2), City, ZIP, Country
Orders created/modified in Woocommerce They are also created in Dolibarr It requires the user to click on "Woocommerce to Dolibarr sync" button
Available
Table llx_ecommerce_order is updated to remember the link of dolibarr order id and remote Woocommerce id

Informations concerned:
   The orders created by an other person than Customer user (Administrator, Anonymous, ...) are not created/modified
  - Order: 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)
  - Item: 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 into item (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
Shipment created/modified in Woocommerce By creating a shipment in Woocommerce the statut of the order is changing from "pending" to "processing". Considering the modified status of the order, see the cas above "Order created/modified in Woocommerce". It requires the user to click on "Woocommerce to Dolibarr sync" button
NA
Note: The shipment is not downloaded onto Dolibarr, only the status of Dolibarr Order will be changed according to the Woocommerce order.
Note: You may choose to manage shipment in Dolibarr or in Woocommerce (we recommand to create/update the shipments on Dolibarr rather than on Woocommerce).
Invoices created/modified in Woocommerce They are also created in Dolibarr (with correct status but without payments) It requires the user to click on "Woocommerce to Dolibarr sync" button
NA
Table llx_ecommerce_the bill is updated to host a link between dolibarr invoice id and remote Woocommerce id.
Note: The payment must still be registered manually on Dolibarr.

TODO In a future version of the module,the "Woocommerce to Dolibarr sync" button could be replaced with a scheduled job/script to launch it automaticaly every hour.

Synchronize Dolibarr with Woocomerce

The synchronization is happening in real time.

Actions in Dolibarr Adjustments in Woocomerce When Note
Categories created into Dolibarr Currently there is no update in Woocomerce. In a future version of the module, it will be possible if the category belongs to the parent category of Woocomerce, defined in the module setup There is no set up /update currently done in Woocomerce. In a updated version, the sync will happen in real time
NA
Categories modified in Dolibarr No update is currently done in Woocomerce. In a future version of the module, Woocomerce will be updated if the category is linked to Woocomerce (category was setted up by a "Woocomerce to Dolibarr sync") There is no set up /update currently done in Woocomerce. In a future version of the module, the sync will happen in real time
NA
Products created in Dolibarr None. In a future version of the module, the the products will be set up in Woocomerce if the category belongs to the the nested categories of Woocommerce No prodoctut category is set up in Woocomerce. In a future version of the module, the sync will happen in real time
TODO
Products or Stock modified in Dolibarr The update in Woocommerce is done if the product is linked to Woocommerce (product was created by a "Woocommerce to Dolibarr sync")
If the module stock is enabled and Stock synchronisation direction was set up to "dolibarr2ecommerce", then the stock is also overwritten on Woocommerce
In real time
Available

Informations concerned:
  - Product (PRODUCT_MODIFY event): Name (Label in Dolibarr), Status (published (for sale) or pending), Description, UGS (Ref in Dolibarr), Regular price (Price in Dolibarr), Weigth (Kg)
  - Product Variation (PRODUCT_MODIFY event): Description, UGS (Ref in Dolibarr), Regular price (Price in Dolibarr), Weigth (Kg)
  - Stock (STOCK_MOVEMENT event): Stock quantity, In stock


Thirdparties created None. In a future version of the module, this will be created in Woocommerce if it belongs to the category of Woocommerce thirdparties (defined in setup) There is no set up currently done in Woocommerce. In a future version of the module, the sync will happen in real time
NA
Thirdparties modified into Dolibarr The update in Woocommerce is done if the thirdparty belonged to Woocommerce (thirdparty was set up by a "Woocommerce to Dolibarr sync") In real time
Available

Informations concerned:
  - Thirdparties (COMPANY_MODIFY event): Email
Contacts/addresses created in Dolibarr None. In a future version od the module, they will be created in Woocommerce if the thirdparty was set up as a category of Woocommerce thirdparties (defined into setup) There is no set up currently done in Woocommerce. In a future version of the module, the sync will happen in real time
NA
Contacts/addresses modified in Dolibarr The update into Woocommerce is done if the contact/address is linked to Woocommerce (contact/address was created by a "Woocommerce to Dolibarr sync") In real time
Available

Informations concerned:
  - Contacts/addresses Billing (CONTACT_MODIFY event): Address 1 (First address row in Dolibarr), Address 2 (Next address row in Dolibarr), City (Town in Dolibarr), Postcode (Zip in Dolibarr), Country, Phone (Phone pro in Dolibarr)
  - Contact/addresses Shipping (CONTACT_MODIFY event): Address 1 (First address row in Dolibarr), Address 2 (Next address row in Dolibarr), City (Town in Dolibarr), Postcode (Zip in Dolibarr), Country
Orders created (validated) in Dolibarr None Orders are created directly into backoffice, there is no need to appear into ecommerce. See next cas below.
Orders modified into Dolibarr The Order will be updated in Woocommerce if it is linked to Woocommerce (the order was created by a "Woocommerce to Dolibarr sync") In real time
Available

Informations concerned:
  - Order (ORDER_MODIFY & ORDER_CLOSE & ORDER_CLASSIFY_BILLED events): Status (cancelled => cancelled, validated => pending, accepted & shipment on process => processing, closed => completed)
Shipments created (validated) in Dolibarr Shipment will be created/modified in Woocommerce if the source order of shipment was created by a "Woocommerce to Dolibarr sync" In real time
NA
Shipments modified (closed) in Dolibarr The task is unavailable because there is no procedure in Magento.
NA
Invoices created (validated) in Dolibarr None. In a future version of the module, the invoice will be created/modified in Woocommerce if the source order is rooted in Woocommerce There is no set up /update currently done in Woocommerce. In a future version of the module, the sync will be happen in real time
TODO
Invoices modified in Dolibarr (When the status of the bill updates into "paid", due to the payment) None. In a future version of the module, the invoice will be created/modified into Woocommerce if the source order is rooted in Woocommerce There is no set up /update currently done in Woocommerce. In a future version of the module, the sync will happen in real time
NA
Stock of products modified in Dolibarr (for any reason: the shipment is processed, the order or invoice is validated, depending on the settings that were done in Dollibar in regards to change in the stock. The stock or inventory could be changed also manually) Stock is updated on Woocommerce if the product exists also in Woocommerce In real time
Available

Informations concerned:
  - Stock (STOCK_MOVEMENT event): Stock quantity, In stock

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.

TroubleShooting

</lang>