Daaaaad Posted January 17, 2017 Share Posted January 17, 2017 Hello, My Prestashop website is synchronized with a custom ERP that sets the shipping_number via the Webservice/API when the package is shipped. I would like the "in_transit" e-mail to be sent after the shipping_number is set (as done when you set the shipping_number via the Prestashop admin). Any idea ? Thank you Link to comment Share on other sites More sharing options...
Daaaaad Posted January 23, 2017 Author Share Posted January 23, 2017 up ! Link to comment Share on other sites More sharing options...
Rynoxx Posted April 7, 2017 Share Posted April 7, 2017 Hi,Sorry for bumping an old post, but I'm posting here to help others which might run into the same issue, and possibly if the original poster still needs a solution.I ran into the same trouble today, and it seems like prestashop 1.7.1 has the functionality for this https://github.com/PrestaShop/PrestaShop/commit/53991dcdd94e761e9714d51eaa193ceb6a9d8497What I did was backport the changes to OrderCarrier.php from that commit to work with Prestashop 1.6.X, and edit the PSWebServiceLibrary to support the "sendemail" parameter added.Here are my versions of those two files, and a file (changeTrackingNumber.php) which acts as an example for how to use the new update.NOTE: If you're running PrestaShop 1.7.1 you shouldn't need the OrderCarrier.php file.https://gist.github.com/Rynoxx/34655702277b24eba16d7cb4e0271614 Link to comment Share on other sites More sharing options...
hakeryk2 Posted August 21, 2017 Share Posted August 21, 2017 Hi @Rynoxx! I tried your solution but it is not work for me because I am using REST API not webservice and I am updating order shipping adres via XML through AJAX. Do you know how to trigger this email with maybe plain ajax or where I should look which function I should trigger or how to send email when updating via XML Ajax query? Link to comment Share on other sites More sharing options...
Rynoxx Posted August 22, 2017 Share Posted August 22, 2017 Hi @Rynoxx! I tried your solution but it is not work for me because I am using REST API not webservice and I am updating order shipping adres via XML through AJAX. Do you know how to trigger this email with maybe plain ajax or where I should look which function I should trigger or how to send email when updating via XML Ajax query? Hi, @hakeryk2 using the OrderCarrier.php class I posted before and simply using the REST API to edit an OrderCarrier as usual should work, if you make sure that the query parameter sendemail is set to 1 Link to comment Share on other sites More sharing options...
hakeryk2 Posted August 22, 2017 Share Posted August 22, 2017 I was editing only Orders (and shipping_number which is depracated) by Rest API - not order_carriers so maybe that is the problem. This is kinda weird because updating only orders is also affecting order_carriers.I will try and I'll give an edit to this message someday. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now