Back to Top

Magento 2 Multi Vendor Distance Based Shipping

Updated 21 March 2024

Magento 2 Multi Vendor Distance Based Shipping extension allows the sellers and the store admin to create custom shipping methods and charge freight rates based on the distance units. Using Google Maps, the distance is measured and the shipping cost is calculated unit-wise.

This module also facilitates the Admin to set distance calculations based on “Google Map Distance Matrix” or “Latitude Longitude”.

Note: This module is an add-on to Webkul’s Marketplace Module. To use this module you must have to install Webkul’s Magento 2 Multi Vendor Module first.

Watch the below video tutorial to understand the extension workflow:

IBVAZOjvVSA

Features

  • Admin can Enable/Disable the Shipping Method
  • Admin can provide Distance Rate Shipping method for their Products
  • The seller can set Maximum Area to Cover
  • Admin can set Shipping Origin Address based on which the calculation will be done
  • Admin can set Shipping Rate per Unit Distance
  • The seller can set their Shipping Origin Address based on which the calculation will be done
  • Admin can add Handling Charge, Minimum Charge
  • Admin can set Maximum Area to Cover
  • The seller can provide Distance Rate Shipping method for their Products
  • Admin can add whether to apply shipping item wise
  • Admin can set Custom Error Message to display if shipping not applicable
  • The seller can add Handling Charge, Minimum Charge.
  • Admin can enable to Display Estimate Shipping Rate on Product pages
  • Admin can set distance calculation based on “Google Map Distance Matrix” or “Latitude Longitude”
  • The seller can set Shipping Rate per Unit Distance
  • The seller can add whether to apply shipping item wise
  • The Distance Unit can be in Kilometer or Mile which can be set by Seller or Admin
  • Both admin and seller can upload the CSV in order to add the shipping rule.

Installation

#Download Module

Firstly, you need to log in to Webkul Store, go to My Account>My Purchased Products section, verify and then download and extract the contents of this zip folder on the system.

Searching for an experienced
Magento 2 Company ?
Find out More

#Upload Folder

Once the module zip extracts, follow path src>app and then copy the app folder into the Magento 2 root directory on the server as shown below:

Magento 2 opencart connector installation

#3 Run Commands

You need to run the following commands:

  • php bin/magento setup:upgrade
  • php bin/magento setup:di:compile
  • php bin/magento setup:static-content:deploy
  • php bin/magento indexer:reindex
  • php bin/magento cache:flush

Translation

For translating the module language, navigate through src/app/code/Webkul/MpDistanceRateShipping/i18n and edit the en_US.csv file. Thereafter, rename the CSV as “en_SA.csv” and translate all right side content after the comma in the Arabic language. After editing the CSV, save it.

Magento 2 opencart connector language translation

Now, upload it to the path src/app/code/Webkul/MpDistanceRateShipping/i18n where the installation of Magento 2 is on the server. The module translates into the Arabic Language. It supports both RTL and LTR languages.

The user can edit the CSV like the image below.

i18file_translation

How to Get Google Maps API

  • Google Location API services are used in our module. To have these services you must have the Google Map API Key to make use of this extension.
  • You need to enable billing for your Google account project under which the API Key is created.

Admin Configurations

After the successful installation, the admin will navigate through Marketplace Management > Marketplace Distance Rate Shipping to configure the initial module settings.

webkul-Multi-Vendor-Distance-Based-Shipping-for-Magento-2-Admin-Configurations
  • Enable: The Admin can select Yes to enable the module.
  • Google Map API Key: Enter the above generated Google Maps API Key here.
  • The Admin Location: Here, the Admin can enter the location of the store.
  • Admin Latitude: The latitude of the admin’s location will be automatically entered once the location is entered.
  • Admin Longitude: Also, the longitude will be automatically set according to the entered location.
  • Show Estimate on Product Page: If set Yes then this will show the estimate shipping charges on the product page.
  • Calculate Distance Based On: The Admin can calculate shipping distance by either selecting “Google Map Distance” or “Latitude and Longitude”

Distance Rate Shipping Configurations

