WooCommerce Plugin

569 views
Skip to first unread message

Yogan Naidoo

unread,
Oct 22, 2020, 11:53:32 AM10/22/20
to iDempiere
Hi Community,


Any feedback will be welcomed. 

Norbert Bede

unread,
Oct 24, 2020, 1:28:55 AM10/24/20
to iDempiere
thanks for your contribution!

norbert bede

Ole Hoppe

unread,
Apr 9, 2022, 11:08:40 AM4/9/22
to iDempiere
It looks like this plugin only replicates orders and customers from WooCommerce to iDempiere. Does this plugin also replicate product information, stock levels and prices from iDempiere to WooCommerce? Thanks!

Yogan Naidoo

unread,
Apr 10, 2022, 1:38:48 PM4/10/22
to iDempiere
No, only one way from WooCommerce to iDempiere.

Christian Gealone

unread,
Sep 6, 2022, 11:28:32 PM9/6/22
to iDempiere
Hello Yogan. I am trying to use your plugin but I encountered an error after running WooCommerce (It did output "**Synchronisation from WooCommerce initiated"):

Exception in thread "Thread-68" java.lang.RuntimeException: Error retrieving results from http request- Status Code: 401
 Response: HttpResponseProxy{HTTP/1.1 401 Unauthorized [Date: Wed, 07 Sep 2022 11:06:11 GMT, Server: Apache, X-Robots-Tag: noindex, Link: <https://192.168.1.4/wp-json/>; rel="https://api.w.org/", X-Content-Type-Options: nosniff, Access-Control-Expose-Headers: X-WP-Total, X-WP-TotalPages, Link, Access-Control-Allow-Headers: Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type, Vary: Origin, Keep-Alive: timeout=2, max=100, Connection: Keep-Alive, Transfer-Encoding: chunked, Content-Type: application/json; charset=UTF-8] ResponseEntityProxy{[Content-Type: application/json; charset=UTF-8,Chunked: true]}}
at com.icoderman.woocommerce.DefaultHttpClient.getEntityAndReleaseConnection(DefaultHttpClient.java:127)
at com.icoderman.woocommerce.DefaultHttpClient.get(DefaultHttpClient.java:46)
at com.icoderman.woocommerce.WooCommerceAPI.getAll(WooCommerceAPI.java:46)
at za.co.ntier.processes.WooCommerce$MyRunnable.run(WooCommerce.java:57)
at java.base/java.lang.Thread.run(Thread.java:829)

Here are my Woocommerce defaults:

WooCommerce Defaults.png

I have followed the documentation but still couldn't get this to work. Anything or any help from anyone is greatly appreciated.

Yogan Naidoo

unread,
Sep 7, 2022, 1:48:54 AM9/7/22
to iDempiere
Hi, Looks like you have a security/authorisation issue with the WooCommerce site.

To verify this, perhaps use a rest api client like Postman and do a basic query to the site.

Christian Gealone

unread,
Sep 7, 2022, 9:45:35 AM9/7/22
to iDempiere
Thank you for the quick response. 

I have followed the documentation on Generating Rest API Keys -  WooCommerce REST API - WooCommerce.

I have also checked that my consumer key and secret are valid by retrieving the data that I need via Postman -  https://192.168.1.4/wp-json/wc/v3/orders?consumer_key=XXXX&consumer_secret=XXXX (XXXX are changed with the consumer key and secret) as was instructed in the documentation for checking if consumer key and secret is valid. 


and ran it via Postman which gave me the result:

{
"code": "woocommerce_rest_authentication_error",
"message": "Invalid signature - provided signature does not match.",
"data": {
"status": 401
}
}



Ken Longnan

unread,
Sep 9, 2022, 10:13:58 AM9/9/22
to iDempiere
In Wordpress -> Settings, make sure the configuration for "Site Address (URL)" is https://192.168.1.4

Hope it helps.

Thanks & BR,

Ken

Christian Gealone

unread,
Sep 9, 2022, 11:16:26 AM9/9/22
to iDempiere
Hi, Ken! 

The link on my Site Address is  http://192.168.1.4.  I am already using another test site (Domain is expired, but been issued a self-signed certificate by fast comet), but encountered another error: 

Error retrieving results from HTTP request - Status Code: 404

Initial research points to my domain being expired. Can you concur? 

Cheers to you,
Christian

Ken Longnan

unread,
Sep 9, 2022, 11:45:51 AM9/9/22
to iDempiere
Hi Christian,

I tested with HTTPS (via proxy) and HTTP (direct connection to wordpress), both are worked for me. The key is to make sure "Site Address" is as same as the URL in "WooCommerce Defaults".

Thanks & BR,

Ken

Christian Gealone

unread,
Sep 9, 2022, 12:20:17 PM9/9/22
to iDempiere
I tried again with my locally hosted WordPress site   which does not have an SSL and Domain Name: http://192.168.1.4, but still got the same issue: 

error.png


Here are my WooCommerce Defaults:

WooCommerce Defaults.png

And here is my site URL:

Site URL.png

Maybe I'm missing something here (although I followed the documentation, along with my mates with their own VMs).
 Any insight is appreciated.

- Christian

Ken Longnan

unread,
Sep 10, 2022, 5:25:49 AM9/10/22
to iDempiere
Have you try HTTPS, maybe works. (For me, I am using HTTP/HTTPS both are working, but according to some google search, you have to use HTTPS)

I have encountered 401 issue like yours, the only change I did is keep URL same for "Site Address" and "Woocommerce Defaults" (avoid to use 'localhost')

2022-09-10_171945.png

2022-09-10_172302.png

You can see below logs from iDempiere backend, after change, Status from 401 NOK to OK by running Woocommerce Job in Plugin

2022-09-10_171430.png

Christian Gealone

unread,
Sep 10, 2022, 6:35:19 AM9/10/22
to iDempiere
 I'm now gonna find out how to make my http://192.168.1.4 into http://wordpress/wp (I'm new to WordPress). I'll give an update later


Thank you, Ken!
- Christian

Christian Gealone

unread,
Sep 10, 2022, 7:53:07 AM9/10/22
to iDempiere

Hi, Ken! 

I am yet to try your fix for my localhost WordPress site but I already have a successful get request (Status code 200) using my other test site (with HTTPS, self-signed SSL), You are right that I should use what's indicated in the site URL in WordPress as URL in Idempiere.

But I ran again in another pinch. It returns a list that was empty when in fact it should reflect the orders (We created mock orders). We also test it on PostMan and it returns this:

output.png

Thanks again!

Ken Longnan

unread,
Sep 10, 2022, 8:57:03 AM9/10/22
to iDempiere
2022-09-10_204535.png
please to have a check for the Woocommerce order in Wordpress with following information:
meta_key=syncedToIdempiere
meta_value=no
status=completed

I think you don't have order with above filters. What's why you get empty list return from Woocommerce API.

Christian Gealone

unread,
Sep 12, 2022, 6:16:07 AM9/12/22
to iDempiere
Hello, Ken! 

I already pulled some data after trying again. I haven't changed anything in the above filters but waited, and somehow it worked.

Thank you all for the help!
- Christian

Christian Gealone

unread,
Sep 12, 2022, 1:38:57 PM9/12/22
to iDempiere
Hello, Community!

May I ask for your insight about these errors?

Error.png

And here are my WooCommerce Defaults (I based them on the documentation):

WooCommerce Defaults.png

I am currently finding solutions to this and I appreciate any suggestions.

Cheers to you all!

Solutions Ocean.

unread,
Sep 12, 2022, 1:51:14 PM9/12/22
to idem...@googlegroups.com
You are not setting organization on order

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/20aa01f7-700b-4b57-bbee-ed71b7e6dfcdn%40googlegroups.com.

Christian Gealone

unread,
Sep 13, 2022, 3:19:02 PM9/13/22
to iDempiere
Can you elaborate more on your answer, "You are not setting the organization on order" and thank you for your reponse.

UPDATE:

I got the error WarehouseOrgConflict with HQ set on my Organization. I was advised to try using "*"  as it was displayed in my role info.

Role Info:

Role info.png

But when I set the Organization to "*", it then gave me the error WarehouseOrgConflict, so I tried again switching it back to HQ and the error was gone. I ended up with the same configuration, but without the error WarehouseOrgConflict.

Yogan Naidoo

unread,
Sep 14, 2022, 1:59:03 AM9/14/22
to iDempiere
Can you do the order manually on iDempiere (payment rule: mixed pos payment rule) and see if you get the same error?
Message has been deleted

Christian Gealone

unread,
Sep 16, 2022, 1:46:39 AM9/16/22
to iDempiere
Hello, Yogan!

I created an order manually with a payment rule: mixed pos payment rule, and I didn't get the same error.
We are currently attempting to do bi-directional syncing of iDempiere and WooCommerce, and are going to update the community on our progress, any insight is appreciated.

Thank you, Yogan, Ken, and the community for the help.

Christian Gealone

unread,
Sep 22, 2022, 4:44:56 AM9/22/22
to iDempiere
Hello, Community!

May I confirm, if I create a GET request from WooCommerce and it stores the order in sales order. In the next Get request (by running WooCommerce), will it store the same order in the sales order even when it is duplicated? 
For example, I got two sales orders with id = 234 in the sales order, even when an error about the duplicate order appears in the console.
Reply all
Reply to author
Forward
0 new messages