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
- Eabi_Postoffice_Model_Carrier_Abstract
- Eabi_DpdEE_Model_Post
Direct known subclasses
Eabi_DpdEE_Model_Flat
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. |
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 |
protected
array
|
#
_decodeShippingMatrix( string $input )
Decodes json encoded string to assoc array (array keys are country ISO codes) and returns in following format:
|
protected
string
|
#
_getDescription( array $parcelT )
Fetches one line long human readable parcel terminal description from DPD Pudo instance |
public
boolean
|
|
public
array
|
#
autoSendData( Mage_Sales_Model_Order $order, type $selectedOfficeId )
Sends parcel data to DPD server for specified order and selected parcel terminal id. |
protected
string
|
|
public
boolean
|
#
isDataSent( Mage_Sales_Model_Order $order )
Returns true if parcel data is sent to DPD server for specified order. |
public
boolean|string
|
#
getBarcode( Mage_Sales_Model_Order $order )
Returns packing slip URL if data is sent or false otherwise. |
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. |
public
array
|
#
getDataFromOrder( Mage_Sales_Model_Order $order )
Attempts to decode extra data stored within order commetns and return it as 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. |
public
array|boolean
|
#
getOfficeList( )
Returns array of parcel terminals from DPD server or boolean false if fetching failed. |
public
string
|
#
getTerminalTitle(
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(
Returns parcel terminal name when short names are enabled. Returns parcel terminal name with address, telephone, opening times when short names are disabled. |
public
integer
|
#
getGroupSort( string $group_name )
Groups parcel terminals by following rules:
|
public
null|boolean
|
#
isPickedUpByCourier( Mage_Sales_Model_Order $order )
Indicates if specified order has been picked up by courier. Should return the following
|
protected
integer
|
#
_getNumberOfPackagesForOrder( Mage_Sales_Model_Order $order )
Returns number or parcels for the order according to Maximum Package Weight defined in DPD settings |
public
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 |
protected
string
|
|
protected
float|integer
|
#
_applyPriceFromCod( Mage_Shipping_Model_Rate_Request $request )
Takes Cash on delivery fee from |
public
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
|
protected
|
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 |
|
|
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. |
$_quote,
$_track_iframe
|