Class eabi_dpd_parcelstore
Represents DPD parcel terminal shipping method.
Extra order data is stored under specialized order comment
Can perform following business actions:
- Calculate shipping price based on country and weight
- Display list of user selectable parcel terminals, which is auto updated.
- Send information about shipment data to DPD server.
- Call courier to pick up the shipment that was ordered using this carrier.
- Module
-
eabi_dpd_parcelstore
Direct known subclasses
eabi_dpd_courier
final public
|
|
protected
|
|
final public
boolean
|
|
final public
boolean
|
|
protected
boolean
|
#
_install( )
Performs following actions:
|
protected
boolean
|
#
_uninstall( )
Performs following actions:
|
public
array
|
#
getRequestForAutoSendData( OrderCore $order, AddressCore $address, array $selectedOfficeId, boolean $forceCod = false )
Prepares op=order request to be sent via DPD API. |
protected
|
|
public
string
|
#
hookPaymentConfirm( array & $params )
Automatic data sending is executed at the moment, when order is marked as Paid. |
public
|
|
public
|
|
protected
|
|
protected
|
|
public
|
|
public
string
|
#
hookDisplayFooter( )
For adding HOOK_EXTRACARRIER callout, when original callout did not occur when it had to. PrestaShop does not call extracarrier when for example address is not entered yet |
protected
array
|
#
_postValidation( )
Validates Admin Configuration Form and returns array of error message on validation failure. |
public
string
|
#
hookExtraCarrier( array $params )
This hook is called right after PrestaShop own carriers are rendered. Returns HTML, which:
Current PrestaShops
Checks following and hides if:
|
protected
|
|
public
string
|
|
protected
string
|
|
public
mixed
|
|
public
mixed
|
|
protected
string
|
#
_getFormHtml( string $action, string $method, array $formFields )
Renders form HTML from the form fields configuration |
public
float
|
|
public
float
|
#
getOrderShippingCost( CartCore $cartObject, float $shippingPrice = 0 )
Attemps to calculate shipping price from price-country shipping price matrix. If unsuccessful, then default handling fee is returned. If shipping calculation mode is set Per Item, then price will be multiplied by number of packages |
public
boolean|float
|
|
public
boolean
|
#
isCodEnabled( AddressCore $address )
Returns true if cash on delivery is allowed for specified address Checks if COD is allowed by configuration variable
|
protected
|
|
protected
array
|
#
_decodeShippingMatrix( string $input )
Decodes json encoded string to assoc array (array keys are country ISO codes) and returns in following format:
|
protected
array
|
|
public
string
|
#
displayInfoByCart( integer $cart_id )
This function is called when store administrator is viewing the order. Renders the selected parcelstore |
public
array
|
#
addArrayAfterKey( array $inputArray, array $appendArray, boolean $afterKey = false )
Adds $afterKey inside<span class="php-var">$inputArray</span>
|
public
|
|
public
integer
|
#
getUpdateInterval( )
Indicates that parcel terminals should be updated once every 1440 minutes (24h) |
public
null
|
#
setLastUpdated( integer $lastUpdated )
Marks that this modules pickup point list updated as of timestamp |
public
integer
|
|
public
string
|
|
public
string
|
#
getTerminalTitle( string $terminal )
Returns parcel terminal name when short names are enabled. Returns parcel terminal name with address, telephone, opening times when short names are disabled. |
public
string
|
#
getAdminTerminalTitle( array $terminal )
Returns parcel terminal name when short names are enabled. Returns parcel terminal name with address, telephone, opening times when short names are disabled. |
public
string
|
|
public
array|boolean
|
#
getOfficeList( )
Returns array of parcel terminals from DPD server or boolean false if fetching failed. |
protected
string
|
#
_getDescription( array $parcelT )
Fetches one line long human readable parcel terminal description from DPD Pudo instance |
public
integer
|
#
getGroupSort( string $group_name )
Groups parcel terminals by following rules:
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
string
|
|
protected
integer
|
#
_getNumberOfPackagesForOrder( OrderCore $order )
Returns number or parcels for the order according to Maximum Package Weight defined in DPD settings |
public
boolean
|
|
public
|
string |
CONST_PREFIX
|
'E_DPDEEP_' |
|
string |
TRACKING_URL
|
'https://tracking.dpd.de/cgi-bin/delistrack?typ=1&lang=en&pknr=@' |
#
@ will be replaced with actual tracking number. |
string |
ORDER_COMMENT_START_PREFIX
|
'-----EABI_DPDEE-----' |
#
If order comment starts with prefix marked here and is not visible on the frontend, then it is considered as extra data order comment. |
string |
NAME
|
'eabi_dpd_parcelstore' |
#
Shipping method code |
protected
string
|
$_const_prefix |
|
#
Copy of |
protected static
boolean
|
$_footerCalled | false |
#
For making sure that subclass would not call the footer itself again. |
protected
boolean
|
$_carrierDisplayed | false |
#
To prevent displaying carrier extra code more than once. |
protected static
|
$_helperModuleInstance |
|
#
Makes sure only one instance is queried |
public
|
$dataSendExecutor |
|
#
Handles functions related to automated data sending and packing slip sending |