Changes

Change Magento in Woocommerce
Line 10: Line 10:  
|editor=Teclib
 
|editor=Teclib
 
|web=[http://www.teclib.com www.teclib.com]
 
|web=[http://www.teclib.com www.teclib.com]
|webbuy={{LinkToPluginDownloadDoliStore|keyword=magento}}
+
|webbuy={{LinkToPluginDownloadDoliStore|keyword=Woocomerce}}
 
|status=development
 
|status=development
 
|prerequisites=
 
|prerequisites=
 
|minversion=3.9.0+
 
|minversion=3.9.0+
Magento version 1.9+
+
Woocomerce version 2.7+
 
|note=
 
|note=
 
}}
 
}}
Line 23: Line 23:  
Access to Woocommerce is done by dolibarr using default Woocommerce's WebServices.
 
Access to Woocommerce is done by dolibarr using default Woocommerce's WebServices.
   −
WARNING : Actually this module is under developpement and use the same core as Module Magento
+
WARNING : Actually this module is under developpement and use the same core as Module Woocomerce
    
= Installation =
 
= Installation =
Line 48: Line 48:  
!Action into Woocomerce !! Effect into Dolibarr !! When !! Note
 
!Action into Woocomerce !! Effect into Dolibarr !! When !! Note
 
|-
 
|-
|Categories created/modified into Woocomerce || Created into Dolibarr as sub-categories of the parent category used for Mangeto categories (defined into module setup) || Manual click on "Magento 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 magento id. Due to a lack of search on last modified time on Magento API, this sync may be slow if you have a high number of categories
+
|Categories created/modified into Woocomerce || Created into Dolibarr as sub-categories of the parent category used for Mangeto categories (defined into module setup) || Manual click on "Woocomerce 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 Woocomerce id. Due to a lack of search on last modified time on Woocomerce API, this sync may be slow if you have a high number of categories
 
|-
 
|-
| Products or Stock created/modified into Magento || Created into Dolibarr and linked to its categories.<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 "Magento to Dolibarr sync" button || <div style="color: #060">TODO</div>Table llx_ecommerce_product is updated to store a link between dolibarr product id and remote magento id
+
| Products or Stock created/modified into Woocomerce || Created into Dolibarr and linked to its categories.<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 "Woocomerce to Dolibarr sync" button || <div style="color: #060">TODO</div>Table llx_ecommerce_product is updated to store a link between dolibarr product id and remote Woocomerce id
 
|-
 
|-
| Thirdparties and contact/addresses created/modified into Magento || Created into Dolibarr || Manual click on "Magento to Dolibarr sync" button || <div style="color: #060">TODO</div>Table llx_ecommerce_societe and llx_ecommerce_socpeople is updated to store a link between dolibarr thirdparty id and remote magento id. To know if a thirdparty already exists, Magento check on the ref. To know if a contact already exists, Magento check on all fields firstname, lastname, address, zip, town (and thirdparty).
+
| Thirdparties and contact/addresses created/modified into Woocomerce || Created into Dolibarr || Manual click on "Woocomerce to Dolibarr sync" button || <div style="color: #060">TODO</div>Table llx_ecommerce_societe and llx_ecommerce_socpeople is updated to store a link between dolibarr thirdparty id and remote Woocomerce id. To know if a thirdparty already exists, Woocomerce check on the ref. To know if a contact already exists, Woocomerce check on all fields firstname, lastname, address, zip, town (and thirdparty).
 
|-
 
|-
| Orders created/modified into Magento || Created into Dolibarr || Manual click on "Magento to Dolibarr sync" button || <div style="color: #060">TODO</div>Table llx_ecommerce_commande is updated to store link of dolibarr order id and remote magento id
+
| Orders created/modified into Woocomerce || Created into Dolibarr || Manual click on "Woocomerce to Dolibarr sync" button || <div style="color: #060">TODO</div>Table llx_ecommerce_commande is updated to store link of dolibarr order id and remote Woocomerce id
 
|-
 
