We recommend that you use the HTML widget created by Smartpost to display (and keep up to date) the dropdown menu of parcel terminals in the shopping cart of your online shop, it can be found here: http://www.smartpost.ee/widget/. You can use it to display the dropdown menu of parcel terminals to customers when they choose Smartpost as their delivery method, the customer can then choose the parcel terminal where they want to receive the parcel; this HTML widget is the simplest way to display the parcel terminal list. It is reasonable to use the other options described below according to your needs and specific wishes.
Smartpost offers an automatic interface for parcel terminal requests to ensure that the parcel terminal list is always up-to-date on your delivery methods and would update automatically (in case new parcel terminals are added or changes are made to the parcel terminal information, e.g. its name, description, location, opening hours); the interface is available in the following forms and at these links:
- http://www.smartpost.ee/places.html – For viewing in the browser.
- http://www.smartpost.ee/places.xml – For interfacing with web applications that process XML.
- http://www.smartpost.ee/places.csv – For interfacing with web applications that process CSV.
- http://www.smartpost.ee/places.php – For including in a PHP application.
The data includes the following information:
- place_id – Smartpost identifier for the parcel terminal – When using automatic data exchange, it is necessary to send this information together with the order.
- name – The name of the location of the parcel terminal in free format (maximum length 70 characters). This should be displayed to customers in the shopping cart dropdown menu.
- city – The city that the parcel terminal is located in (maximum length 25 characters).
- address – A specific address in the city including the street and house number (100 characters).
- opened – The opening times of a specific parcel terminal in free format (maximum length 75 characters).
- group_id – ID of the county the parcel terminal is located at.
- group_name – Combined name of the county/city.
- group_sort – Specifies the groups (counties) prioritised by Smartpost that will be shown before others in the dropdown menu. The groups with the highest value should be shown above others.
- created_date – When the parcel terminal was added to the Smartpost system.
- updated_date – When the parcel terminal values were last updated in the system.
- description – The description of a parcel terminal in a specific location. For example: “Located in Selver: opposite the information desk”
- active – Contains the values 1 or 0. The value 1 means that this parcel terminal must be displayed in the shopping cart dropdown menu and 0 means that it must not be displayed in the shopping cart dropdown menu. If a parcel terminal is out of commission or an accident occurs in the shopping centre (e.g. the fire in Mustika Prisma), then the value will go to 0 and this parcel terminal will not be displayed in the dropdown menu of the shopping cart.
- inactive_reason – If the “active” value of a parcel terminal is “0”, then the text field “inactive_reason” will also show a textual description of why this parcel terminal cannot be displayed to customers for parcel delivery. In other words, the parcel terminals list in the shopping cart should only display parcel terminals with an “active” value > 0, i.e. “1”.
The list of parcel terminals and their locations by county are presented and categorised in the order that they should be displayed to the customers in the shopping cart dropdown menu. The first category is “Tallinn/Harju County” which includes all the parcel terminals assigned to it, next is “Hiiumaa” then “Ida-Viru County” etc.
Of course, you can choose in which order you display them; this is just the current order that Smartpost recommends.
We strongly recommend that you take this list of parcel terminals dynamically or synchronously as your basis to display the parcel terminals in the shopping cart dropdown menu. Based on your needs, there are many ways to do it. For example:
- You can synchronise the parcel terminal list information to your database as follows:
Periodic synchronisation (e.g. Cron) that downloads the list of parcel terminals and checks if any new parcel terminals have been added based on the “created_date” and if so, then it adds them to your database.
It checks if any changes have been made to the parcel terminal information based on the “updated_date” and if so, then it updates the current parcel terminal information in your database.
- In the shopping cart you directly include the JS file:
http://www.smartpost.ee/places.js and use the included variable “places_info” to display the parcel terminal dropdown menu.
- In the web application you include the http://www.smartpost.ee/places.php or http://www.smartpost.ee/places.xml or http://www.smartpost.ee/places.csv file (depending on the web application technology) and parse it into an HTML dropdown menu in the delivery methods selection webpage.