backamblock Posted August 23, 2016 Share Posted August 23, 2016 (edited) Hey,i need a module (or someone who could code me one) that makes an API/SOAP request to my suppliers server and then adds the tracking number from the answer into the prestashop order.If there is no tracking number available yet, it shall look for this order again the next time. If it imports a tracking number, it shall not make an API/SOAP request for that order again. Here is the provided Data from the supplier: The Request: POST /ws/FTNAPI.asmx HTTP/1.1 Host: xxxxxxxxxxx Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <TrackOrder xmlns="xxxxxxxxxxxxxxxxxxxxx"> <OrderOrReferenceNumber>string</OrderOrReferenceNumber> <MerchantEmailAddress>string</MerchantEmailAddress> <APISecret>string</APISecret> </TrackOrder> </soap12:Body> </soap12:Envelope> <OrderOrReferenceNumber> is the Order Number in Prestashop, for example: AJGOEBSKD The Answer: HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <TrackOrderResponse xmlns="xxxxxxxxxxxx"> <TrackOrderResult> <Success>boolean</Success> <Message>string</Message> <OrderStatusTimestamp>dateTime</OrderStatusTimestamp> <OrderStatus>string</OrderStatus> <TrackingNumber>string</TrackingNumber> <TrackingURL>string</TrackingURL> <CarrierName>string</CarrierName> <CarrierTypicalTransitTime>string</CarrierTypicalTransitTime> </TrackOrderResult> </TrackOrderResponse> </soap12:Body> </soap12:Envelope> Nice to Have: It would be really cool if you can add a feature: when the <OrderStatus> is marked as "shipped" in the Answer, it stays the status "shipped" in Prestashop, but when it is <OrderStatus> Cancelled, it sets the order to "On backorder (paid)" in Prestashop Thank you very much if you know any way to make this work or know someone who can do this! (paid of course) greetings,Felix Edited August 23, 2016 by backamblock (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted August 23, 2016 Share Posted August 23, 2016 duplicated https://www.prestashop.com/forums/topic/551177-module-that-adds-tracking-numbers-from-api-soap-request/ Link to comment Share on other sites More sharing options...
Recommended Posts