|-
| Shipment created/modified in Magento || Creating a shipment in Magento is changing Magento status of the Order from "pending" to "processing". Because it is changing status of order, see case "Order created/modified into Magento". || Manual click on "Magento 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 Magento order.<br>''Note:'' You may choose to manage shipment on Dolibarr or Magento (we recommand to create/update shipments on Dolibarr and not into Magento).
+
| Shipment created/modified in Woocomerce || Creating a shipment in Woocomerce is changing Woocomerce status of the Order from "pending" to "processing". Because it is changing status of order, see case "Order created/modified into Woocomerce". || Manual click on "Woocomerce 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 Woocomerce order.<br>''Note:'' You may choose to manage shipment on Dolibarr or Woocomerce (we recommand to create/update shipments on Dolibarr and not into Woocomerce).
 
|-
 
|-
| Invoices created/modified into Magento || Created into Dolibarr (with correct status but without payments) || Manual click on "Magento 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 magento id.<br>''Note:'' Payment must still be recorded manually on Dolibarr.
+
| Invoices created/modified into Woocomerce || Created into Dolibarr (with correct status but without payments) || Manual click on "Woocomerce 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 Woocomerce id.<br>''Note:'' Payment must still be recorded manually on Dolibarr.
 
|}
 
|}
      −
TODO In a future version, the "Magento to Dolibarr sync" button could be replaced with a scheduled job/script to launch it automaticaly every hour for example.
+
TODO In a future version, the "Woocomerce to Dolibarr sync" button could be replaced with a scheduled job/script to launch it automaticaly every hour for example.
   −
== Synchronize from Dolibarr to Magento ==
+
== Synchronize from Dolibarr to Woocomerce ==
    
Synchronizing is done in real time.
 
Synchronizing is done in real time.
Line 70: Line 70:  
{|class="wikitable sortable"
 
{|class="wikitable sortable"
 
|-
 
|-
!Action into Dolibarr !! Effect into Magento !! When !! Note
+
!Action into Dolibarr !! Effect into Woocomerce !! When !! Note
 
|-
 
|-
| Categories created into Dolibarr || No update is currently done on Magento. In a future version, creation will be done into Magento if category is inside the parent category for Magento, defined into module setup || No creation/update is currently done on Magento. In a future version, sync will be in real time || <div style="color: #600">NA</div>
+
| 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 modified into Dolibarr || No update is currently done on Magento. In a future version, update will be done into Magento if category is linked to Magento (category was created by a "Magento to Dolibarr sync") || No creation/update is currently done on Magento. In a future version, sync will be 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>
 
|-
 
|-
| Products created into Dolibarr || None. In a future, creation will be done into Magento if product has a category inside tree of Magento categories || No creation is currently done on Magento. In a future version, sync will be in real time ||<div style="color: #060">TODO</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 or Stock modified into Dolibarr || Update into Magento is done if product is linked to Magento (product was created by a "Magento to Dolibarr sync")<br>If module stock is enabled and '''Stock synchronisation direction''' was set to "dolibarr2ecommerce", then stock is also overwritten on Magento|| Real time || <div style="color: #060">TODO</div>
+
| Products or Stock modified into Dolibarr || Update into Woocomerce is done if product is linked to Woocomerce (product was created by a "Woocomerce to Dolibarr sync")<br>If module stock is enabled and '''Stock synchronisation direction''' was set to "dolibarr2ecommerce", then stock is also overwritten on Woocomerce|| Real time || <div style="color: #060">TODO</div>
 
|-
 
|-
| Thirdparties created || None. In a future version, creation will be done into Magento if thirdparty has the category of Magento thirdparties (defined into setup) || No creation is currently done on Magento. In a future version, sync will be in real time || <div style="color: #600">NA</div>
+
| Thirdparties created || None. In a future version, creation will be done into Woocomerce if thirdparty has the category of Woocomerce thirdparties (defined into setup) || No creation is currently done on MaWoocomerceento. In a future version, sync will be in real time || <div style="color: #600">NA</div>
 
|-
 
|-
| Thirdparties modified into Dolibarr || Update into Magento is done if thirdparty is linked to Magento (thirdparty was created by a "Magento to Dolibarr sync") || Real time || <div style="color: #600">NA</div>
+
| Thirdparties modified into Dolibarr || Update into Woocomerce is done if thirdparty is linked to Woocomerce (thirdparty was created by a "Woocomerce to Dolibarr sync") || Real time || <div style="color: #600">NA</div>
 
|-
 
|-
| Contact/addresses created into Dolibarr || None. In a future version, creation will be done into Magento if thirdparty has the category of Magento thirdparties (defined into setup) || No creation is currently done on Magento. In a future version, sync will be in real time || <div style="color: #600">NA</div>
+
| Contact/addresses created into Dolibarr || None. In a future version, creation will be done into Woocomerce if thirdparty has the category of Woocomerce thirdparties (defined into setup) || No creation is currently done on Woocomerce. In a future version, sync will be in real time || <div style="color: #600">NA</div>
 
|-
 
|-
| Contact/addresses modified into Dolibarr || Update into Magento is done if contact/address is linked to Magento (contact/address was created by a "Magento to Dolibarr sync") || Real time || <div style="color: #600">NA</div>
+
| Contact/addresses modified into Dolibarr || Update into Woocomerce is done if contact/address is linked to Woocomerce (contact/address was created by a "Woocomerce to Dolibarr sync") || Real time || <div style="color: #600">NA</div>
 
|-
 
|-
 
| 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) into Dolibarr || None ||  || Orders created directly into backoffice does not need to appear into ecommerce. See next line for Orders modified.
 
|-
 
|-
| Orders modified into Dolibarr || Order will be updated into Magento if order is linked to Magento (order was created by a "Magento to Dolibarr sync") || No update is currently done on Magento. In a future version, sync will be in real time || <div style="color: #060">TODO</div>
+
| Orders modified into Dolibarr || Order will be updated into Woocomerce if order is linked to Woocomerce (order was created by a "Woocomerce to Dolibarr sync") || No update is currently done on Woocomerce. In a future version, sync will be in real time || <div style="color: #060">TODO</div>
 
|-
 
|-
| Shipments created (validated) into Dolibarr || Shipment will be created/modified into Magento if source order of shipment was created by a "Magento to Dolibarr sync" || Real time || <div style="color: #600">NA</div>
+
| Shipments created (validated) into Dolibarr || Shipment will be created/modified into Woocomerce if source order of shipment was created by a "Woocomerce to Dolibarr sync" || 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) into Dolibarr || This step does not exists on Mangento, so nothing is done ||  || <div style="color: #600">NA</div>
 
