NewToAutomatic
Class NewToAutomatic Proxy for using new delivery services with old API for back compatibility.
Desn't support updating, saving etc. via admin pages. Just show details & calculate for public components.
Table of Contents
Constants
- HANDLER = __FILE__
Methods
- __construct() : mixed
- calculate() : array<string|int, mixed>
- compatibility() : array<string|int, mixed>
- Check if this service is compatible.
- convertNewServiceToOld() : array<string|int, mixed>
- Converts new service fields to old.
- Init() : array<string|int, mixed>
Constants
HANDLER
public
mixed
HANDLER
= __FILE__
Methods
__construct()
public
__construct(Base $service) : mixed
Parameters
- $service : Base
calculate()
public
calculate(string $profile, array<string|int, mixed> $arConfig, array<string|int, mixed> $arOrder, int $STEP[, bool|false $TEMP = false ]) : array<string|int, mixed>
Parameters
- $profile : string
-
Useless.
- $arConfig : array<string|int, mixed>
-
Useless.
- $arOrder : array<string|int, mixed>
-
Order details.
- $STEP : int
-
Useless.
- $TEMP : bool|false = false
-
Useless.
Return values
array<string|int, mixed> —Delivery price.
compatibility()
Check if this service is compatible.
public
compatibility(array<string|int, mixed> $arOrder, array<string|int, mixed> $arConfig) : array<string|int, mixed>
Parameters
- $arOrder : array<string|int, mixed>
-
Order details.
- $arConfig : array<string|int, mixed>
-
Useless.
Return values
array<string|int, mixed> —with profile.
convertNewServiceToOld()
Converts new service fields to old.
public
static convertNewServiceToOld(array<string|int, mixed> $service) : array<string|int, mixed>
Parameters
- $service : array<string|int, mixed>
-
Delivery service fields from new table.
Tags
Return values
array<string|int, mixed> —Service fields as it was in old API.
Init()
public
Init() : array<string|int, mixed>