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
-
Eabi_dpd_parcelstoreCourierModuleFrontController
Direct known subclasses
Eabi_dpd_courierCourierModuleFrontController
public
|
#
__construct( )
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:
|
protected
|
#
setTimestamp(
Emulates DateTime::setTimeStamp for PHP 5.2 |
protected
|
|
protected
string
|
|
protected
|
|
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', .... ); |
protected
integer
|
#
_getTimestampOffset( integer $hours )
Calculates offset for helping to simulate DateTime::setTimestamp function for PHP5.2 |
protected
|
|
protected
string
|
#
_getTimeSelectMenu(
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. |
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 |
protected
integer
|
$_timestampDiff | null |
#
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 |
|