Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport] Fix DHL Quotes for Domestic Shipments when Content Type is set to Non-Document #19488

Merged
merged 5 commits into from
Apr 4, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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