diff --git a/Block/Sales/NewShipment.php b/Block/Sales/NewShipment.php index 012abe31..6865d32c 100755 --- a/Block/Sales/NewShipment.php +++ b/Block/Sales/NewShipment.php @@ -165,6 +165,14 @@ public function getPackageType() return $this->defaultOptions->getPackageType(); } + /** + * @return string + */ + public function getCarrier(): string + { + return $this->defaultOptions->getCarrier(); + } + /** * @return string */ diff --git a/view/adminhtml/templates/new_shipment.phtml b/view/adminhtml/templates/new_shipment.phtml index 81cea78b..472e2d5a 100755 --- a/view/adminhtml/templates/new_shipment.phtml +++ b/view/adminhtml/templates/new_shipment.phtml @@ -233,7 +233,7 @@ foreach ($block->getNewShipmentForm()->getCarrierSpecificAbstractConsignments() { ".page-footer": { "myparcelnl_newshipment": { - "carrier": "postnl", + "carrier": "getCarrier() ?>", "packageType":"getPackageType()] ?>"} } }