Skip to content

Commit

Permalink
Updated label for Content Type configuration field.
Browse files Browse the repository at this point in the history
Changed Allowable Methods (Non Doc and Doc) to always be displayed no
matter what the content type mode is.

Changed the isDutiable function to only look at whether a shipment is
domestic or not. Previously it would return dutiable for everything
if the Content Type mode is non document (which causes problems for
domestic shipments in Non Document mode). Fixes #19485
  • Loading branch information
Graham Wharton committed Nov 30, 2018
1 parent 733f2fc commit 77a5cd1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
4 changes: 1 addition & 3 deletions app/code/Magento/Dhl/Model/Carrier.php
Original file line number Diff line number Diff line change
Expand Up @@ -1968,8 +1968,6 @@ protected function isDutiable($origCountryId, $destCountryId)
{
$this->_checkDomesticStatus($origCountryId, $destCountryId);

return
self::DHL_CONTENT_TYPE_NON_DOC == $this->getConfigData('content_type')
|| !$this->_isDomestic;
return !$this->_isDomestic;
}
}
13 changes: 4 additions & 9 deletions app/code/Magento/Dhl/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
<label>Account Number</label>
</field>
<field id="content_type" translate="label" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
<label>Content Type</label>
<label>Content Type (Non Domestic)</label>
<comment>Whether to use Documents or NonDocuments service for non domestic shipments. (Shipments within the EU are classed as domestic)</comment>
<source_model>Magento\Dhl\Model\Source\Contenttype</source_model>
</field>
<field id="handling_type" translate="label" type="select" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
Expand Down Expand Up @@ -81,18 +82,12 @@
</depends>
</field>
<field id="doc_methods" translate="label" type="multiselect" sortOrder="170" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
<label>Allowed Methods</label>
<label>Documents Allowed Methods</label>
<source_model>Magento\Dhl\Model\Source\Method\Doc</source_model>
<depends>
<field id="content_type">D</field>
</depends>
</field>
<field id="nondoc_methods" translate="label" type="multiselect" sortOrder="170" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
<label>Allowed Methods</label>
<label>Non Documents Allowed Methods</label>
<source_model>Magento\Dhl\Model\Source\Method\Nondoc</source_model>
<depends>
<field id="content_type">N</field>
</depends>
</field>
<field id="ready_time" translate="label comment" type="text" sortOrder="180" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
<label>Ready time</label>
Expand Down

0 comments on commit 77a5cd1

Please sign in to comment.