Overview

Namespaces

  • None
  • PHP

Classes

  • Eabi_DpdEE_Block_Adminhtml_Config_Form_Field_Country
  • Eabi_DpdEE_Block_Info_Payment
  • Eabi_DpdEE_Block_Invoice
  • Eabi_DpdEE_Block_Order_Courier
  • Eabi_DpdEE_Helper_Data
  • Eabi_DpdEE_Model_Api
  • Eabi_DpdEE_Model_Button_Courier
  • Eabi_DpdEE_Model_Config
  • Eabi_DpdEE_Model_Flat
  • Eabi_DpdEE_Model_Observer
  • Eabi_DpdEE_Model_Payment_Processor
  • Eabi_DpdEE_Model_Post
  • Eabi_DpdEE_Model_Source_Label_Position
  • Eabi_DpdEE_Model_Source_Service
  • Eabi_Livehandler_Adminhtml_LivehandlerController
  • Eabi_Livehandler_Adminhtml_RemoveController
  • Eabi_Livehandler_Block_Adminhtml_Config_Form_Field_Button
  • Eabi_Livehandler_Block_Adminhtml_Config_Form_Field_Remove
  • Eabi_Livehandler_Block_Email
  • Eabi_LiveHandler_Block_Footer
  • Eabi_Livehandler_Helper_Data
  • Eabi_Livehandler_Helper_Keypair
  • Eabi_Livehandler_IndexController
  • Eabi_Livehandler_Model_Abstract
  • Eabi_Livehandler_Model_Action_Abstract
  • Eabi_Livehandler_Model_Action_Postoffice_Print
  • Eabi_Livehandler_Model_Action_Postoffice_Send
  • Eabi_Livehandler_Model_Adminhtml_Gridmanager
  • Eabi_Livehandler_Model_Directory_Collection
  • Eabi_Livehandler_Model_Entry
  • Eabi_Livehandler_Model_File_Object
  • Eabi_Livehandler_Model_Mysql4_Entry
  • Eabi_Livehandler_Model_Mysql4_Entry_Collection
  • Eabi_Livehandler_Model_Ordergrid
  • Eabi_Livehandler_Model_System_Config_Backend_Button
  • Eabi_Postoffice_Adminhtml_PostofficeController
  • Eabi_Postoffice_Block_Adminhtml_Config_Form_Field_License
  • Eabi_Postoffice_Block_Adminhtml_Config_Form_Field_Remove
  • Eabi_Postoffice_Block_Config_Rebuildbutton
  • Eabi_Postoffice_Helper_Countrycode
  • Eabi_Postoffice_Helper_Data
  • Eabi_Postoffice_IndexController
  • Eabi_Postoffice_Model_Carrier_Abstract
  • Eabi_Postoffice_Model_Carrier_Result
  • Eabi_Postoffice_Model_Carriermodule
  • Eabi_Postoffice_Model_Mysql4_Carriermodule
  • Eabi_Postoffice_Model_Mysql4_Carriermodule_Collection
  • Eabi_Postoffice_Model_Mysql4_Office
  • Eabi_Postoffice_Model_Mysql4_Office_Collection
  • Eabi_Postoffice_Model_Observer
  • Eabi_Postoffice_Model_Office
  • Eabi_Postoffice_Model_Orderview
  • Eabi_Postoffice_Model_Source_Sendevent
  • Eabi_Postoffice_Model_Updater
  • Overview
  • Namespace
  • Class
  • Tree

Class Eabi_DpdEE_Model_Post

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.
  • Display tracking link to user when tracking code is added to the shipment.
  • Call courier to pick up the shipment that was ordered using this carrier.
  • Print out packing slip PDF from Order view.
Mage_Shipping_Model_Carrier_Abstract
Extended by Eabi_Postoffice_Model_Carrier_Abstract
Extended by Eabi_DpdEE_Model_Post

Direct known subclasses

Eabi_DpdEE_Model_Flat
Author: matishalmann
Located at Eabi/DpdEE/Model/Post.php
Methods summary
protected boolean
# _isAvailable( Mage_Shipping_Model_Rate_Request $request )

If disable shipping by product comment is allowed and product's short description in shopping cart contains html comment <!-- no dpd_ee_module --> then it returns false.

If disable shipping by product comment is allowed and product's short description in shopping cart contains html comment <!-- no dpd_ee_module --> then it returns false.

Parameters

$request
Mage_Shipping_Model_Rate_Request
$request

Returns

boolean
true if this method is available.

See

Eabi_Postoffice_Model_Carrier_Abstract::_isAvailable()

Overrides

Eabi_Postoffice_Model_Carrier_Abstract::_isAvailable()
public float
# _calculateAdditionalShippingPrice( Mage_Shipping_Model_Rate_Request $request, float $price )

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

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

Parameters

$request
Mage_Shipping_Model_Rate_Request
$request
$price
float
$price

Returns

float

Overrides

Eabi_Postoffice_Model_Carrier_Abstract::_calculateAdditionalShippingPrice()
protected array
# _decodeShippingMatrix( string $input )

