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
webservice add order do not call 'actionUpdateQuantity' #13395
Comments
Hi @pppplus, Could you please provide me your script to test with it. Thanks! |
Hi, yes it's possible. Is it possible to send it privatly ? |
Hi @pppplus, My address mail: khouloud-belguith.ext@prestashop.com Thanks! |
Ok, I prepare the files, and send them in a few minutes. |
Hi @pppplus, Thank you, we received your e-mail. |
Hi @pppplus, When I tried with your file, I have these errors.
Thanks to check & feedback. |
Hi @pppplus, Now, I have this error
I think because you use in your script you use |
Hi @khouloudbelguith |
Hi @pppplus, Yes, I just received your last version, but as I said, I have a new errors with your script.
Thanks to check & feedback. |
Hi |
@pppplus, Yes, I created the two products with the references described & after runing your file, I have
I sent you via email the exact script that I followed |
Hi |
@pppplus, no sorry I did not receive your email yet. |
Ok, I just sent it again. |
@pppplus, Thanks a lot for your feedback. |
Hi @pppplus, Since we had no news from you for more than 30 days, I'll close this ticket. Feel free to open another one if you can give specific details. Thanks! |
Ok, after a lot of research... I have something to propose. 1st : actionUpdateQuantity is never called, when an order is done from webservice.
function update() call function postSave() And first action of postSave is to exit on id_product_attribute == 0 So, my suggestion, modify the function updateWs() like this :
` function setQuantity() call the hook actionUpdateQuantity (so, modules with actionUpdateQuantity can now work !!) BUT, to be usefull : |
I just hope function updateWs() is called only from Webservice !! |
@pppplus, Would you be willing to make a pull request on GitHub with your code suggestion? |
Hi No, because I'm not sure it's the right method to do it. But I'm not sure, there is no bad things after my changes. |
In PS 1.7.6.1 always the same problems. |
Always same problem in 1.7.6.7 |
Duplicate of #13006 |
Describe the bug
When I do order with webservice, quantities of products are not updated
Additionnal information
PrestaShop version: 1.7.5.1
PHP version: 7.2
I think it was ok on 1.7.5.0, because, I've done a lot of tests.
I just see my stock do not decrease with webservice orders.
The text was updated successfully, but these errors were encountered: