Paid WooCommerce full 2 way integration that actually works

All changes have been merged. The git url is in my earlier post. Before you use our version do the following

Disable the core WooCommerce app. Better to remove all settings as well.

Remove the other WooCommerce app which you maybe using.

Delete all products in WooCommerce

Install my version of app but enable it. Just use the settings propely.

Use sync items one way only. ERPNext to WooCommerce, don’t use it other way around. This can send it in loop hence duplicate items on every sync.

Before using the tick on items master to sync to WooCommerce create the WooCommerce warehouse a and Item price if different than the standard selling price. Use Naming Series for items, it is populated in SKU field of WooCommerce.

Tick both WooCommerce settings after you have done all proper settings.

Once sync is done product will always be in Draft. You need to add pictures and other properties on WooCommerce website before publishing it.

Good luck.

1 Like

I think two way connector need a lot of time and efforts
on the other side I think the default connector on erpnext is good only to get the items on your woocomerce after that I believe the right decision is an integration from woocomerce to the erpnext

Our team develop integration from woocomerce to erpnext with these features include these features:

  • create customer
  • create sales invoice
  • create payment entry when user pay
  • create delivery note when the product shipped
  • create return invoice and return payment and return delivery note when refund happened
  • provide links for the document of delivery
  • log errors for any issue happened and retry with exponential delay
  • Products stock sync.
  • Products prices sync.
  • Support any woocommerce payment gateway, bank payment and COD
  • Log for every documents creation

if you need more information please contact me on alaa@petoasis.com.sa

I don’t think you had tested @lasalesi version. It does all what you stated above.

Is there a link to access this version?

really I was not see this before looks great but I can not find any document talk about the features in clear way if you can provide a feature list I will happy to see
on the other side a lot of features I mentions I can not imagine how it can be done without any woocomerce effort so I will invest some time checking the details

It is a paid solution so we are not sharing the code I will record a video to show the features for those may interest

1 Like

Hi @Muzzy,
Could you help to confirm? If currently, the Connector is able to Create Sale Invoice and Payment Entry in ERPNext. I have been testing in the last few days in row. But, It only create the Sale Order even though the payment status has been made on WooCommerce side.

Thank you so much.

Hi. Which fork are you using? We have not yet added the payment gateway. We may be doing next week. However, I think it should make sales invoice and payment entry irrespective of which fork you are using.

Did you check your Woocommerce config? It is different than core WooCommerce settings.

As per the code if you have set Yes to make Sales Invoice then app should make invoice. This code makes SI

This code makes Payment entry

Go though your Config setting with fine comb. Am pretty sure the codes are fine.

Hi @Muzzy,
I really appreciate your time to respond. So you mean you are able to create Sale Invoice on your side? Actually, I try both from Lasalesi and also from your fork.

I did check all the required options as per my screenshots below:

A. On ERPNext



B. WooCommerce Order


C. Sync Log

I have been trying and testing the whole weeks and different ERPNext versions (12 and 13), trying to figure out the code as well (I have some basic PHP knowledge, not Phyton actually :sweat_smile:). But, I couldn’t find what was wrong or get it to work.

Maybe If you can see what is wrong with my configuration?

Thank you so much,

Finally, I can get it to works. I had to remove Quotation Mark (") from the condition statement value. Screenshot below:

Now the synchronization working seamlessly.

1 Like

Thanks. I think I need to do the same in my app.

@lasalesi FYI If you have any input on this.

1 Like

@Muzzy @lasalesi

In my use case. There’re still a few things not functional or need improvement.

A.Need to Fix

  1. Product Image are not sync from WooCommerce to ERPNext.

B. Additional Features

  1. Ability to map Deposit Account based on WooCommerce Payment Method.
  2. Map any Shipping Fee directly to an exact account in ERPNext. Not based on Shipping Title (i.e. In my case, I have lot of difference shipping titles based on shipping location or even dynamic shipping title. Then, The order won’t be imported if the title is not match.)

Or maybe other issues that we still may not found yet.

Since my ability is limited, I will try to hire someone who can manage to implement this and will contribute back to the community once everything is done.

As per code the default image is t be set to ERPNext from Woo. It will not set if the image is already present. We dont use it as we have set all images on Woo. We dont need images in ERPNext.

BTW have you ticked this?
Sync items from WooCommerce to ERPNext

The image won’t be sent to ERPNext at all on my installation. Also no logs, Just no image was sent at all. And I’m not sure why too.

Here’s my configuration.
WooCommerce%20Config

In my use case. I need to export products from Woo to ERPNext. I install the app directly from lasalesi’s branch. Since, Currently WooCommerce is my main selling channel.

Right now I’m using QuickBooks Online with Woo and use OneSaas to synchronize the data.

I always want to switch to ERPNext, But because of the lack of connector. I’m still staying with QuickBooks for temporary.

Thanks for the note, this has been resolved (and some typos cleaned up):

https://github.com/libracore/WooCommerceConnector/commit/337ea60730ef8be40f28d310995438f43483b785

2 Likes

Oh man. Just realised the spelling error. Thanks for the update.

How manage delivery charges as an item which also has VAT. Currently in ERPNext I am getting VAT of item plus full delivery charges without VAT as a sum in VAT. So my delivery charge is actually part of VAT not as income. No tax was charged on delivery charges.

In WooCommerce I have defined it as $1. And set ot as set Tax Status as taxable. Even then ERPNext doesn’t understand. Am sure am making some mistake but can’t find where.

AS far as I understand, shipping charges should not be an item (as it is often done in only-ERPNext configurations), but be part of the “Sales Taxes and Charges” section in ERPNext and Shipping Charges in WooCommerce. Select type “Actual” for both lines in ERPNext.

Hello @Muzzy,
I tried your fork.
I had issue with image sync because the image URL is malformed.
On ERPnext if the images of item is a link to external CDN website url.
Then while making API call to WP, the ERP domain name is appended to the external image link. This result to mal-formed image link.
The ERP hostname is appended to the remote Image url.
eg
https://woocommercedomain.com/wp-json/wc/v3/products/12307: {'code': 'woocommerce_product_image_upload_error', 'message': "Error getting remote imagehttps://erpnextdomain.comhttps://remoteimage-res.cloudinary.com/w_auto,f_auto,fl_lossy,dpr_auto,q_auto/media/catalog/product/N/T/158298_1564659190.jpg. Error: cURL error 60: SSL: no alternative certificate subject name matches target host name 'erpnextdomain.comhttps'", 'data': {'status': 400}}

I can see the error location, \woocommerceconnector\sync_products.py one line 786
image_info["images"][0]["src"] = ( "https://" + cstr(frappe.local.site) + img_details[1] ) image_info["images"][0]["position"] = 0 post_request("products/{0}".format(item.woocommerce_product_id), image_info)

I want to ask if you can update the repo because I don’t write python, I do PHP. But I think an if statement to check img_detail variable contains http string then no need to append the "https://" + cstr(frappe.local.site)

Hi. We dont set ERPNext images. We have asked client to set images on WooCommerce site directly. I would suggest you do the same.