There are a few of the other configurations as well. The admin can configure further configurations by navigating through Stores-> Configuration-> Sales-> Shipping Methods-> Distance Rate Shipping.

WebkulMulti-Vendor-Distance-Based-Shipping-for-Magento-2
Webkul-Multi-Vendor-Distance-Based-Shipping-for-Magento-2
  • Enabled for Checkout: If set yes then the Distance Rate Shipping will be visible at checkout.
  • Title: Enter the Title of the shipping method that will display to the customers on the website front-end.
  • Method Name: Also, the method name enter will display to the customers on the website front-end.
  • Rate Per Unit: Enter the shipping charges apply on the basis of per unit, set. For example, if the rate per unit is set 50 and the unit set is kilometres and if any customer orders a product within a 1kilometer range then shipping charges will be 50.
  • Maximum Area Cover: Here, enter the maximum area to cover for a distance rate shipping.
  • Item Wise Rate: If set Yes then the shipping charges will be calculate based on per product. The shipping amount will be multiply by the number of products order.
  • Handling Charges: Enter the handling charges.
  • Minimum Charge: Set the minimum charge. If shipping charges calculate is less than the minimum charge then minimum charges will be apply.
  • Unit: Select the unit that will decide the shipping charges. The Admin can either select “Kilometers” or “Miles”.
  • Ship to Applicable Countries: Here, select the countries where distance rate shipping will be applicable. The Admin can either select “All Allowed countries” or “Specific Countries”.
  • Ship To Specific Countries: Select the specific countries where this shipping will be applicable. Also, This setting will be available if the admin has select “specific countries” on “Ship to Applicable countries”.
  • Show Method If not Applicable: If yes then the method will show at the front if even if the shipping is not applicable to that area.
  • Display Error Message: The entered error message will show when the distance rate shipping is not applicable.

Upload CSV to Add Shipping Details – Admin

The admin can upload the CSV file which contains distance “From” to “To” and shipping rate.

To do so the admin needs to navigate through Marketplace Management –>Marketplace Distance Rate Shipping Manager as shown below:

Distance-shipping-range

Here the admin will get the following tab:

Shipping Details:

This will show an intuitive table view that includes a list of distance ranges and shipping rates after uploading the CSV file.

marketplace-1

If admin wants to edit specific shipping rule then admin needs to click on particular row. It brings you to the shipping rule page. From here the admin can modify shipping rate and distance range as required.

Shipping-Rule

Add Shipping:

As similar to the below image admin can upload the CSV file to add the Shipping rule. Once uploaded, it will get listed under the Shipping details tab.

The admin can even download the sample CSV file and modified it. Then upload it by using the choose file option as shown below:

marketplace-2

After that, need to click on Add Shipping button to save the shipping information.

Distance Rate Shipping – Seller End

The seller can also set the distance-based shipping method for their products. To do so, the seller has to configure first below settings:

  1. Set seller location
  2. Shipping configuration
  3. Distance Rate Shipping
  4. Shipping Setting

Set Seller Location

Once the seller login with their panel, they have to navigate Marketplace Dashboard –> Set Seller Location to set the location for shipping of their products.

set-seller-location

Location: Here, the seller can enter the location of the store.

Latitude: The latitude of the seller’s location will be automatically entered once the location is enter.

Longitude: Also, the longitude will be automatically set according to the enter location.

Shipping Configuration

Next, the seller has to navigate Marketplace Dashboard –> Shipping Configuration to set the shipping information.

shipping-configuration-1

Maximum Area Cover: Here, enter the maximum area to cover for a distance rate shipping. If not set then no limit for delivery distance.

Unit: Select the unit that will decide the shipping charges. The seller can either select “Kilometers” or “Miles”.

Rate Per Unit: Enter the shipping charges apply on the basis of per unit.

For example, if rate per unit is 40 and the unit set in kilometers. When any customer orders a product within a 1-kilometer range then shipping charges will be 40.

Item Wise Rate: If set Yes then the shipping charges will be calculated based on per product. The shipping amount will be multiplied by the number of products order.

Handling Charge: Enter the handling charges.

