Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage_Usa_Block_Adminhtml_Dhl_Unitofmeasure
  • Mage_Usa_Helper_Data
  • Mage_Usa_Model_Shipping_Carrier_Abstract
  • Mage_Usa_Model_Shipping_Carrier_Abstract_Source_Mode
  • Mage_Usa_Model_Shipping_Carrier_Abstract_Source_Requesttype
  • Mage_Usa_Model_Shipping_Carrier_Dhl
  • Mage_Usa_Model_Shipping_Carrier_Dhl_International
  • Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Contenttype
  • Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Method_Abstract
  • Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Method_Doc
  • Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Method_Freedoc
  • Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Method_Freenondoc
  • Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Method_Nondoc
  • Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Method_Size
  • Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Method_Unitofmeasure
  • Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf
  • Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page
  • Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_PageBuilder
  • Mage_Usa_Model_Shipping_Carrier_Dhl_Source_Dutypaymenttype
  • Mage_Usa_Model_Shipping_Carrier_Dhl_Source_Freemethod
  • Mage_Usa_Model_Shipping_Carrier_Dhl_Source_Method
  • Mage_Usa_Model_Shipping_Carrier_Dhl_Source_Protection_Rounding
  • Mage_Usa_Model_Shipping_Carrier_Dhl_Source_Protection_Value
  • Mage_Usa_Model_Shipping_Carrier_Dhl_Source_Shipmenttype
  • Mage_Usa_Model_Shipping_Carrier_Fedex
  • Mage_Usa_Model_Shipping_Carrier_Fedex_Source_Dropoff
  • Mage_Usa_Model_Shipping_Carrier_Fedex_Source_Freemethod
  • Mage_Usa_Model_Shipping_Carrier_Fedex_Source_Method
  • Mage_Usa_Model_Shipping_Carrier_Fedex_Source_Packaging
  • Mage_Usa_Model_Shipping_Carrier_Ups
  • Mage_Usa_Model_Shipping_Carrier_Ups_Source_Container
  • Mage_Usa_Model_Shipping_Carrier_Ups_Source_DestType
  • Mage_Usa_Model_Shipping_Carrier_Ups_Source_Freemethod
  • Mage_Usa_Model_Shipping_Carrier_Ups_Source_Method
  • Mage_Usa_Model_Shipping_Carrier_Ups_Source_OriginShipment
  • Mage_Usa_Model_Shipping_Carrier_Ups_Source_Pickup
  • Mage_Usa_Model_Shipping_Carrier_Ups_Source_Type
  • Mage_Usa_Model_Shipping_Carrier_Ups_Source_Unitofmeasure
  • Mage_Usa_Model_Shipping_Carrier_Usps
  • Mage_Usa_Model_Shipping_Carrier_Usps_Source_Container
  • Mage_Usa_Model_Shipping_Carrier_Usps_Source_Freemethod
  • Mage_Usa_Model_Shipping_Carrier_Usps_Source_Machinable
  • Mage_Usa_Model_Shipping_Carrier_Usps_Source_Method
  • Mage_Usa_Model_Shipping_Carrier_Usps_Source_Size
  • Overview
  • Package
  • Class
  • Tree

Class Mage_Usa_Model_Shipping_Carrier_Dhl_International

DHL International (API v1.4)

Varien_Object
Extended by Mage_Shipping_Model_Carrier_Abstract
Extended by Mage_Usa_Model_Shipping_Carrier_Abstract
Extended by Mage_Usa_Model_Shipping_Carrier_Dhl_International implements Mage_Shipping_Model_Carrier_Interface
Package: Mage\Usa
Category: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International.php
Methods summary
protected
# _construct( )

Dhl International Class constructor

Dhl International Class constructor

Sets necessary data

protected mixed
# _getDefaultValue( mixed $origValue, string $pathToValue )

Returns value of given variable

Returns value of given variable

Parameters

$origValue
mixed
$origValue
$pathToValue
string
$pathToValue

Returns

mixed
public boolean|Mage_Shipping_Model_Rate_Result|null
# collectRates( Mage_Shipping_Model_Rate_Request $request )

Collect and get rates

Collect and get rates

Parameters

$request
Mage_Shipping_Model_Rate_Request
$request

Returns

boolean|Mage_Shipping_Model_Rate_Result|null
protected
# _setFreeMethodRequest( string $freeMethod )

Set Free Method Request

Set Free Method Request

Parameters

$freeMethod
string
$freeMethod
public Mage_Shipping_Model_Rate_Result|null
# getResult( )

Returns request result

Returns request result

Returns

Mage_Shipping_Model_Rate_Result|null
protected
# _addParams( mixed $requestObject )
public Mage_Usa_Model_Shipping_Carrier_Dhl
# setRequest( Varien_Object $request )

Prepare and set request in property of current instance

Prepare and set request in property of current instance

Parameters

$request
Varien_Object
$request

Returns

Mage_Usa_Model_Shipping_Carrier_Dhl
public array
# getAllowedMethods( )

Get allowed shipping methods

Get allowed shipping methods

Returns

array

Implementation of

Mage_Shipping_Model_Carrier_Interface::getAllowedMethods()
public array|boolean
# getCode( strin $type, string $code = '' )

Get configuration data of carrier

Get configuration data of carrier

Parameters

$type
strin
$type
$code
string
$code

Returns

array|boolean
public array
# getDhlProducts( string $doc )

Returns DHL shipment methods (depending on package content type, if necessary)

Returns DHL shipment methods (depending on package content type, if necessary)

Parameters

$doc
string
$doc Package content type (doc/non-doc) see DHL_CONTENT_TYPE_* constants

Returns

array
public boolean
# getDhlProductTitle( string $code )

Returns title of DHL shipping method by its code

Returns title of DHL shipping method by its code

Parameters

$code
string
$code One-symbol code (see getDhlProducts())

Returns

boolean
protected float
# _getWeight( float $weight, boolean $maxWeight = false, string|boolean $configWeightUnit = false )

Convert item weight to needed weight based on config weight unit dimensions

Convert item weight to needed weight based on config weight unit dimensions

Parameters

$weight
float
$weight
$maxWeight
boolean
$maxWeight
$configWeightUnit
string|boolean
$configWeightUnit

Returns

float
protected array
# _getAllItems( )

Prepare items to pieces

Prepare items to pieces

Returns

array
protected
# _makePieces( SimpleXMLElement $nodeBkgDetails )

Make pieces

Make pieces

Parameters

$nodeBkgDetails
SimpleXMLElement
$nodeBkgDetails
protected float
# _getDimension( float $dimension, string|boolean $configWeightUnit = false )

Convert item dimension to needed dimension based on config dimension unit of measure

Convert item dimension to needed dimension based on config dimension unit of measure

Parameters

$dimension
float
$dimension
$configWeightUnit
string|boolean
$configWeightUnit

Returns

float
protected
# _addDimension( SimpleXMLElement $nodePiece )

Add dimension to piece

Add dimension to piece

Parameters

$nodePiece
SimpleXMLElement
$nodePiece
protected Mage_Core_Model_Abstract|Mage_Shipping_Model_Rate_Result
# _getQuotes( )

Get shipping quotes

Get shipping quotes

Returns

Mage_Core_Model_Abstract|Mage_Shipping_Model_Rate_Result
protected Mage_Shipping_Model_Rate_Result
# _parseResponse( string $response )

Parse response from DHL web service

Parse response from DHL web service

Parameters

$response
string
$response

Returns

Mage_Shipping_Model_Rate_Result
protected Mage_Usa_Model_Shipping_Carrier_Dhl_International
# _addRate( SimpleXMLElement $shipmentDetails )

Add rate to DHL rates array

Add rate to DHL rates array

Parameters

$shipmentDetails
SimpleXMLElement
$shipmentDetails

Returns

Mage_Usa_Model_Shipping_Carrier_Dhl_International
protected string
# _getDimensionUnit( )

Returns dimension unit (cm or inch)

Returns dimension unit (cm or inch)

Returns

string
protected string
# _getWeightUnit( )

Returns weight unit (kg or pound)

Returns weight unit (kg or pound)

Returns

string
protected Varien_Object
# getCountryParams( string $countryCode )

Get Country Params by Country Code

Get Country Params by Country Code

Parameters

$countryCode
string
$countryCode

Returns

Varien_Object

See

$countryCode ISO 3166 Codes (Countries) A2
protected Varien_Object
# _doShipmentRequest( Varien_Object $request )

Do shipment request to carrier web service, obtain Print Shipping Labels and process errors in response

Do shipment request to carrier web service, obtain Print Shipping Labels and process errors in response

Parameters

$request
Varien_Object
$request

Returns

Varien_Object
public Mage_Shipping_Model_Carrier_Abstract|Mage_Shipping_Model_Rate_Result_Error|boolean
# proccessAdditionalValidation( Mage_Shipping_Model_Rate_Request $request )

Processing additional validation to check is carrier applicable.

Processing additional validation to check is carrier applicable.

Parameters

$request
Mage_Shipping_Model_Rate_Request
$request

Returns

Mage_Shipping_Model_Carrier_Abstract|Mage_Shipping_Model_Rate_Result_Error|boolean

Overrides

Mage_Usa_Model_Shipping_Carrier_Abstract::proccessAdditionalValidation()
protected boolean|Mage_Shipping_Model_Rate_Result_Error
# _showError( )

Show default error

Show default error

Returns

boolean|Mage_Shipping_Model_Rate_Result_Error
public array
# getContainerTypes( Varien_Object $params = null )

Return container types of carrier

Return container types of carrier

Parameters

$params
Varien_Object|null
$params

Returns

array

Overrides

Mage_Shipping_Model_Carrier_Abstract::getContainerTypes()
protected null
# _mapRequestToShipment( Varien_Object $request )

Map request to shipment

Map request to shipment

Parameters

$request
Varien_Object
$request

Returns

null
protected integer
# _getMinDimension( string $dimensionUnit )

Retrieve minimum allowed value for dimensions in given dimension unit

Retrieve minimum allowed value for dimensions in given dimension unit

Parameters

$dimensionUnit
string
$dimensionUnit

Returns

integer
protected Mage_Shipping_Model_Rate_Result|Varien_Object
# _doRequest( )

Do rate request and handle errors

Do rate request and handle errors

Returns

Mage_Shipping_Model_Rate_Result|Varien_Object
protected
# _shipmentDetails( SimpleXMLElement $xml, Mage_Shipping_Model_Rate_Request $rawRequest, string $originRegion = '' )

Generation Shipment Details Node according to origin region

Generation Shipment Details Node according to origin region

Parameters

$xml
SimpleXMLElement
$xml
$rawRequest
Mage_Shipping_Model_Rate_Request
$rawRequest
$originRegion
string
$originRegion
public mixed
# getTracking( mixed $trackings )

Get tracking

Get tracking

Parameters

$trackings
mixed
$trackings

Returns

mixed
protected
# _getXMLTracking( array $trackings )

Send request for tracking

Send request for tracking

Parameters

$trackings
array
$trackings
protected
# _parseXmlTrackingResponse( array $trackings, string $response )

Parse xml tracking response

Parse xml tracking response

Parameters

$trackings
array
$trackings
$response
string
$response
protected float
# _getPerpackagePrice( float $cost, string $handlingType, float $handlingFee )

Get final price for shipping method with handling fee per package

Get final price for shipping method with handling fee per package

Parameters

$cost
float
$cost
$handlingType
string
$handlingType
$handlingFee
float
$handlingFee

Returns

float

Overrides

Mage_Shipping_Model_Carrier_Abstract::_getPerpackagePrice()
public Varien_Object
# requestToShipment( Mage_Shipping_Model_Shipment_Request $request )

Do request to shipment

Do request to shipment

Parameters

$request
Mage_Shipping_Model_Shipment_Request
$request

Returns

Varien_Object

Overrides

Mage_Usa_Model_Shipping_Carrier_Abstract::requestToShipment()
protected boolean
# _checkDomesticStatus( string $origCountryCode, string $destCountryCode )

Check if shipping is domestic

Check if shipping is domestic

Parameters

$origCountryCode
string
$origCountryCode
$destCountryCode
string
$destCountryCode

Returns

