Here, We will discuss the DHL shipping method in Magento 2 and their configuration. So, let us start with the following steps :
Step 1: Enable DHL in Magento 2
1. First of all, navigate to Stores > Configuration > Sales > Shipping Methods > DHL.
2. Once the above window opens, you have to fill up and select the necessary options in the given fields.
- Select Yes for Enabled for Checkout field to apply DHL on the store.
- In the Title field, mention a name that will appear on checkout for the DHL shipping method.
- You can keep the default Gateway URL as it is, to calculate the shipping rate. If you have another URL as an alternative, you can use that in place of this default one.
- In Access ID, Password and Account Number fields, you need to fill up the credentials provided by the DHL carrier services.
Step 2: Mention package description and handling fees
- The packaging description starts with defining the type of contents, which you would like to ship with DHL. In the field of Content-Type, you can select anyone from the two options: Documents or Non- documents.
- With the following fields, you can set the handling fees of the shipment:
- Calculate Handling Fee: For handling fee calculation, you can select either a Fixed or Percent Method.
- Handling Applied: In this field, you have to select how you want to apply the handling fee i.e. on per order or package.
- Handling Fee: After selecting the handling method as fixed or percent, you require to mention the fee amount in this field.
- Divide Order Weight: If the weight of your total order is more than 70kgs, then you can use this field to calculate the shipping cost by dividing the order weight. Select Yes to enable the splitting of order weight before calculating the fee.
- Weight Unit: As per your convenience, you can select the unit of weight as Kgs or
- Size: You can set the size of the package by selecting “regular” or “Specific” options in this field. When you are selecting Specific option, you have to mention the Height, Width, and Depth of the package in
Step 3: Fix the allowed shipping methods
- You can choose the shipping method which can be allowed on your store with Allowed Methods Press Control and select multiple allowed methods for your store.
- In the Ready time field, you need to enter the number of hours it may take to ship the product after packaging.
- When a customer selects a shipping method that is not applicable, an error message will be displayed to inform them about the same. You can edit that displayed error message
- In the Free Method, you can select the shipping method which you wish to use while offering free shipping.
- With the Free shipping amount threshold field, you can enable or disable the free shipping option with a minimum order amount.
- In the next field, you can enter the minimum order amount for the products to qualify for free shipping.
Step 4: Determine the Allowed countries for shipping
- In Ship to Applicable Countries field, select from All Allowed countries or Specific Countries. This field assures which countries are covered under the DHL shipping method.
- With Show Method, if Not Applicable, you can set whether to show the shipping methods when are applicable or not. Here, selecting Yes will display DHL method with error message added in Displayed Error Message field even it is not applicable on that particular order and No will not display DHL if it is not applicable on the order.
- If you wish to create a log file for the DHL carrier details, then set the Debug field to
- With Sort Order, you can specify the order of the DHL shipping method on the Checkout page.
With this Step, we come to the end of the Configuration process for DHL in the Magento 2.
If you are facing any issue in any step while configuring the DHL shipping method, please mention them in the comment section below.