|-
 
|-
| Invoice created (validated) into Dolibarr || None. In a future, invoice will be created/modified into Magento if source order was coming from Magento || No creation/update is currently done on Magento. In a future version, sync will be in real time || <div style="color: #060">TODO</div>
+
| Invoice created (validated) into Dolibarr || None. In a future, invoice will be created/modified into Woocomerce if source order was coming from Woocomerce || No creation/update is currently done on Woocomerce. In a future version, sync will be 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 Magento if source order was coming from Magento || No creation/update is currently done on Magento. In a future version, sync will be in real time || <div style="color: #600">NA</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 Woocomerce if source order was coming from Woocomerce || No creation/update is currently done on Woocomerce. In a future version, sync will be 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 Magento if product exists also in Magento || Real time ||  <div style="color: #060">TODO</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 Woocomerce if product exists also in Woocomerce || Real time ||  <div style="color: #060">TODO</div>
 
|}
 
|}
   Line 108: Line 108:     
= TroubleShooting =
 
= TroubleShooting =
Due to a problem in Magento, if you have a large number of product categories, you may experience low performance when counting data to synchronize and making a synchronize.
+
Due to a problem in Woocomerce, if you have a large number of product categories, you may experience low performance when counting data to synchronize and making a synchronize.
 
This is how you can fix this:
 
This is how you can fix this:
   −
On magento side, edit the file '''app/code/core/Mage/Catalog/Model/Category/Api.php''' to add the line visible into comment
+
On Woocomerce side, edit the file '''app/code/core/Mage/Catalog/Model/Category/Api.php''' to add the line visible into comment
    
<source lang="php">
 
<source lang="php">
155

edits