GPCsolutions / doliwoo

Dolibarr WooCommerce integration
https://gpcsolutions.github.io/doliwoo
39 stars 35 forks source link

FIX: check of billing company was wrong #83

Closed altairis-tof closed 5 years ago

altairis-tof commented 8 years ago

that was causing order creation to abruptly stop

   

altairis-tof commented 8 years ago

:shipit:

rdoursenaud commented 8 years ago

Thanks for your contribution but could you please open an issue instead?

I suspect something going wrong elsewhere.

You're not supposed to have to make another time-consuming request to Dolibarr (dolibarr_thirdparty_exists()) to get this information. It should be already cached into WooCommerce (dolibarr_id meta) at user creation.

altairis-tof commented 8 years ago

you are right BUT if the thirdparty id stored in doliwoo does not exist anymore in dolibarr, there is a big problem at the moment

altairis-tof commented 8 years ago

anyway, there is another problem with this transmission of the order to dolibarr as you pointed out it is very time consuming and the user wait without knowing what's happening... one solution would be to put a jquery loading image during the webservice call; otherwise i wonder if the conversation between woocommerce and dolibarr should not better be asynchronous via a batch croned task (as i suppose you already do for product sync) ?

rdoursenaud commented 8 years ago

You're right. This edge case should be handled nicely. Again, please open an issue ;)

On the other hand, everything is done synchronously at the moment for ease of debugging and because PHP is utterly bad at async… I have some ideas in mind to allow for a more flexible architecture but I miss founding for this project and overall time to seek founding :(

In the meantime, any feedback to the user would be better than the current implementation but I haven't found a way to inject it nicely into WooCommerce's workflow.

Feel free to play with it anyway. It's great to see some developer interrest!

altairis-tof commented 8 years ago

ok i will open an issue for the edge case. I will also make an issue for the asynchronous stuff and i'll try to propose you some solutions i have in mind... My purpose is to use woocommerce on altairis.fr and i want to use doliwoo to communicate with our Dolibarr, so it will be part of my job to participate in doliwoo's improvement.