peskywinnets Posted December 11, 2018 Share Posted December 11, 2018 (edited) Hello, I've managed to pull in order information using VBA and a GET command ...but what I seek now is the VBA syntax to update a Prestashop order status (e.g. from "Processing in progress" to "Shipped") Has anyone got either a PUT or POST command working in VBA with the Prestashop webservice? I'd be grateful for any input 🙂 Edited December 11, 2018 by peskywinnets (see edit history) Link to comment Share on other sites More sharing options...
razvy Posted April 18, 2020 Share Posted April 18, 2020 Hi, did you manage to do this? If so, please post your method here. Thank you! Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2020 Share Posted April 19, 2020 (edited) . Edited July 26, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2020 Share Posted April 19, 2020 (edited) . Edited July 26, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
razvy Posted April 19, 2020 Share Posted April 19, 2020 Yes, this would be great! The reason I was looking for a VBA + WebService solution is that I don't know PHP Could you guide me trough the process of implementing your php solution? Thanks a lot! Link to comment Share on other sites More sharing options...
razvy Posted April 19, 2020 Share Posted April 19, 2020 It would also be great to set the tracking number in the same time, so the customer could track the parcel. Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2020 Share Posted April 19, 2020 (edited) . Edited July 26, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2020 Share Posted April 19, 2020 (edited) . Edited July 26, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2020 Share Posted April 19, 2020 (edited) . Edited July 26, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2020 Share Posted April 19, 2020 (edited) . Edited July 26, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2020 Share Posted April 19, 2020 (edited) . Edited July 26, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
razvy Posted April 19, 2020 Share Posted April 19, 2020 Still doesn't change the tracking number, it only updates the order status... Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2020 Share Posted April 19, 2020 (edited) . Edited July 26, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
razvy Posted April 19, 2020 Share Posted April 19, 2020 I did already, it still doesn't change the tracking number... Link to comment Share on other sites More sharing options...
razvy Posted April 19, 2020 Share Posted April 19, 2020 I checked in the database, it doesn't change in any of the two tables.. Link to comment Share on other sites More sharing options...
razvy Posted April 19, 2020 Share Posted April 19, 2020 But if i change if (!empty($tracking_number)) { Db::getInstance()->Execute("UPDATE "._DB_PREFIX_."order_carrier SET tracking_number = '".$tracking_number."' WHERE id_order = ".$get_order); Db::getInstance()->Execute("UPDATE "._DB_PREFIX_."orders SET shipping_number = '".$tracking_number."' WHERE id_order = ".$get_order); } to Db::getInstance()->Execute("UPDATE "._DB_PREFIX_."order_carrier SET tracking_number = '".$tracking_number."' WHERE id_order = ".$get_order); Db::getInstance()->Execute("UPDATE "._DB_PREFIX_."orders SET shipping_number = '".$tracking_number."' WHERE id_order = ".$get_order); it does DELETE the old tracking number, but it doesn't write a new one into tha databases. Link to comment Share on other sites More sharing options...
razvy Posted April 19, 2020 Share Posted April 19, 2020 It's like it retrieves a blank tracking number from the URL Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2020 Share Posted April 19, 2020 (edited) . Edited July 26, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2020 Share Posted April 19, 2020 (edited) . Edited July 26, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
razvy Posted April 19, 2020 Share Posted April 19, 2020 I did what you said and addes these two lines: echo $tracking_number; echo 1234; It only show "1234", so the $tracking_number is empty. The URL is mydomain.ro/change-order-state.php?order=2715&state=4&tracking_no=ABCDEF&secure_key=xxxx Why could cause the $tracking_number to be empty? Thank you! Link to comment Share on other sites More sharing options...
razvy Posted April 19, 2020 Share Posted April 19, 2020 Found it! There was a small typo in your code: $tracking_number = $GET['tracking_no']; needs to be: $tracking_number = $GET_['tracking_no']; Link to comment Share on other sites More sharing options...
razvy Posted April 19, 2020 Share Posted April 19, 2020 Thank you very much!!! Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2020 Share Posted April 19, 2020 (edited) . Edited July 26, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2020 Share Posted April 19, 2020 (edited) . Edited July 26, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2020 Share Posted April 19, 2020 (edited) . Edited July 26, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2020 Share Posted April 19, 2020 (edited) . Edited July 26, 2021 by Guest (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2020 Share Posted April 19, 2020 (edited) . Edited July 26, 2021 by Guest (see edit history) 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