mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2025-01-30 14:21:13 +01:00
Merge pull request #166 from exciler/go
GO: Add setting "defaultContent"
This commit is contained in:
commit
d8ecb497da
@ -61,6 +61,7 @@ class Versandart_go extends Versanddienstleister
|
|||||||
'consignorEmail' => ['typ' => 'text', 'bezeichnung' => 'Absender Email:'],
|
'consignorEmail' => ['typ' => 'text', 'bezeichnung' => 'Absender Email:'],
|
||||||
'defaultPickupFrom' => ['typ' => 'text', 'bezeichnung' => 'Standard Abholzeit von:'],
|
'defaultPickupFrom' => ['typ' => 'text', 'bezeichnung' => 'Standard Abholzeit von:'],
|
||||||
'defaultPickupTill' => ['typ' => 'text', 'bezeichnung' => 'Standard Abholzeit bis:'],
|
'defaultPickupTill' => ['typ' => 'text', 'bezeichnung' => 'Standard Abholzeit bis:'],
|
||||||
|
'defaultContent' => ['typ' => 'text', 'bezeichnung' => 'Standard Inhalt:']
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,6 +74,7 @@ class Versandart_go extends Versanddienstleister
|
|||||||
$order->shipment->orderStatus = $this->settings->orderAsDraft ? OrderStatus::New : OrderStatus::Released;
|
$order->shipment->orderStatus = $this->settings->orderAsDraft ? OrderStatus::New : OrderStatus::Released;
|
||||||
$order->shipment->SetService($json->product);
|
$order->shipment->SetService($json->product);
|
||||||
$order->shipment->customerReference = $json->order_number;
|
$order->shipment->customerReference = $json->order_number;
|
||||||
|
$order->shipment->content = $this->settings->defaultContent ?? '';
|
||||||
$order->shipment->weight = floatval($json->weight);
|
$order->shipment->weight = floatval($json->weight);
|
||||||
$order->shipment->pickup->dateFrom = new DateTime($this->settings->defaultPickupFrom);
|
$order->shipment->pickup->dateFrom = new DateTime($this->settings->defaultPickupFrom);
|
||||||
if ($order->shipment->pickup->dateFrom < new DateTime('now'))
|
if ($order->shipment->pickup->dateFrom < new DateTime('now'))
|
||||||
@ -124,7 +126,7 @@ class Versandart_go extends Versanddienstleister
|
|||||||
if ($result instanceof CreateOrderResponse) {
|
if ($result instanceof CreateOrderResponse) {
|
||||||
$ret->Success = true;
|
$ret->Success = true;
|
||||||
$ret->TrackingNumber = $result->hwbNumber;
|
$ret->TrackingNumber = $result->hwbNumber;
|
||||||
$ret->TrackingUrl = '';
|
$ret->TrackingUrl = 'https://www.general-overnight.com/deu_de/versenden/sendungsverfolgung.html?reference='.$result->hwbNumber;
|
||||||
$ret->Label = base64_decode($result->hwbOrPackageLabel);
|
$ret->Label = base64_decode($result->hwbOrPackageLabel);
|
||||||
} else {
|
} else {
|
||||||
$ret->Errors[] = $result;
|
$ret->Errors[] = $result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user