Difference between revisions of "Module Woocommerce EN"

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
(Change Magento in Woocommerce)
Line 108: Line 108:
  
 
= TroubleShooting =
 
= TroubleShooting =
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:
 
  
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">
 
 
    ...
 
 
    /**
 
    * Convert node to array
 
    *
 
    * @param Varien_Data_Tree_Node $node
 
    * @return array
 
    */
 
    protected function _nodeToArray(Varien_Data_Tree_Node $node)
 
    {
 
        // Only basic category data
 
        $result = array();
 
        $result['category_id'] = $node->getId();
 
        $result['parent_id']  = $node->getParentId();
 
        $result['name']        = $node->getName();
 
        $result['is_active']  = $node->getIsActive();
 
        $result['position']    = $node->getPosition();
 
        $result['level']      = $node->getLevel();
 
 
/* LDR Add here this new line to add the missing property returned by web service */
 
$result['updated_at']  = $node->getUpdatedAt();
 
 
        $result['children']    = array();
 
 
        foreach ($node->getChildren() as $child) {
 
            $result['children'][] = $this->_nodeToArray($child);
 
        }
 
 
        return $result;
 
    }
 
 
    ...
 
  
 
</lang>
 
</lang>

Revision as of 15:42, 6 March 2017

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

Informations

Module name Woocommerce
Editor / Editeur Teclib - www.teclib.com
Download or buy page / Page achat ou téléchargement External module - www.dolistore.com
Status / Statut / Estado Development / Développement
Prerequisites / Prérequis

Dolibarr min version: See on Dolistore    Dolibarr max version: See on Dolistore

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

Features

Integrates a Woocommerce - Dolibarr synchronyzation. It is a module to be installed in Dolibarr. 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 Woocomerce

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

Usage

To be defined

Synchronize from Woocommerce to Dolibarr

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 "Woocomerce to Dolibarr sync" button
NA
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 Woocomerce Created into Dolibarr and linked to its categories.
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
TODO
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 Woocomerce Created into Dolibarr Manual click on "Woocomerce to Dolibarr sync" button
TODO
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 Woocomerce Created into Dolibarr Manual click on "Woocomerce to Dolibarr sync" button
TODO
Table llx_ecommerce_commande is updated to store link of dolibarr order id and remote Woocomerce id
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
NA
Note: The shipment is not downloaded into Dolibarr, only status of Dolibarr Order will be changed like is the Woocomerce order.
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 Woocomerce Created into Dolibarr (with correct status but without payments) Manual click on "Woocomerce to Dolibarr sync" button
NA
Table llx_ecommerce_facture is updated to store a link between dolibarr invoice id and remote Woocomerce id.
Note: Payment must still be recorded manually on Dolibarr.


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 Woocomerce

Synchronizing is done in real time.

Action into Dolibarr Effect into 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
NA
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
NA
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
TODO
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")
If module stock is enabled and Stock synchronisation direction was set to "dolibarr2ecommerce", then stock is also overwritten on Woocomerce
Real time
TODO
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
NA
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
NA
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
NA
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
NA
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 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
TODO
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
NA
Shipments modified (closed) into Dolibarr This step does not exists on Mangento, so nothing is done
NA
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
TODO
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
NA
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
TODO

Development

Development of this module is not included into standard GIT repository of Dolibarr but inside a dedicated repository managed by TecLib.


TroubleShooting

</lang>