From 0fbd8eef099f7f21b03d8bafe0c99a78680d801b Mon Sep 17 00:00:00 2001
From: Florian Riecker- de Vries <93703843+FlorianSDV@users.noreply.github.com>
Date: Wed, 29 May 2024 15:44:23 +0200
Subject: [PATCH] feat: add mailbox to dpd (#843)
* feature: added mailbox settings to dpd
* feat: added date settings to general
* style: fix formatting
* feat(checkout): show delivery date by default
* feat(checkout): added dpd mailbox to options
---
Model/Rate/Result.php | 2 +
etc/adminhtml/system.xml | 28 +++++++++++
etc/config.xml | 50 ++++++++++++-------
i18n/en_US.csv | 1 +
i18n/fr_FR.csv | 1 +
i18n/nl_NL.csv | 1 +
view/frontend/web/js/view/delivery-options.js | 1 +
7 files changed, 65 insertions(+), 19 deletions(-)
diff --git a/Model/Rate/Result.php b/Model/Rate/Result.php
index 08e9f1cd..12562455 100755
--- a/Model/Rate/Result.php
+++ b/Model/Rate/Result.php
@@ -25,6 +25,7 @@
use MyParcelNL\Magento\Helper\Data;
use MyParcelNL\Magento\Model\Sales\Repository\PackageRepository;
use MyParcelNL\Sdk\src\Model\Carrier\CarrierDHLForYou;
+use MyParcelNL\Sdk\src\Model\Carrier\CarrierDPD;
use MyParcelNL\Sdk\src\Model\Carrier\CarrierPostNL;
use MyParcelNL\Sdk\src\Model\Consignment\AbstractConsignment;
@@ -37,6 +38,7 @@ class Result extends \Magento\Shipping\Model\Rate\Result
private const CARRIERS_WITH_MAILBOX = [
CarrierPostNL::NAME,
CarrierDHLForYou::NAME,
+ CarrierDPD::NAME,
];
public const CARRIERS_WITH_DIGITAL_STAMP = [
CarrierPostNL::NAME,
diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml
index 2f39a557..fc371260 100755
--- a/etc/adminhtml/system.xml
+++ b/etc/adminhtml/system.xml
@@ -1307,6 +1307,34 @@
+
+
+
+
+ Select automatically mailbox packages based on weight or volume
+ Magento\Config\Model\Config\Source\Yesno
+
+
+
+ To use this optimally, set a weight or 'Fit in mailbox' volume of each product. Regardless,
+ shipments heavier than the weight specified here will not be mailbox.
+
+
+ 1
+
+
+
+
+ Enter a basic price for a mailbox. The regular price will not affect this price.
+
+ 1
+
+
+
diff --git a/etc/config.xml b/etc/config.xml
index 0de7be64..d959ae4a 100755
--- a/etc/config.xml
+++ b/etc/config.xml
@@ -16,6 +16,11 @@
+
+ 1
+ 7
+ 0
+
A4
%order_nr%
@@ -233,25 +238,32 @@
-
-
-
-
- 3
- 15,30,00
- 1,2,3,4,5
- 0
- 14,30,00
- 0
-
-
- 1
-
-
- 1
- 0
-
-
+
+
+
+
+ 3
+ 15,30,00
+ 1,2,3,4,5
+ 0
+ 14,30,00
+ 0
+
+
+ 1
+
+
+ 1
+ 0
+
+
+ 0
+ 1
+ 2000
+ 3.50
+ 1
+
+