Skip to content

Commit b494f63

Browse files
ENGCOM-8077: #25192 fixed #25244
- Merge Pull Request #25244 from vishalverma279/magento2:25192fixed - Merged commits: 1. 4ac223b 2. a220df1 3. ab97e97 4. cef3fe7
2 parents e1c5c1d + cef3fe7 commit b494f63

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

app/code/Magento/Dhl/Model/Carrier.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,7 @@ public function getDhlProducts($doc)
676676
'H' => __('Economy select'),
677677
'J' => __('Jumbo box'),
678678
'M' => __('Express 10:30'),
679+
'N' => __('Domestic express'),
679680
'V' => __('Europack'),
680681
'Y' => __('Express 12:00'),
681682
];
@@ -1767,9 +1768,8 @@ protected function _shipmentDetails($xml, $rawRequest, $originRegion = '')
17671768
*/
17681769
$nodeShipmentDetails->addChild('DoorTo', 'DD');
17691770
$nodeShipmentDetails->addChild('DimensionUnit', substr($this->_getDimensionUnit(), 0, 1));
1770-
if ($package['params']['container'] == self::DHL_CONTENT_TYPE_NON_DOC) {
1771-
$packageType = 'CP';
1772-
}
1771+
$contentType = isset($package['params']['container']) ? $package['params']['container'] : '';
1772+
$packageType = $contentType === self::DHL_CONTENT_TYPE_NON_DOC ? 'CP' : '';
17731773
$nodeShipmentDetails->addChild('PackageType', $packageType);
17741774
if ($this->isDutiable($rawRequest->getOrigCountryId(), $rawRequest->getDestCountryId())) {
17751775
$nodeShipmentDetails->addChild('IsDutiable', 'Y');

app/code/Magento/Dhl/Test/Unit/Model/CarrierTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ public function dhlProductsDataProvider(): array
333333
'H' => 'Economy select',
334334
'J' => 'Jumbo box',
335335
'M' => 'Express 10:30',
336+
'N' => 'Domestic express',
336337
'V' => 'Europack',
337338
'Y' => 'Express 12:00',
338339
],

app/code/Magento/Dhl/etc/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<active>0</active>
2222
<title>DHL</title>
2323
<sallowspecific>0</sallowspecific>
24-
<nondoc_methods>1,3,4,8,P,Q,E,F,H,J,M,V,Y</nondoc_methods>
24+
<nondoc_methods>1,3,4,8,P,Q,E,F,H,J,M,N,V,Y</nondoc_methods>
2525
<doc_methods>2,5,6,7,9,B,C,D,U,K,L,G,W,I,N,O,R,S,T,X</doc_methods>
2626
<free_method>G</free_method>
2727
<gateway_url>https://xmlpi-ea.dhl.com/XMLShippingServlet</gateway_url>

0 commit comments

Comments
 (0)