Read the statement by Michael Teeuw here.
AfterShip
-
I just added this to my mm and it worked … while Aftership only had a single package to be delivered. I subsequently added some more packages … and now it is just showing LOADING.
I will try to update this … but I am not sure where to start? Does anyone have an example of the info that the API returns?
-
Weird … is started showing packages again today. There were some UPS packages that dropped off the ‘to be delivered’ list … maybe this code doesn’t like UPS?
I would also like it to show DELIVERED that was less than X days ago (ie show packages that were delivered today but don’t show them tomorrow).
Edit: Well - that was easy. There is a show_delivered boolean that … shows the delivered packages once I set it to 1.
-
Further … I have been playing some more with this and added color coding for delivered and not delivered items. I also added a ‘keep delivered items in list’ cutoff so you can see things delivered today … or any time over the last week.
I might have to do some research about forking.
-
The aftership code doesn’t like it when the aftership API returns ‘pending’ or ‘Tracking details will be available once carrier returns updates. Please check again later.’. It can’t seem to load the packages.
I can debug this … but I don’t know how to get output from the code. More googling to see if I can get this module to create a log file.
-
Debugging is pretty easy.
Turn on your browser console (ctrl-sht-j) and then put log statements in your code.
Log.info('ruff: shipment ’ + shipments.tag)
They will turn up in the log. Aftership was throwing an error when a shipment was pending, the latest history message was trying to display even though there was a check for history = null. I added a check for Pending and now pending displays.