Adds ability to use DPD COD services with DPD Parcelstore and DPD courier
Customer can confirm the order without paying and customer is obligated to
pay at the moment of receiving the package.
Merchant can apply extra COD fee, when customer decides to use this payment
method. COD fee can be set under DPD shipping modules own setting
Methods summary
public
|
#
__construct( )
Initiates module and loads default config
Initiates module and loads default config
|
public
boolean
|
#
install( )
Performs following actions:
- Registers hook with name
payment - for displaying payment info,
when this payment has been selected
- Registers hook with name
paymentReturn - for validating order
confirmation when this payment has been selected
- Registers hook with name
actionValidateOrder - not applicable
as of now, since automatic data sending is invoked with order status change
- Registers hook with name
displayHeader - for loading css
file
- Applies all updates, when applicable
Performs following actions:
- Registers hook with name
payment - for displaying payment info,
when this payment has been selected
- Registers hook with name
paymentReturn - for validating order
confirmation when this payment has been selected
- Registers hook with name
actionValidateOrder - not applicable
as of now, since automatic data sending is invoked with order status change
- Registers hook with name
displayHeader - for loading css
file
- Applies all updates, when applicable
Returns
boolean
|
public
boolean
|
#
uninstall( )
Performs following actions:
- Unregisters hook with name
payment
- Unregisters hook with name
paymentReturn
- Unregisters hook with name
actionValidateOrder
- Unregisters hook with name
displayHeader
- Unregisters hook with name
actionOrderStatusPostUpdate
Performs following actions:
- Unregisters hook with name
payment
- Unregisters hook with name
paymentReturn
- Unregisters hook with name
actionValidateOrder
- Unregisters hook with name
displayHeader
- Unregisters hook with name
actionOrderStatusPostUpdate
Returns
boolean
|
public
string
|
#
getContent( )
PrestaShop implementation for displaing configuration form for this
module
PrestaShop implementation for displaing configuration form for this
module
Returns
string
|
public
string
|
#
hookPayment( array $params )
Called when customer is displayed list of available payment methods
Params are assoc array and should contain at least cart entry,
which is type of Cart
If this payment is not available, then empty string is returned
Called when customer is displayed list of available payment methods
Params are assoc array and should contain at least cart entry,
which is type of Cart
If this payment is not available, then empty string is returned
Parameters
Returns
string
|
public
|
#
hookActionValidateOrder( array $params )
Params is assoc array with following elements
cart - cart object belonging to created order
order - newly created order object
Not used, since automatic data is sent by ActionOrderStatusPostUpdate
hook
Parameters
|
public
boolean
|
#
isAvailable( array $params )
Public wrapper for _isAvailable function.
Params are assoc array and should contain at least cart entry,
which is type of Cart
Public wrapper for _isAvailable function.
Params are assoc array and should contain at least cart entry,
which is type of Cart
Parameters
Returns
boolean
|
public
float
|
#
getCodFee( CartCore $cart )
Global COD fee calculator based on the selected shipping method.
This method is called after all validation rules have passed
Global COD fee calculator based on the selected shipping method.
This method is called after all validation rules have passed
Parameters
Returns
float
|
public
string
|
#
getTitle( mixed $cart )
Displays current payment method title with extra cash on delivery fee when
extra fee has been set
Displays current payment method title with extra cash on delivery fee when
extra fee has been set
Returns
string
|
public
|
#
hookActionOrderStatusPostUpdate( array $params )
Sends automatic order data, when _status is certain
<span class="php-var">$params</span> contain:
id_order order id, which status was just updated
newOrderStatus order status which was applied
Sends automatic order data, when _status is certain
<span class="php-var">$params</span> contain:
id_order order id, which status was just updated
newOrderStatus order status which was applied
Parameters
|
public
string
|
#
getCurrentLangValue( string|serialized $title )
If <span class="php-var">$title</span> is serialized
then it is unserialized and current language value is returned
If <span class="php-var">$title</span> is serialized
then it is unserialized and current language value is returned
Parameters
- $title
string|serialized $title
Returns
string
|
public
boolean
|
#
checkCurrency( CartCore $cart )
PrestaShop own currency validation method
PrestaShop own currency validation method
Parameters
Returns
boolean
|
public
boolean
|
|
public
|
|
public
mixed
|
#
getConfigData( string $param )
Fetches configuration for this instance for current store scope.
Fetches configuration for this instance for current store scope.
Parameters
Returns
mixed
|
public
mixed
|
#
getFormConfigData( string $param )
Fetches configuration for Admin form taking into account supplied store
scope.
Fetches configuration for Admin form taking into account supplied store
scope.
Parameters
Returns
mixed
|
public
Eabi_Postoffice
|
#
_getHelperModule( )
Returns cached instance of base helper module
Returns cached instance of base helper module
Returns
|
public
mixed
|
#
getGlobalConfigData( string $param )
Fetches global configuration for this instance.
Fetches global configuration for this instance.
Parameters
Returns
mixed
|
protected
array
|
#
_postValidation( )
Validates Admin Configuration Form and returns array of error message on
validation failure.
Validates Admin Configuration Form and returns array of error message on
validation failure.
Returns
array error messages as array, if any
|
protected
string
|
#
_getFormHtml( string $action, string $method, array $formFields )
Renders form HTML from the form fields configuration
Renders form HTML from the form fields configuration
Parameters
- $action
string $action action url
- $method
string $method form element method attribute
- $formFields
array $formFields form fields array
Returns
string resulting html
|
protected
boolean
|
#
_isAvailable( array $params )
Returns true when:
- Module is active
- Shipping method is DPD Parcelstore or DPD courier and shipping method has
COD fee defined
- Method supports current currency
- When status check is available, then all products in cart have to be
in-stock
Params are assoc array and should contain at least cart entry,
which is type of Cart
Returns true when:
- Module is active
- Shipping method is DPD Parcelstore or DPD courier and shipping method has
COD fee defined
- Method supports current currency
- When status check is available, then all products in cart have to be
in-stock
Params are assoc array and should contain at least cart entry,
which is type of Cart
Parameters
Returns
boolean
|
protected
integer
|
#
_getIdAddress( integer $cart )
Fix display bug right after login
select menu of pickup points not displayed after entering customer address
and then logging in instead
Fix display bug right after login
select menu of pickup points not displayed after entering customer address
and then logging in instead
Parameters
- $cart
integer $origIdAddress default cart->id_address_delivery
Returns
integer
|
protected
boolean
|
#
_isSerialized( string $input )
Checks if input is phpserialized string or not
Checks if input is phpserialized string or not
Parameters
Returns
boolean
|
protected
eabi_dpd_parcelstore_html_helper
|
|
protected
eabi_dpd_parcelstore_validator_helper
|
|
public
boolean
|
#
upgrade_module_0_6( )
Performs following actions
- Creates new order state, which should trigger automatic data sending without
marking order as paid
- Applies created state as trigger-data-sending status
- Registers hook
actionOrderStatusPostUpdate for auto-sending
data after status change
Performs following actions
- Creates new order state, which should trigger automatic data sending without
marking order as paid
- Applies created state as trigger-data-sending status
- Registers hook
actionOrderStatusPostUpdate for auto-sending
data after status change
Returns
boolean
|
Properties summary
public
string
|
$ver
|
'1.6' |
#
1.6 means that module is working in 1.6 mode, otherwise module is working in
1.5 mode
1.6 means that module is working in 1.6 mode, otherwise module is working in
1.5 mode
|
protected
string
|
$_title
|
|
|
protected
string
|
$_info_text
|
|
|
protected
string
|
$_checkstore
|
|
|
protected
string
|
$_store_scope
|
|
|
protected
string
|
$_config_prefix
|
'EABI_DPDCOD_' |
|
protected
array
|
$_config_array
|
array(
'TITLE',
'INFO_TEXT',
'ORDER_STATUS',
'SEND_STATUS',
'CHECKSTORE',
) |
#
Configuration variables for this module
Configuration variables for this module
|
protected
array
|
$form_fields
|
array() |
#
Cached instance of current modules configuration form fields
Cached instance of current modules configuration form fields
|
protected static
Eabi_Postoffice
|
$_helperModuleInstance
|
|
#
Makes sure only one instance is queried
Makes sure only one instance is queried
|
protected
integer
|
$_id_store
|
|
#
Is activated in admin when another store scope is selected
Is activated in admin when another store scope is selected
|
protected
integer
|
$_id_store_group
|
|
#
Is activated in admin when another store scope is selected
Is activated in admin when another store scope is selected
|