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_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
Author: Matis
Located at eabi_dpd_parcelstore/datasend-executor.php
Methods summary
public
# __construct( eabi_dpd_parcelstore $baseInstance )

Carrier method instance for this data send executor

Carrier method instance for this data send executor

Parameters

$baseInstance
eabi_dpd_parcelstore
$baseInstance
public eabi_dpd_parcelstore_data_send_executor
# setConfigPrefix( type $configPrefix )

Adds ability to change Shipping method configuration prefix after construction

Adds ability to change Shipping method configuration prefix after construction

Parameters

$configPrefix
type
$configPrefix

Returns

eabi_dpd_parcelstore_data_send_executor
public boolean
# install( )

Returns always true

Returns always true

Returns

boolean
public boolean
# uninstall( )

Returns always true

Returns always true

Returns

boolean
public boolean
# _postProcess( )

Returns always true

Returns always true

Returns

boolean
public boolean
# _postValidation( mixed & $postErrors )

Does nothing, was included because earlier versions had postValidation in here.

Does nothing, was included because earlier versions had postValidation in here.

Returns

boolean
public string
# displayInfoByCart( type $cart_id )

Here is displayed extra info (if any) is related to the executor.

Here is displayed extra info (if any) is related to the executor.

Parameters

$cart_id
type
$cart_id

Returns

string
public boolean
# hookpaymentConfirm( array & $params )

At the moment, when order is marked as paid, data is sent to remote server.

This Prestashop hook paymentConfirm uses following parameters:

  • id_order - id of the order, which is being currently marked as paid.

Data is sent when SENDDATA_ENABLE is valued as yes and data has not already been sent previously

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.

At the moment, when order is marked as paid, data is sent to remote server.

This Prestashop hook paymentConfirm uses following parameters:

  • id_order - id of the order, which is being currently marked as paid.

Data is sent when SENDDATA_ENABLE is valued as yes and data has not already been sent previously

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.

Parameters

$params
array
$params

Returns

boolean
public string
# getBarcodePdf( OrderCore $order )

Returns Packing slip PDF file, which can be echoed to browser for current order if one exists.

Returns Packing slip PDF file, which can be echoed to browser for current order if one exists.

Parameters

$order
OrderCore
$order

Returns

string
public boolean|string
# getBarcode( OrderCore $order )

Returns packing slip URL if data is sent or false otherwise.

Returns packing slip URL if data is sent or false otherwise.

Parameters

$order
OrderCore
$order

Returns

boolean|string
protected integer
# _getNumberOfPackagesForOrder( OrderCore $order )

Returns number or parcels for the order according to Maximum Package Weight defined in DPD settings

Returns number or parcels for the order according to Maximum Package Weight defined in DPD settings

Parameters

$order
OrderCore
$order

Returns

integer
protected null
# _addOrderComment( integer $id_order, integer $id_customer, string $message )

Adds comment for the order

Adds comment for the order

Parameters

$id_order
integer
$id_order
$id_customer
integer
$id_customer
$message
string
$message

Returns

null
public boolean
# isDataSent( OrderCore $order )

Returns true if parcel data is sent to DPD server for specified order.

Returns true if parcel data is sent to DPD server for specified order.

Parameters

$order
OrderCore
$order

Returns

boolean
protected eabi_postoffice_dialcode_helper
# _getDialCodeHelper( )

Returns

eabi_postoffice_dialcode_helper
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.

Sends parcel data to DPD server for specified order and selected parcel terminal id.

Parameters

$order
OrderCore
$order
$address
AddressCore
$address
$selectedOfficeId
integer
$selectedOfficeId
$forceCod
boolean
$forceCod true, if request should be forced to cash on delivery request

Returns

array
comma separated parcel numbers in array key of 'barcode'
protected eabi_dpd_parcelstore_dpd_helper
# _getDpdHelper( )

Returns

eabi_dpd_parcelstore_dpd_helper
public array
# initFormFields( )

Creates or returns cached instance of Admin Form Configuration fields for this instance.

Creates or returns cached instance of Admin Form Configuration fields for this instance.

Returns

array
public array
# getDataFromOrder( OrderCore $order )

Attempts to decode extra data stored within order commetns and return it as array.

Attempts to decode extra data stored within order commetns and return it as array.

Parameters

$order
OrderCore
$order

Returns

array
public array
# setDataToOrder( OrderCore $order, array $data = array() )

Sets extra data to order and creates specialized order comment for it when neccessary.

Sets extra data to order and creates specialized order comment for it when neccessary.

Parameters

$order
OrderCore
$order
$data
array
$data

Returns

array
public string
# l( string $string )

Wrapper for <span class="php-var">$this</span>->l() (was protected in 1.4)

Kept for compatiblity reasons

Wrapper for <span class="php-var">$this</span>->l() (was protected in 1.4)

Kept for compatiblity reasons

Parameters

$string
string
$string

Returns

string
Constants summary
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.

If order comment starts with prefix marked here and is not visible on the frontend, then it is considered as extra data order comment.

Properties summary
protected string $_code
#

Shipping method code where current executor runs in

Shipping method code where current executor runs in

protected string $_configPrefix
#

Configuration prefix for the current executor

Configuration prefix for the current executor

protected eabi_dpd_parcelstore $_baseInstance
#

Carrier method instance

Carrier method instance

protected static boolean $_infoByCartDisplayed
#

Makes sure that extra info displayed for a maximum of 1 time

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

If current executor has configuration form, then fields are store here

protected static boolean $_paymentConfirmRun false
#
API documentation generated by ApiGen 2.8.0