Widget PPL EN
PPL CZDeveloper web
PPL CZDeveloper web
Přepni do češtiny
    • Widget PPL - Delivery points
    • Inserting and displaying a map
    • Obtaining a point of sale - listener
    • Configuration parameters

    Obtaining a point of sale - listener

    Create a new event listener that responds to selecting a pickup point. The listener should look like this:
    After selecting the pickup point on the map and clicking the “Select this location” button, the full information about the chosen location will be displayed.
    For PPL applications, the "code" field is particularly important – it is a unique identifier of the pickup point in the KMxxxxxxxx format, which is used when creating a shipmen
    image.png
    complete listing from the console example:
    "Selected parcel shop:", {
      accessPointType: "ParcelShop",
      accessPointTypeInternal: {
        id: 1,
        name: "ParcelShop"
      },
      activeCardPayment: true,
      activeCashPayment: true,
      availableCmCodes: ["S", "M", "L", "XL"],
      capacitySettings: [{
      capacity: null,
      forYouDeliveryToAccessPoint: ["S"],
      height: 300,
      length: 300,
      size: "S",
      sizeId: 9,
      width: 300
    }, {
      capacity: null,
      forYouDeliveryToAccessPoint: ["M", "S"],
      height: 300,
      length: 600,
      size: "M",
      sizeId: 10,
      width: 400
    }, {
      capacity: null,
      forYouDeliveryToAccessPoint: ["L", "S", "M"],
      height: 500,
      length: 1000,
      size: "L",
      sizeId: 11,
      width: 500
    }, {
      capacity: null,
      forYouDeliveryToAccessPoint: ["XL", "L", "M", "S"],
      height: 9999,
      length: 9999,
      size: "XL",
      sizeId: 12,
      width: 9999
    }],
      city: "Mlečice",
      code: "KM10833808",
      country: "CZ",
      depot: "03",
      depotName: "Depo Plzeň",
      dhlPsId: "10833808",
      dimensionForced: true,
      externalNumbers: [{
      type: "DhlpsId12",
      value: "108"
    }, {
      type: "KtmDhl11",
      value: "10833808"
    }, {
      type: "SoftPosUserHash15",
      value: "999999PPL07504"
    }, {
      type: "SoftPosTId17",
      value: "CUPPL07504"
    }, {
      type: "CisloProvozovny16",
      value: "35806150"
    }],
      gps: {
        latitude: 49.919673888,
        longitude: 13.695205611
      },
      id: 4556197,
      isCapacityAvailable: true,
      ktmNote: "",
      name: "Prodejna Mlečice (Kiwifood)",
      openHours: ["Mon;07:30;12:00;12:00;16:30", "Tue;07:30;12:00;12:00;16:30", "Wed;07:30;12:00;12:00;16:30", "Thu;07:30;12:00;12:00;16:30", "Fri;07:30;12:00;12:00;16:30", "Sat;07:30;11:00;;"],
      parcelshopName: "PPL Parcelshop 108",
      phone: null,
      pickupEnabled: true,
      street: "Mlečice 32",
      tribalServicePoint: false,
      visiblePs: true,
      www: "",
      zipCode: "33808"
    }
    "Vybraný parcel shop:", {
      accessPointType: "ParcelShop",
      accessPointTypeInternal: {
        id: 1,
        name: "ParcelShop"
      },
      activeCardPayment: true,
      activeCashPayment: true,
      availableCmCodes: ["S", "M", "L", "XL"],
      capacitySettings: [{
      capacity: null,
      forYouDeliveryToAccessPoint: ["S"],
      height: 300,
      length: 300,
      size: "S",
      sizeId: 9,
      width: 300
    }, {
      capacity: null,
      forYouDeliveryToAccessPoint: ["M", "S"],
      height: 300,
      length: 600,
      size: "M",
      sizeId: 10,
      width: 400
    }, {
      capacity: null,
      forYouDeliveryToAccessPoint: ["L", "S", "M"],
      height: 500,
      length: 1000,
      size: "L",
      sizeId: 11,
      width: 500
    }, {
      capacity: null,
      forYouDeliveryToAccessPoint: ["XL", "L", "M", "S"],
      height: 9999,
      length: 9999,
      size: "XL",
      sizeId: 12,
      width: 9999
    }],
      city: "Kdyně",
      code: "KM10334506",
      country: "CZ",
      depot: "03",
      depotName: "Depo Plzeň",
      dhlPsId: "10334506",
      dimensionForced: true,
      externalNumbers: [{
      type: "DhlpsId12",
      value: "103"
    }, {
      type: "KtmDhl11",
      value: "10334506"
    }, {
      type: "PosTId14",
      value: "M1PPLC9742"
    }, {
      type: "SoftPosUserHash15",
      value: "999999PPL06028"
    }, {
      type: "SoftPosTId17",
      value: "CUPPL06028"
    }, {
      type: "CisloProvozovny16",
      value: "35804835"
    }],
      gps: {
        latitude: 49.390159194,
        longitude: 13.038838611
      },
      id: 4424087,
      isCapacityAvailable: true,
      ktmNote: "",
      name: "ZKD Kdyně Náměstí",
      openHours: ["Mon;06:00;17:00;;", "Tue;06:00;17:00;;", "Wed;06:00;17:00;;", "Thu;06:00;17:00;;", "Fri;06:00;17:00;;", "Sat;07:00;11:00;;"],
      parcelshopName: "PPL Parcelshop 103",
      phone: null,
      pickupEnabled: true,
      street: "Náměstí 440",
      tribalServicePoint: false,
      visiblePs: true,
      www: "",
      zipCode: "34506"
    }
    Previous
    Inserting and displaying a map
    Next
    Configuration parameters
    Built with