WooCommerce to iDempiere
From iDempiere en
- Creator/Maintainter: Yogan Naidoo (talk) - nTier Software Services
- Current Version: 1.0.0
- License: GPLv2
- Source: GitHub repository
Credits
- iDempiere
- WooCommerce developed by Automatic
- WordPress
- Oleksandr Mandryk or icoderman - Java wrapper for WooCommerce REST API
Background
WooCommerce is a free open-source plugin for WordPress. It is a popular e-commerce platform and drives an estimated 30% of all online stores. Some businesses with iDempiere use WooCommerce as a channel for online sales. It seems like a good idea to integrate those transactions back to iDempiere (ERP) for accounting and stock management
Functionality
The basic premise is to have a one way update of information from WooCommerce to iDempiere (ERP)
- After a sales order/s is completed (items have been shipped) on WooCommerce then it will be transmitted to the ERP
- We use the Mixed POS Payment functionality in iDempiere (Contributed by GlobalQSS) to generate a payment
- Once the Sales Order (SO) is successfully synchronised to the ERP. The associated invoice, payment, shipment and allocation are generated and completed
- The sales order document number will be the WooCommerce order number
- The assumption is that the ERP will be the 'Master' for the the products. If a line has a product that is not recognised by the ERP then the default one, on the WooCommerce Default window will be used. We feel that stock management is better off done on the ERP
- If a Business Partner (BP) is used for the e-commerce sale and it does not exist in the ERP, then a BP will be created using the e-commerce address and contact details. Defaults will be used, as set up in the WooCommerce Defaults window, if this info is not available
Download Source Code/Application
- git clone https://github.com/nTier-Software/Woocommerce-iDempiere.git or unzip the downloaded zip file
Development Environment
You can skip this step if you just want to install the plugin zip file
- Operating System used is Ubuntu 20.04.2 LTS
- Java: OpenJDK 11.0.5
- Eclipse IDE for Enterprise Java Developers - Version: 2020-12 (4.18.0)
- iDempiere 8.2z
WooCommerce Changes
- To generate your WooCommerce Rest API keys see: Generate Rest API keys
- The plugin to enable integration from WooCommerce to iDempiere resides at the root of the plugin source on github (see details under 'Download Source Code' above): idempierePlugin.php
- Copy idempierePlugin.php to your WooCommerceStore/wp-content/plugins directory of your Web server
- If you go into your Wordpress dashboard, under 'Plugins' you should see the iDempiere plugin installed and active
iDempiere Changes
- Pack in the WooCommerce Defaults window and WooCommerce process from 'WooCommerce packin.zip' This file is located in root of the plugin source
- The plugin jar:'za.co.ntier.woocommerce...jar' is located in root of the plugin source
- Create tax rates to match the rates on WooCommerce
- Create an inclusive sales price list
- Create pos tender types exactly as follows:
Search Key|1000000, Name|Credit Card, Tender type|Credit Card Search Key|1000001, Name|Cash, Tender type|Cash Search Key|1000002, Name|EFT, Tender type|Direct Deposit Search Key|1000003, Name|OnCredit, Tender type|Account
- In the System Configurator, set:
PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CREDIT_CARD to 'N' CLIENT_ACCOUNTING to M
- Populate the WooCommerce Defaults window. Ensure the 'organisation' is set correctly
For example:
Run WooCommerce process from iDempiere
- Click on the menu item 'WooCommerce'
- Inspect your sales orders on iDempiere to see if your 'Completed' WooCommerce orders reflect
- The sales orders must be successfully completed on iDempiere
If you want to provide additional comments, please use the iDempiere forum post: iDempiere forum post