Skip to content

Commit 3abc89d

Browse files
v1.0.45
1 parent 0c12397 commit 3abc89d

7 files changed

Lines changed: 6 additions & 41 deletions

File tree

Block/Adminhtml/Order/Shipment/Create.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,6 @@ public function getServiceOptions()
202202
'label' => $this->presetService->getTranslation('ADD_RETURN_LABEL'),
203203
'description' => __('Print an extra label for return shipments')
204204
],
205-
'EA' => [
206-
'label' => $this->presetService->getTranslation('EA'),
207-
'description' => __('This option allows you to claim the value of your shipment in case of damage or loss (up to € 500.00).')
208-
],
209205
'HANDT' => [
210206
'label' => $this->presetService->getTranslation('HANDT'),
211207
'description' => __('We ask for a signature on delivery.')

Model/Service/Preset.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,6 @@ public function getDefaultOptions($order, $requiredOnly = false)
8282
$options['HANDT'] = '';
8383
}
8484

85-
if ($this->helper->getConfigData('label/default_extra_assured', $order->getStoreId()) == ServiceOptionDefault::OPTION_SKIP_NOT_AVAILABLE
86-
|| $this->helper->getConfigData('label/default_extra_assured', $order->getStoreId()) == ServiceOptionDefault::OPTION_IF_AVAILABLE
87-
&& !$requiredOnly) {
88-
$minimumOrderAmount = str_replace(',', '.', $this->helper->getConfigData('label/default_extra_assured_min') ?? '0');
89-
if (!is_numeric($minimumOrderAmount) || $order->getSubtotal() >= floatval($minimumOrderAmount)) {
90-
$options['EA'] = '';
91-
}
92-
}
93-
9485
if ($this->helper->getConfigData('label/default_shipment_insurance', $order->getStoreId()) != ShipmentInsurance::OPTION_NONE) {
9586
$insuranceValue = $this->helper->getConfigData('label/default_shipment_insurance', $order->getStoreId());
9687
if ($insuranceValue === ShipmentInsurance::OPTION_CUSTOM) {
@@ -213,12 +204,6 @@ public function filterSkippableDefaults($presetOptions, $storeId)
213204
}
214205
}
215206

216-
if (array_key_exists('EA', $presetOptions)) {
217-
if ($this->helper->getConfigData('label/default_extra_assured', $storeId) == ServiceOptionDefault::OPTION_IF_AVAILABLE) {
218-
$options[] = 'EA';
219-
}
220-
}
221-
222207
if (array_key_exists('ADD_RETURN_LABEL', $presetOptions)) {
223208
if ($this->helper->getConfigData('label/default_return_label', $storeId) == ServiceOptionDefault::OPTION_IF_AVAILABLE) {
224209
$options[] = 'ADD_RETURN_LABEL';

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "dhlparcel/magento2-plugin",
33
"description": "DHL Parcel plugin for Magento 2",
44
"type": "magento2-module",
5-
"version": "1.0.44",
5+
"version": "1.0.45",
66
"license": [
77
"OSL-3.0"
88
],

etc/adminhtml/system.xml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -100,23 +100,6 @@
100100
</comment>
101101
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
102102
</field>
103-
<field id="default_extra_assured" translate="label" type="select" sortOrder="300" showInDefault="1"
104-
showInWebsite="1" showInStore="1">
105-
<label>Auto-enable: Extra assured</label>
106-
<source_model>DHLParcel\Shipping\Model\Config\Source\ServiceOptionDefault</source_model>
107-
<comment>Option for consumer shipments: claim the value of your shipment in case of damage or
108-
loss (up to € 500.00).
109-
</comment>
110-
</field>
111-
<field id="default_extra_assured_min" translate="label" type="text" sortOrder="310"
112-
showInDefault="1" showInWebsite="1" showInStore="1">
113-
<label>Minimum order amount before enabling extra assured</label>
114-
<depends>
115-
<field id="default_extra_assured" separator="|">if_available|skip_not_available</field>
116-
</depends>
117-
<validate>validate-number</validate>
118-
<comment>Important: The maximum insured amount is € 500,-</comment>
119-
</field>
120103
<field id="default_shipment_insurance" translate="label" type="select" sortOrder="311" showInDefault="1"
121104
showInWebsite="1" showInStore="1">
122105
<label>Auto-enable: Shipment insurance</label>

etc/config.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
<label>
2929
<create_label_by_default>1</create_label_by_default>
3030
<default_to_business>0</default_to_business>
31-
<default_extra_assured>0</default_extra_assured>
32-
<default_extra_assured_min>0</default_extra_assured_min>
3331
<default_reference_enabled>1</default_reference_enabled>
3432
<default_reference_source>order_number</default_reference_source>
3533
<default_reference2_enabled>0</default_reference2_enabled>

etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2020
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
21-
<module name="DHLParcel_Shipping" setup_version="1.0.44">
21+
<module name="DHLParcel_Shipping" setup_version="1.0.45">
2222
<sequence>
2323
<module name="Magento_Shipping"/>
2424
<module name="Magento_Checkout"/>

view/frontend/web/js/view/servicepoint-loader.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ define([
6464
limit: limit,
6565
header: true,
6666
resizable: true,
67-
onSelect: window.dhlparcel_shipping_select_servicepoint
67+
onSelect: window.dhlparcel_shipping_select_servicepoint,
68+
filter: {
69+
serviceType: 'pick-up'
70+
}
6871
};
6972

7073
if (apiKey.length > 0) {

0 commit comments

Comments
 (0)