Decodes json encoded string to assoc array (array keys are country ISO codes) and returns in following format:

  • country_id - Country ISO code, also array key for this element
  • base_price - base shipping price up to 10kg
  • kg_price - additional shipping price for each 10kg
  • free_shipping_from - when and if to apply free shipping

Decodes json encoded string to assoc array (array keys are country ISO codes) and returns in following format:

  • country_id - Country ISO code, also array key for this element
  • base_price - base shipping price up to 10kg
  • kg_price - additional shipping price for each 10kg
  • free_shipping_from - when and if to apply free shipping

Parameters

$input
string
$input

Returns

array
protected string
# _getDescription( array $parcelT )

Fetches one line long human readable parcel terminal description from DPD Pudo instance

Fetches one line long human readable parcel terminal description from DPD Pudo instance

Parameters

$parcelT
array
$parcelT

Returns

string
public boolean
# isBarcodeFunctionAvailable( )

If the barcode function is available globally

Returns

boolean

Overrides

Eabi_Postoffice_Model_Carrier_Abstract::isBarcodeFunctionAvailable()
public array
# autoSendData( Mage_Sales_Model_Order $order, type $selectedOfficeId )

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
Mage_Sales_Model_Order
$order
$selectedOfficeId
type
$selectedOfficeId

Returns

array
comma separated parcel numbers in array key of 'barcode'

Overrides

Eabi_Postoffice_Model_Carrier_Abstract::autoSendData()
protected string
# _getRemark( Mage_Sales_Model_Order $order )

Returns empty string

Returns empty string

Parameters

$order
Mage_Sales_Model_Order
$order

Returns

string
public boolean
# isDataSent( Mage_Sales_Model_Order $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
Mage_Sales_Model_Order
$order

Returns

boolean

Overrides

Eabi_Postoffice_Model_Carrier_Abstract::isDataSent()
public boolean|string
# getBarcode( Mage_Sales_Model_Order $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
Mage_Sales_Model_Order
$order

Returns

boolean|string

Overrides

Eabi_Postoffice_Model_Carrier_Abstract::getBarcode()
public string
# getBarcodePdf( Mage_Sales_Model_Order $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
Mage_Sales_Model_Order
$order

Returns

string

Overrides

Eabi_Postoffice_Model_Carrier_Abstract::getBarcodePdf()
public array
# getDataFromOrder( Mage_Sales_Model_Order $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
Mage_Sales_Model_Order
$order

Returns

array
public array
# _setDataToOrder( Mage_Sales_Model_Order $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
Mage_Sales_Model_Order
$order
$data
array
$data

Returns

array
public array|boolean
# getOfficeList( )

Returns array of parcel terminals from DPD server or boolean false if fetching failed.

Returns array of parcel terminals from DPD server or boolean false if fetching failed.

Returns

array|boolean

See

Eabi_Postoffice_Model_Carrier_Abstract::getOfficeList()
public string
# getTerminalTitle( Eabi_Postoffice_Model_Office $office )

Returns parcel terminal name when short names are enabled.

Returns parcel terminal name with address, telephone, opening times when short names are disabled.

Returns parcel terminal name when short names are enabled.

Returns parcel terminal name with address, telephone, opening times when short names are disabled.

Parameters

$office
Eabi_Postoffice_Model_Office
$office

Returns

string

See

Eabi_Postoffice_Model_Carrier_Abstract::getTerminalTitle()

Overrides

Eabi_Postoffice_Model_Carrier_Abstract::getTerminalTitle()
public string
# getAdminTerminalTitle( Eabi_Postoffice_Model_Office $office )

Returns parcel terminal name when short names are enabled.

Returns parcel terminal name with address, telephone, opening times when short names are disabled.

Returns parcel terminal name when short names are enabled.

Returns parcel terminal name with address, telephone, opening times when short names are disabled.

Parameters

$office
Eabi_Postoffice_Model_Office
$office

Returns

string

See

Eabi_Postoffice_Model_Carrier_Abstract::getAdminTerminalTitle()

Overrides

Eabi_Postoffice_Model_Carrier_Abstract::getAdminTerminalTitle()
public integer
# getGroupSort( string $group_name )

Groups parcel terminals by following rules:

  • In Estonia parcel terminals from Tallinn, Tartu, Pärnu are displayed first respectively and remaining parcel terminals are displayed in alphabetical order.
  • In Latvia parcel terminals from Riga, Daugavpils, Liepaja, Jelgava, Jurmala are displayed first respectively and remaining parcel terminals are displayed in alphabetical order.
  • In Lithuania parcel terminals from Vilnius, Kaunas, Klaipeda, Siauliai, Alytus are displayed first respectively and remaining parcel terminals are displayed in alphabetical order.

Groups parcel terminals by following rules:

  • In Estonia parcel terminals from Tallinn, Tartu, Pärnu are displayed first respectively and remaining parcel terminals are displayed in alphabetical order.
  • In Latvia parcel terminals from Riga, Daugavpils, Liepaja, Jelgava, Jurmala are displayed first respectively and remaining parcel terminals are displayed in alphabetical order.
  • In Lithuania parcel terminals from Vilnius, Kaunas, Klaipeda, Siauliai, Alytus are displayed first respectively and remaining parcel terminals are displayed in alphabetical order.

