Jump to content

Module that adds Tracking numbers from API / SOAP Request


Recommended Posts

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 by backamblock (see edit history)
Link to comment
Share on other sites

200-500€ sounds a little bit too much for "The task seems simple"

The max i would be willing to pay for a job like this is 100€ as i dont think this is a job for more than 5 hours. 

I mean, all you have to do is writing a fast and simple script, i would just need to input the right variables.

If you really want to have this much, i have to say sorry, but then i would rather learn to code it myself :)

 

edit//

plus: like you see, the interest in this module is more than just me, and i think if you write a module with diy cofiguration for the requests and answers, you could sell it for around 70€ and with 1.5 or 2 sold modules you would have your cost back, all above is win for you :)

 

if you would do it as a module for everyone to buy, i would know 3-5 more interested people 

Edited by backamblock (see edit history)
Link to comment
Share on other sites

Do you really know 5 people who needs exactly the same module?

To do configuration options takes a lot of time, but if everybody needs the same stuff it could be done fast.

 

Lets say total price of the module is 250, if 5 people need the same stuff, each pays 50 and everybody is happy.

Still to provide exact estimation, I will need more detailed description of the task. 

Link to comment
Share on other sites

I believe the complexity is the requirement to retry this until it succeeds.  a module could handle registering the new order upon order creation, and then updating the order with a tracking number if returned, but the module could not retry over and over again until it is successful.

 

that would require some more advanced design to use cron or some task scheduler that could retry all pending orders. 

Link to comment
Share on other sites

Okay, the point with the cron is understandable, maybe it would be easier to do the updating manually, when you push a button.

and the order status could be changed, so the module only searches for orders with "shipped" and when a number is found, it changes to "delivered" maybe.

so it only needs to look after "shipped orders".. or even further: the user of the module, me in this case, would have to select the shipped orders manually so the module searches for them and updates them to delivered, if this is the case.

 

somehing like this: http://addons.prestashop.com/en/22625-instant-order-tracking-update.html

but with the SOAP request involved.

 

i dont know what would be the easiest option, but i only have max 150€ for this and want the maximum automation possible. and if you would do this for around 250€, with the other guy that posted his interest here, it would be 125€ for each.

the 5 people i mentioned are interested, but they want to check it in my shop first before they spend money on it.

 

 

 

i think (just my way of thoughts as i am not a programmer) that it would be the easiest, if you do not implement the script in the module directly, but let the user of the module set all the variables, as you wouldnt have much customizing work for future buyers of the module.

 

unbenannt-1.jpg

 

EDIT:

to make a cron should not be that big of a problem i think, it would be enough to provide an URL which does the task, that url could be simply inserted to any cron module out there or even put into any third party web service

 

What programming languages would be required for this? maybe i could help with working this out.. 

Edited by backamblock (see edit history)
Link to comment
Share on other sites

  • 1 year later...
I built a module which made the exact reverse :


 

It sent stock of each product and product attribute when stock is modified in prestashop (after an order, when quantity is updated, ect..).

 

Do you have found your solution because I plan to build a module like this I'm interested to see if it will be usefull or not ?

Link to comment
Share on other sites

  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...