Minimum Charge: Set the minimum charge. If shipping charges calculated is less than the minimum charge then minimum charges will be apply.

Distance Rate Shipping

As similar to admin the seller can also add the shipping rate based on distance range by uploading the CSV file for their products.

To do so, seller has to click on Distance Rate Shipping tab under Marketplace dashboard as shown below:

Distance-rate-shipping-seller-end

The seller can download the sample file and edit the distance range and the shipping rate into CSV then upload it by using choose file option.

After that, the seller needs to click on the save shipping button. Once successfully uploaded, it will get display under Shipping Rate List.

Shipping Setting

In next setting, seller needs to enter the shipping origin address, to do so, the seller has to click on Shipping setting tab under Marketplace dashboard.

Tapping on Shipping setting tab will bring the seller to Origin address page as shown below:

shipping-setting

Company: Enter the company name.

Phone Number: Here, seller needs to enter their phone number.

Street Address: The seller has to mention shipping origin address.

City: From here, seller has to enter the city name of the store.

State/Province: Select the state from the drop-down.

Zip/Postal Code: Enter the zip code.

Country: Select the country name from where product will ship.

Front-End

After the module setup, customer can easily use this shipping method for their purchases.

shopping-cart

When customer adds product to the cart then there will be an option to select an address or add a new address. Henceforth, according to the address, shipping methods and prices will be displayed as per the below image.

Shipping-method

After selecting the Marketplace Distance Rate shipping method, the customer will click the “Next” button to review the order.

On the order review page, the shipping method and the cost of shipping will be display as per the below image.

Payment-Method

The customer can place there order on clicking “place order” button.

Manage Orders – At Seller End

The sellers can manage their orders if the admin has allow the sellers to manage their orders from the back-end. To manage the orders the sellers will navigate to Order at Vender Dashboard as per the below image.

Seller-order-history

Here, the seller can view the complete list of the orders. To manage and generate invoices, the shipment of the orders, the seller selects the order from the list.

So, the seller can even notify the customers by sending them emails and cancel the order.

Seller-Manage-order
Shipping-Method

Hereafter viewing the order the seller can create the invoice, shipping, and Tracking Number for the order.

Seller Invoice

The seller can click on the invoice button to generate a new invoice. The generated invoice is visible in the exclusive invoice tab.

Order-invoice

Seller Shipment

The seller can enter the tracking number and generate the shipment.

Order-Shipment

Manage Orders – Admin End

The admin can view and manage all the orders(along with the seller’s orders). Hence, for this, the admin will navigate to the Sales > Order as per the below image.

Admin-Order-List

Here, the admin can view the complete list of the orders. Hence, to manage and generate invoices, the shipment of the orders, the admin selects the order from the list.

So, the admin can-

  • notify the customers by sending them emails,
  • cancel/hold the order and
  • even edit/reorder the product order.

Admin Invoice Management

The admin can generate and manage the invoice for their product. However, the store owner can view the invoice of the seller also if it’s part of the order.

Admin-product-invoice-1

The invoice consists of the name of the product purchased by the customer, price, shipping & handling charges, shipping, and billing address.

Admin-product-invoice2

The Admin can also notify the customer by adding text message in comment text and this message will be deliver to customer through email.

Admin Shipment Generation

Thus, the admin can even generate the shipment of the product which can be viewed in the shipment tab. This will also contain the shipment by the seller if the seller’s product is part of the order.

Admin-product-shipment

The shipment consists of customer name, email address, customer group, order date, order status, etc

When the admin generates shipment the order status changes from processing to complete.

Admin-product-shipment2

From here, the admin can even send the tracking details to the customer.

Support

So, that’s all for Magento 2 Marketplace Distance Based Shipping Calculation. For any further, assistance, just raise a ticket here and for any doubt contact us at [email protected].

 

Current Product Version - 5.0.2-p2

Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x

Blog Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x
  • Version Supported Framework Version - 2.0.x, 2.1.x, 2.2.x,2.3.x
  • Version 2.0.x, 2.1.x, 2.2.x,2.3.x
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home

Table of Content