Parameters

$group_name
string
$group_name

Returns

integer

See

Eabi_Postoffice_Model_Carrier_Abstract::getGroupSort()

Overrides

Eabi_Postoffice_Model_Carrier_Abstract::getGroupSort()
public null|boolean
# isPickedUpByCourier( Mage_Sales_Model_Order $order )

Indicates if specified order has been picked up by courier.

Should return the following

  • true - If the order has been picked up by courier
  • false - If the order has not been picked up by courier
  • null - If courier pickup is not applicable to specified order

Indicates if specified order has been picked up by courier.

Should return the following

  • true - If the order has been picked up by courier
  • false - If the order has not been picked up by courier
  • null - If courier pickup is not applicable to specified order

Parameters

$order
Mage_Sales_Model_Order
$order

Returns

null|boolean

Overrides

Eabi_Postoffice_Model_Carrier_Abstract::isPickedUpByCourier()
protected integer
# _getNumberOfPackagesForOrder( Mage_Sales_Model_Order $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
Mage_Sales_Model_Order
$order

Returns

integer

See

Eabi_Postoffice_Helper_Data::getNumberOfPackagesFromItemWeights()
public mixed
# getConfigDataForThis( string $field )

Gets config data only for this instance

Gets config data only for this instance

Parameters

$field
string
$field

Returns

mixed
public mixed
# getConfigData( string $field )

Override this function in order to return senddata_event always manual, when http_request_timeout is greater than 10 seconds

Override this function in order to return senddata_event always manual, when http_request_timeout is greater than 10 seconds

Parameters

$field
string
$field

Returns

mixed
protected string
# _getConfigDataOverride( string $field, string $code )

Override is performed here

Override is performed here

Parameters

$field
string
$field
$code
string
$code

Returns

string

See

Eabi_DpdEE_Model_Post::getConfigData()
protected float|integer
# _applyPriceFromCod( Mage_Shipping_Model_Rate_Request $request )

Takes Cash on delivery fee from handling_fee_country matrix, from field cod_fee and appends it to shipping price when set and is equal or greater than 0

Takes Cash on delivery fee from handling_fee_country matrix, from field cod_fee and appends it to shipping price when set and is equal or greater than 0

Parameters

$request
Mage_Shipping_Model_Rate_Request
$request

Returns

float|integer

Overrides

Eabi_Postoffice_Model_Carrier_Abstract::_applyPriceFromCod()
public boolean|float
# getCodFee( Mage_Customer_Model_Address $address )

Returns cash on delivery fee based on address

Does not check if Cash on delivery is available

Returns false if country is unspecified.

Returns cash on delivery fee based on address

Does not check if Cash on delivery is available

Returns false if country is unspecified.

Parameters

$address
Mage_Customer_Model_Address
$address

Returns

boolean|float
public boolean
# isCodEnabled( Mage_Customer_Model_Address $address )

Returns true if cash on delivery is allowed for specified address

Checks if COD is allowed by configuration variable payment/dpdcodpayment/active and COD fee is determined in shipping price matrix

Returns true if cash on delivery is allowed for specified address

Checks if COD is allowed by configuration variable payment/dpdcodpayment/active and COD fee is determined in shipping price matrix

Parameters

$address
Mage_Customer_Model_Address
$address

Returns

boolean

Overrides

Eabi_Postoffice_Model_Carrier_Abstract::isCodEnabled()
protected Eabi_DpdEE_Helper_Data
# _getDpdHelper( )

Returns

Eabi_DpdEE_Helper_Data
Methods inherited from Eabi_Postoffice_Model_Carrier_Abstract
_compareAddressToRequest(), _getAddressModel(), _getCheckoutSession(), _getDeliveryTime(), _getDialCodeHelper(), _getDisabledComment(), _getEabi(), _getOfficeHelper(), _getOfficeModel(), _getProductModel(), _getQuote(), _getSeconds(), _getStartingDayStamp(), _isMultishipping(), checkAvailableShipCountries(), clearSession(), collectRates(), getAddressId(), getCode(), getGroupTitle(), getGroups(), getOfficesFromAddress(), getPriceFromAddressId(), getTerminal(), getTerminalComment(), getTerminals(), getTrackingInIframe(), getTrackingInfo(), getTrackingUrl(), isAjaxInsertAllowed(), isAutoSendAvailable(), isTrackingAvailable(), setConfigData(), setOfficeToSession()
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 Eabi_DpdEE_Model_Config::SHIPPING_METHOD_CODE_PARCEL_TERMINAL
#
protected string $_tracking_url 'https://tracking.dpd.de/cgi-bin/delistrack?typ=1&lang=en&pknr=%s'
#

%s in the URL is replaced with tracking number.

%s in the URL is replaced with tracking number.

Properties inherited from Eabi_Postoffice_Model_Carrier_Abstract
$_quote, $_track_iframe
DPD Eesti - Pakivedu.ee Shipping module for Magento API documentation generated by ApiGen 2.8.0