Difference between revisions of "Module Woocommerce EN"
P.scoffoni (talk | contribs) (→Usage) |
P.scoffoni (talk | contribs) |
||
Line 114: | Line 114: | ||
|- | |- | ||
| 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> - 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> - Stock (STOCK_MOVEMENT event): Stock quantity, In stock | ||
+ | |} | ||
+ | |||
+ | |||
= Development = | = Development = | ||
Line 120: | Line 123: | ||
= TroubleShooting = | = TroubleShooting = | ||
− | |||
− | |||
− |
Revision as of 13:25, 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 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 ||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, last name, 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 they are not set up, it could be done from the 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 idInformations concerned: The orders created by another 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) - 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 |
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 is changing 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 in the backoffice, it's not necessary to appear in the ecommerce. See next cas below. | |
Orders modified in 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.
- GIT Repository: https://github.com/OPEN-DSI/ecommerceng