Please update your browser

It looks like your browser isn't supported any more. Please update your browser to get secure and more responsive browsing experience.


Please use one of these browsers:

ItellaItella

How to add a dropdown menu of Finnish parcel terminals to the shopping cart

Info & help
How to add a dropdown menu of Finnish parcel terminals to the shopping cart
Category: Tutorials

Instructions for use

The following lines must be inserted in the HTML <head> tag:
If this page is available via https then

<script type="text/javascript" src="https://www.smartpost.ee/widget/FiAPTLocation.js" charset="utf-8"></script>
  <link rel="stylesheet" type="text/css" href="https://www.smartpost.ee/widget/FiAPTLocation.css"/>

in another case

<script type="text/javascript" src="//www.smartpost.ee/widget/FiAPTLocation.js" charset="utf-8"></script>
  <link rel="stylesheet" type="text/css" href="http://www.smartpost.ee/widget/FiAPTLocation.css"/>

Inside the HTML body, below the transport selection form – the following JavaScript:

<script type="text/javascript">
   var apts = new FiAPTLocation(
       {
         target_id:  "target_id",  // widget konteineri id (vaikimisi - "smartpost_widget_target")
                                   // see konteiner peab kindlasti asuma vormis, mida hakatakse saatma
         placeid_name: "sp_id",    // pakkiautomati asukoha id sisaldava
                                   // selecti nimi (selle asukoha id postitakse koos vormiga),
                                   // vaikimisi - "smartpost_terminal_id"
         placename_name: "sp_name", // pakkiautomati asukoha nimi sisaldava
                                    // selecti nimi (postitakse koos vormiga),
                                    // vaikimsi - "smartpost_terminal_name"
         selected_id: false,          // kui seadistatud, valitakse vastava pakiautomaati
         default_id: 0,             // "Vali pakiautomaat" välja ID (Vaikimisi "-")
         show_infotext: true,     // kas näidata infoteksti
         show_logo: true,         // kas näidata logo
         show_city: true,         // kas näidata linna
         show_address: true,      // kas näidata asutuse aadressi
         show_opened: true,       // kas näidata millal on asutus avatud
         show_description: false, // kas näidata kirjedust
         //text_infotext:    "Siia tuleb infotekst", //infoteksti väärtus (vaikimisi - kijeldus
                                                     //pakiautomaadi asukohtade linkidega
         text_place:       "Asukoht",                //asukoha label (vaikimisi - "Pakiautomaadi asukoht:")
         text_city:        "Linn",                   //linna label (vaikimisi - "Pakiautomaadi aadress:")
         text_address:     "Aadress",                //aadressi label (vaikimisi - "Pakiautomaadi linn:")
         text_opened:      "Avatud",                 //avatud label (vaikimisi - "Pakiautomaadi lahtiolekuaeg:")
         text_default_item:"-- Vali Pakiautomaat --" //vaikevaliku tekst (vaikimisi - "-- Vali Pakiautomaat --")
       }
   );
  </script>

Minimal option

 <script type="text/javascript">
         var apts = new FiAPTLocation(
             {
               target_id:  "target_id2",
               placeid_name: "sp_id2",
               placename_name: "sp_name2",
               show_infotext: false,
               show_logo: false,
               show_city: false,
               show_address: false,
               show_opened: false,
               text_place:       "Pakiautomaat",
               text_default_item: "-- Vali Pakiautomaat --"
             }
          );
     </script>