diff --git a/app/code/Magento/Dhl/Model/Carrier.php b/app/code/Magento/Dhl/Model/Carrier.php index 45a97e22878278eacc4401b963a21eb72deab095..9a26efee744d592f53916727110e23e6210036ba 100644 --- a/app/code/Magento/Dhl/Model/Carrier.php +++ b/app/code/Magento/Dhl/Model/Carrier.php @@ -606,7 +606,7 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin 'L' => __('Express 10:30'), 'G' => __('Domestic economy select'), 'W' => __('Economy select'), - 'I' => __('Break bulk economy'), + 'I' => __('Domestic express 9:00'), 'N' => __('Domestic express'), 'O' => __('Others'), 'R' => __('Globalmail business'), @@ -616,7 +616,7 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin ]; $nonDocType = [ - '1' => __('Customer services'), + '1' => __('Domestic express 12:00'), '3' => __('Easy shop'), '4' => __('Jetline'), '8' => __('Express easy'), diff --git a/app/code/Magento/Dhl/Test/Unit/Model/CarrierTest.php b/app/code/Magento/Dhl/Test/Unit/Model/CarrierTest.php index 0f0d784813dfc9eba2616f0b313d3439fc1f86fd..8738d3bb8dae21df93f831afec27aa10fc455c36 100644 --- a/app/code/Magento/Dhl/Test/Unit/Model/CarrierTest.php +++ b/app/code/Magento/Dhl/Test/Unit/Model/CarrierTest.php @@ -447,4 +447,67 @@ class CarrierTest extends \PHPUnit\Framework\TestCase ] ]; } + + /** + * @dataProvider dhlProductsDataProvider + * + * @param string $docType + * @param array $products + */ + public function testGetDhlProducts(string $docType, array $products) + { + $this->assertEquals($products, $this->model->getDhlProducts($docType)); + } + + /** + * @return array + */ + public function dhlProductsDataProvider() : array + { + return [ + 'doc' => [ + 'docType' => \Magento\Dhl\Model\Carrier::DHL_CONTENT_TYPE_DOC, + 'products' => [ + '2' => 'Easy shop', + '5' => 'Sprintline', + '6' => 'Secureline', + '7' => 'Express easy', + '9' => 'Europack', + 'B' => 'Break bulk express', + 'C' => 'Medical express', + 'D' => 'Express worldwide', + 'U' => 'Express worldwide', + 'K' => 'Express 9:00', + 'L' => 'Express 10:30', + 'G' => 'Domestic economy select', + 'W' => 'Economy select', + 'I' => 'Domestic express 9:00', + 'N' => 'Domestic express', + 'O' => 'Others', + 'R' => 'Globalmail business', + 'S' => 'Same day', + 'T' => 'Express 12:00', + 'X' => 'Express envelope', + ] + ], + 'non-doc' => [ + 'docType' => \Magento\Dhl\Model\Carrier::DHL_CONTENT_TYPE_NON_DOC, + 'products' => [ + '1' => 'Domestic express 12:00', + '3' => 'Easy shop', + '4' => 'Jetline', + '8' => 'Express easy', + 'P' => 'Express worldwide', + 'Q' => 'Medical express', + 'E' => 'Express 9:00', + 'F' => 'Freight worldwide', + 'H' => 'Economy select', + 'J' => 'Jumbo box', + 'M' => 'Express 10:30', + 'V' => 'Europack', + 'Y' => 'Express 12:00', + ] + ] + ]; + } } diff --git a/app/code/Magento/Dhl/i18n/en_US.csv b/app/code/Magento/Dhl/i18n/en_US.csv index 90ec8b5f17a2256b5c4e627760950d8104b9fa55..a5532c2cea963905bc33517bf432d91b04a13001 100644 --- a/app/code/Magento/Dhl/i18n/en_US.csv +++ b/app/code/Magento/Dhl/i18n/en_US.csv @@ -23,14 +23,12 @@ Europack,Europack "Express 10:30","Express 10:30" "Domestic economy select","Domestic economy select" "Economy select","Economy select" -"Break bulk economy","Break bulk economy" "Domestic express","Domestic express" Others,Others "Globalmail business","Globalmail business" "Same day","Same day" "Express 12:00","Express 12:00" "Express envelope","Express envelope" -"Customer services","Customer services" Jetline,Jetline "Freight worldwide","Freight worldwide" "Jumbo box","Jumbo box" @@ -81,3 +79,5 @@ Size,Size "Show Method if Not Applicable","Show Method if Not Applicable" "Sort Order","Sort Order" Debug,Debug +"Domestic express 9:00","Domestic express 9:00" +"Domestic express 12:00","Domestic express 12:00"