Overview

Packages

  • Eabi
    • Dpd
  • None
  • PHP

Classes

  • dpdcodpayment
  • eabi_dpd_courier
  • Eabi_dpd_courierCourierModuleFrontController
  • eabi_dpd_parcelstore
  • eabi_dpd_parcelstore_data_send_executor
  • eabi_dpd_parcelstore_dpd_api
  • eabi_dpd_parcelstore_dpd_helper
  • eabi_dpd_parcelstore_html_helper
  • eabi_dpd_parcelstore_validator_helper
  • Eabi_dpd_parcelstoreCourierModuleFrontController
  • Eabi_Postoffice
  • eabi_postoffice_dialcode_helper
  • Eabi_PostofficePostofficeModuleFrontController

Functions

  • upgrade_module_0_3
  • upgrade_module_0_6
  • upgrade_module_0_8
  • Overview
  • Package
  • Class
  • Tree

Class Eabi_dpd_parcelstoreCourierModuleFrontController

Handles Order DPD courier to pickup goods commands when DPD parcelstore is enabled.

This controller is included in the front, because PrestaShop does not support backend URLs for the modules without creating menu item for it first.

It is only checked that user would be at least logged in the admin.

ModuleFrontController
Extended by Eabi_dpd_parcelstoreCourierModuleFrontController

Direct known subclasses

Eabi_dpd_courierCourierModuleFrontController
Author: Matis
Located at eabi_dpd_parcelstore/controllers/front/courier.php
Methods summary
public
# __construct( )

Exits script with message not logged in message when user is not logged in as admin.

Exits script with message not logged in message when user is not logged in as admin.

public boolean|array
# initContent( )

Sends courier call pickup goods action to DPD server and returns information about its status.

Available POST params:

  • Po_remark - Note to sent to courier
  • Po_Date - Date when courier should pick up goods. Format: YYYY-MM-DD
  • Po_Time - Time range when courier should pick up goods. Format: HMM-HMM (timefrom-timetill)
  • Po_envelope_qty - Number of envelopes courier should pick up
  • Po_parcel_qty - Number of parcels courier should pick up
  • Po_pallet_qty - Number of pallets courier should pick up

Sends courier call pickup goods action to DPD server and returns information about its status.

Available POST params:

  • Po_remark - Note to sent to courier
  • Po_Date - Date when courier should pick up goods. Format: YYYY-MM-DD
  • Po_Time - Time range when courier should pick up goods. Format: HMM-HMM (timefrom-timetill)
  • Po_envelope_qty - Number of envelopes courier should pick up
  • Po_parcel_qty - Number of parcels courier should pick up
  • Po_pallet_qty - Number of pallets courier should pick up

Returns

boolean|array
protected
# setTimestamp( DateTime & $dateTime, integer $timeStamp, mixed $ignoreOffset = true )

Emulates DateTime::setTimeStamp for PHP 5.2

Emulates DateTime::setTimeStamp for PHP 5.2

Parameters

$dateTime
DateTime
$dateTime
$timeStamp
integer
$timeStamp
$ignoreOffset
protected eabi_dpd_parcelstore_dpd_helper
# _getDpdHelper( )

Returns

eabi_dpd_parcelstore_dpd_helper
protected string
# _getTimeFrom( string $input )

Parameters

$input
string
$input

Returns

string
protected
# _getTimeTil( mixed $input )
public string
# getAvailabeTimes( )

Fetches available pickup times from DPD server and returns it as json encoded object

Format:

 array(
     '2013-12-24' => 'html select menu with available time ranges',
     '2013-12-25' => 'html select menu with available time ranges',
     ....
);

Fetches available pickup times from DPD server and returns it as json encoded object

Format:

 array(
     '2013-12-24' => 'html select menu with available time ranges',
     '2013-12-25' => 'html select menu with available time ranges',
     ....
);

Returns

string
protected integer
# _getTimestampOffset( integer $hours )

Calculates offset for helping to simulate DateTime::setTimestamp function for PHP5.2

Calculates offset for helping to simulate DateTime::setTimestamp function for PHP5.2

Parameters

$hours
integer
$hours

Returns

integer
protected
# _getDateInputLabel( mixed $label, mixed $value )
protected string
# _getTimeSelectMenu( DateTime $timeFrom, DateTime $timeTo, DateTime $timeWindow )

Takes earliest possible time, latest possible time, minimum allowed timewindow and renders it into one select menu with pickup time ranges.

All arguments have to be within same date.

Pickup time ranges are always displayed within narrowest possible timewindow.

Takes earliest possible time, latest possible time, minimum allowed timewindow and renders it into one select menu with pickup time ranges.

All arguments have to be within same date.

Pickup time ranges are always displayed within narrowest possible timewindow.

Parameters

$timeFrom
DateTime
$timeFrom earliest time possible
$timeTo
DateTime
$timeTo latest time possible
$timeWindow
DateTime
$timeWindow minimal allowed time between start and end time.

Returns

string
HTML select menu
protected integer
# _normalizeTime( string $input )

Normalizes DPD times to Unix timestamps.

For example 930 should be displayed as 09:30 and 9 should be displayed as 09:00

Normalizes DPD times to Unix timestamps.

For example 930 should be displayed as 09:30 and 9 should be displayed as 09:00

Parameters

$input
string
$input

Returns

integer
Properties summary
protected integer $_timestampDiff null
#

Used only on PHP5.2 environment where datetime does not support setTimeStamp function correctly

Used only on PHP5.2 environment where datetime does not support setTimeStamp function correctly

protected string $_dateFormat 'yyyy-MM-dd'
#
protected string $_timeFormat 'Hi'
#
protected string $_timeFormatNice 'H:i'
#
protected mixed $_availableDates
#
protected mixed $_apiResult
#
API documentation generated by ApiGen 2.8.0