-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problem syncing items and orders with variants #46
Comments
You can check out this fork, it has many improvements: https://github.com/Muzzy73/WooCommerceConnector This also has some small improvements over Muzzy73 but they are related to variants: https://github.com/aadhilpm/WooCommerceConnector Hope these modifications will be merged into main (this branch) soon. |
I forgot to mention: you need to check Sync with WooCommerce on both the template and each item variants otherwise this won't work. You want to check Sync Quantity With woocommerce only for the variants if you keep stock for them. |
Thanks, I'll try the aadhilpm one out. Since I already have the libracore version installed, do you know if I can just run the same bench commands to install the new one, or do I have to fully uninstall the current version first? It would be nice to not have to re-configure from scratch. |
If you uninstall and reinstall a new branch it keeps all the settings except the tax accounts for taxes and shipping. However, from my experience, this code is far from being ready for production so, beware. |
I found that you need to be sure that the actual template item exists in ERPN and that it has the (woocommerce_product_id) set with the correct numbers. One thing to note is that if you had the original default WooCommerce Sync, set up. The one that comes with ERPN, it will have created a field called woocommerce_id. This is not the field that the libracore connector or any forkof it uses. This can be confusing because of the names. |
We are observing a similar problem - but not with variants:
There seems to be some race condition when a new item is ordered the first time and has not yet been generated in ERPnext. It tries to add a price but then the document is changed as it seems to set a standard price which causes the exception. |
@thomasoceguera hello |
Facing the same issue in ERPNext V15, any clue? |
I'm setting up a new ERPNext and WooCommerce system. I have been able to successfully sync normal items (without variants) to woocommerce from ERPNext, and also place order in wooCommerce and have them appear in ERPNext. So I know the connection settings are good.
I'm not really sure how items with variants in ERPNext are supposed to work with WooCommerce, so I've just been experimenting.
I created an item with variants called TEST-01, then created a color attribute and variants with Green and Red versions. My first question is, should the "Sync With woocommerce" option be checked on only the template, only the variants, or on all of them? Also, where should the stock levels be managed, template or variants? If I check only the variants, nothing syncs and I get an error:
Subsequent syncs don't produce any errors, but don't sync the items either.
Then I tried checking the template along with the variants. In that scenario, the TEST-01 product then appears in woocommerce, but I also get these errors:
Looking at the product in woocommerce, under the "Variations" section, I can see that both colors are listed as possible variations, but only the Green variant has been instantiated.
I then created an order in woocommerce, selecting the green variant as an item. Then I saved the order and triggered another sync. Then I get this error:
So am I doing something wrong, or is there a bug somewhere? What's the correct procedure to handle this? I've looked for documentation, but I haven't been able to find any details.
Thanks for making this! And for any help.
Versions:
ERPNext: v12.21.0 (version-12)
Frappe Framework: v12.18.0 (version-12)
WooCommerce Connector: v1.6.0 (master)
WooCommerce Plugin (in Wordpress): 5.1.0
The text was updated successfully, but these errors were encountered: