FileAccess Orion

Dhl extends Base
in package

Implement delivery method for carrier DHL

Tags
category

Interface function

author

Tobias Teichner webmaster@teichner.biz

since

File available since v0.95

Table of Contents

$config_file  : string
Path to config file or name
$default_config_file  : string
Path to default config file
$name  : string
Name buffer
$preset_file  : string
Absolute path to preset file
$settings  : stdClass|null
Setup The local setup object
$marks  : array<string|int, mixed>
Default jump marks in kg per amount in €
__construct()  : mixed
Dhl constructor.
CalculatePrice()  : Result
Calculate price
CheckValidCargoMethod()  : Result|void
Calculate if weight is ok for this method
FetchLegacyConfiguration()  : Result
Load a legacy configuration to this instance
GetDefaultSettings()  : Result
Load defaults
GetFormPreset()  : Result
preset load the common CDN settings preset for generation a formular
GetSettings()  : Result
Load the common settings object
GetTrackingLink()  : null|string
Get external tracking link
HeadVersion()  : string
Fetch the git based head version of this methods configuration
Name()  : string
Get the name
StoreSettings()  : Result
store store the common CDN settings object
loadLocalSettings()  : void
load settings object from local storage

Properties

$config_file

Path to config file or name

protected string $config_file = ''

$default_config_file

Path to default config file

protected string $default_config_file = ''

$name

Name buffer

protected string $name = ''

$preset_file

Absolute path to preset file

protected string $preset_file = ''

$settings

Setup The local setup object

protected stdClass|null $settings = null

A setup object

$marks

Default jump marks in kg per amount in €

private array<string|int, mixed> $marks = array(5 => 6.99, 999 => 49.99)

Methods

__construct()

Dhl constructor.

public __construct() : mixed
Return values
mixed

CalculatePrice()

Calculate price

public CalculatePrice(array<string|int, ArticleAssignment$articles) : Result

Calculate the article list price when using this delivery method. Should take the resolved article data into account.

ToDo: The delivery and packaging fee taxes should be equally split among the taxes of the shipped items

Parameters
$articles : array<string|int, ArticleAssignment>

A list of basic contents

Return values
Result

A system result object

CheckValidCargoMethod()

Calculate if weight is ok for this method

public CheckValidCargoMethod(array<string|int, ArticleAssignment$articles[, null $payment_method = null ]) : Result|void
Parameters
$articles : array<string|int, ArticleAssignment>
$payment_method : null = null
Return values
Result|void

FetchLegacyConfiguration()

Load a legacy configuration to this instance

public FetchLegacyConfiguration(string $hash) : Result
Parameters
$hash : string

A git hash with the used delivery method version

Return values
Result

A system result object

GetDefaultSettings()

Load defaults

public GetDefaultSettings() : Result

Load the default settings for this delivery method

Return values
Result

A system result object

GetFormPreset()

preset load the common CDN settings preset for generation a formular

public GetFormPreset() : Result
Return values
Result

A system result object

GetSettings()

Load the common settings object

public GetSettings() : Result
Return values
Result

A system result object

Get external tracking link

public GetTrackingLink(Basket &$basket) : null|string
Parameters
$basket : Basket
Return values
null|string

HeadVersion()

Fetch the git based head version of this methods configuration

public HeadVersion() : string
Return values
string

The head version

Name()

Get the name

public Name() : string
Return values
string

StoreSettings()

store store the common CDN settings object

public StoreSettings(stdClass $values) : Result
Parameters
$values : stdClass

The configuration values

Return values
Result

A system result object

loadLocalSettings()

load settings object from local storage

protected loadLocalSettings() : void
Return values
void

Search results