boolean
Methods inherited from Mage_Usa_Model_Shipping_Carrier_Abstract
_getCachedQuotes(), _getQuotesCacheKey(), _isUSCountry(), _prepareServiceName(), _prepareShipmentRequest(), _setCachedQuotes(), getAllItems(), getCarrierCode(), getTrackingInfo(), isCityRequired(), isGirthAllowed(), isShippingLabelsAvailable(), isTrackingAvailable(), isZipCodeRequired(), returnOfShipment(), rollBack(), setActiveFlag()
Methods inherited from Mage_Shipping_Model_Carrier_Abstract
_debug(), _getAllowedContainers(), _getPerorderPrice(), _updateFreeMethodQuote(), checkAvailableShipCountries(), convertWeightToLbs(), debugData(), getConfigData(), getConfigFlag(), getContentTypes(), getCustomizableContainerTypes(), getDebugFlag(), getDeliveryConfirmationTypes(), getFinalPriceWithHandlingFee(), getMethodPrice(), getSortOrder(), getTotalNumOfBoxes(), isActive(), isFixed(), isStateProvinceRequired()
Constants summary
string DHL_CONTENT_TYPE_DOC 'D'
#

Carrier Product indicator

Carrier Product indicator

string DHL_CONTENT_TYPE_NON_DOC 'N'
#
integer DIMENSION_MIN_CM 3
#

Minimum allowed values for shipping package dimensions

Minimum allowed values for shipping package dimensions

integer DIMENSION_MIN_IN 1
#
string CODE 'dhlint'
#

Code of the carrier

Code of the carrier

Constants inherited from Mage_Usa_Model_Shipping_Carrier_Abstract
GUAM_COUNTRY_ID, GUAM_REGION_CODE, PUERTORICO_COUNTRY_ID
Constants inherited from Mage_Shipping_Model_Carrier_Abstract
CANADA_COUNTRY_ID, HANDLING_ACTION_PERORDER, HANDLING_ACTION_PERPACKAGE, HANDLING_TYPE_FIXED, HANDLING_TYPE_PERCENT, MEXICO_COUNTRY_ID, USA_COUNTRY_ID
Properties summary
protected array $_customizableContainerTypes array(self::DHL_CONTENT_TYPE_NON_DOC)
#

Container types that could be customized

Container types that could be customized

protected Mage_Shipping_Model_Rate_Request|null $_request null
#

Rate request data

Rate request data

protected Varien_Object|null $_rawRequest null
#

Raw rate request data

Raw rate request data

protected Mage_Shipping_Model_Rate_Result|null $_result null
#

Rate result data

Rate result data

protected SimpleXMLElement|null $_countryParams null
#

Countries parameters data

Countries parameters data

protected array $_errors array()
#

Errors placeholder

Errors placeholder

protected array $_rates array()
#

Dhl rates result

Dhl rates result

protected string $_code Mage_Usa_Model_Shipping_Carrier_Dhl_International::CODE
#

Carrier's code

Carrier's code

protected string $_freeMethod 'free_method_nondoc'
#

Free Method config path

Free Method config path

protected integer $_maxWeight 70
#

Max weight without fee

Max weight without fee

protected boolean $_isShippingLabelFlag false
#

Flag if response is for shipping label creating

Flag if response is for shipping label creating

protected array $_requestVariables array( 'id' => array('code' => 'dhl_id', 'setCode' => 'id'), 'password' => array('code' => 'dhl_password', 'setCode' => 'password'), 'account' => array('code' => 'dhl_account', 'setCode' => 'account_nbr'), 'shipping_key' => array('code' => 'dhl_shipping_key', 'setCode' => 'shipping_key'), 'shipping_intlkey' => array('code' => 'dhl_shipping_intl_key', 'setCode' => 'shipping_intl_key'), 'shipment_type' => array('code' => 'dhl_shipment_type', 'setCode' => 'shipment_type'), 'dutiable' => array('code' => 'dhl_dutiable', 'setCode' => 'dutiable'), 'dutypaymenttype' => array('code' => 'dhl_duty_payment_type', 'setCode' => 'duty_payment_type'), 'contentdesc' => array('code' => 'dhl_content_desc', 'setCode' => 'content_desc') )
#

Request variables array

Request variables array

protected boolean $_isDomestic false
#

Flag that shows if shipping is domestic

Flag that shows if shipping is domestic

Properties inherited from Mage_Usa_Model_Shipping_Carrier_Abstract
$_activeFlag, $_quotesCache
Properties inherited from Mage_Shipping_Model_Carrier_Abstract
$_debugReplacePrivateDataKeys, $_isFixed, $_numBoxes
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0