Class eabi_dpd_parcelstore_data_send_executor
Handles automatic data sending functions between PrestaShop order and DPD api
Performs following:
- Adds extra fields to current shipping method configuration with appropriate validator rules.
- Sends data to DPD parcel terminal (op=order)
- Fetches PDF packing slip for the carrier
public
|
#
__construct(
Carrier method instance for this data send executor |
public
|
#
setConfigPrefix( type $configPrefix )
Adds ability to change Shipping method configuration prefix after construction |
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
#
_postValidation( mixed & $postErrors )
Does nothing, was included because earlier versions had postValidation in here. |
public
string
|
#
displayInfoByCart( type $cart_id )
Here is displayed extra info (if any) is related to the executor. |
public
boolean
|
#
hookpaymentConfirm( array & $params )
At the moment, when order is marked as paid, data is sent to remote server. This Prestashop hook
Data is sent when Data is sent separately for each order address. If no exceptions occur then information about data sending is added to order comments If exceptions occur, then exceptions are added to order comments Order comments are not visible in the frontend. |
public
string
|
#
getBarcodePdf( OrderCore $order )
Returns Packing slip PDF file, which can be echoed to browser for current order if one exists. |
public
boolean|string
|
|
protected
integer
|
#
_getNumberOfPackagesForOrder( OrderCore $order )
Returns number or parcels for the order according to Maximum Package Weight defined in DPD settings |
protected
null
|
#
_addOrderComment( integer $id_order, integer $id_customer, string $message )
Adds comment for the order |
public
boolean
|
#
isDataSent( OrderCore $order )
Returns true if parcel data is sent to DPD server for specified order. |
protected
|
|
public
array
|
#
autoSendData( OrderCore $order, AddressCore $address, integer $selectedOfficeId, boolean $forceCod = false )
Sends parcel data to DPD server for specified order and selected parcel terminal id. |
protected
|
|
public
array
|
#
initFormFields( )
Creates or returns cached instance of Admin Form Configuration fields for this instance. |
public
array
|
#
getDataFromOrder( OrderCore $order )
Attempts to decode extra data stored within order commetns and return it as array. |
public
array
|
#
setDataToOrder( OrderCore $order, array $data = array() )
Sets extra data to order and creates specialized order comment for it when neccessary. |
public
string
|
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. |
protected
string
|
$_code |
|
#
Shipping method code where current executor runs in |
protected
string
|
$_configPrefix |
|
#
Configuration prefix for the current executor |
protected
|
$_baseInstance |
|
#
Carrier method instance |
protected static
boolean
|
$_infoByCartDisplayed |
|
#
Makes sure that extra info displayed for a maximum of 1 time |
protected
array
|
$form_fields | array() |
#
If current executor has configuration form, then fields are store here |
protected static
boolean
|
$_paymentConfirmRun | false |