Magento 2 Distance Based Shipping
Installation and User Guide for Magento 2 Distance Based Shipping Extension
Table of Contents
- Installation
- Installation via app/code
- Installation via Composer
- Configuration Settings for Distance Based Shipping
- Order Tags Logs
- Order Tags Grid
- General Settings
- Types of Tags
- Static Tags
- Dynamic Tags
- Predefined Tags
- Assign Tags
- Manually Assign/Remove Tags
- Assign Tags Based on Conditions
- Tags in Action
- Order Grid
- Filter Order Grid
Installation
-
Installation via app/code: Upload the content of the module to your root folder. This will not overwrite the existing Magento folder or files, only the new contents will be added. After the successful upload of the package, run below commands on Magento 2 root directory.
php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -
Installation via Composer: Please follow the guide provided in the below link to complete the installation via composer.
Configuration Settings for Distance Based Shipping
Go to Admin > Stores > Configuration > Scommerce Configuration > Distance Based Shipping
General Settings
- Enabled Shipping Method – Select "Yes" or "No" to enable or disable the module.
- License Key – Please add the license for the extension which is provided in the order confirmation email. Please note license keys are site URL specific. If you require license keys for dev/staging sites then please email us at support@scommerce-mage.com.
- Title - Please enter the Title of Distance based Shipping.
- Method Name - Please enter the Method name of Distance based Shipping.
- Shipping Cost - The range is defined as: greater than or equal to "Distance From" and less than "Distance To".
- Ship to Applicable Countries - Select the applicable shipping destination(s).
- Show Method if Not Applicable - Select “Yes” or “No” to display the method when it is not applicable
- Displayed Error Message - Please enter the error message to be displayed
- Sort Order - Please enter the Sort order
- Google Maps Api key - Use a secure API key provided by Google to authenticate distance calculation requests via the Distance Matrix API.
- Distance Unit - Select whether to compare distances in miles or kilometers.
- Pick Store / Website Address From - Please select Pick Store / Website Address from the dropdown.
- Enabled Debug - Select “Yes” to enable debug mode, or “No” to disable it.
- Filter Methods by Distance - Select “Yes” to enable distance-based filtering, or “No” to disable it
- Distance Threshold - Please add the Distance Threshold.
- Shipping Methods - Select the shipping methods to hide when the store-to-customer distance exceeds the defined threshold.
Order Tags Grid
Go to Admin>Sales>Scommerce Order Tagger>Order Tags
- Name– Enter the name of the tag.
- Type– Select "Static" or "Dynamic" or "Predefined". Static tags can be manually assigned and dynamic tags can be assigned using conditions. Predefined tags already have conditions set so you only to select the predefined tag type.
- Sort Order– Define the priority of the tag(0 being the highest priority), the highest priority tag will be displayed first.
- Text Color– Add the text color for the tag.
- Background Color– Add the background color for the tag
Conditions– Add the conditions using order or address attributes.
Order Tags Logs
Go to Admin>Sales>Scommerce Order Tagger>Order Tags Logs
The logs keep track of all the dynamic tags that are assigned to orders. It has its own set of filters which can be used to identify a specific assigned tag.
Types of Tags
There are three of tags within the extension static, dynamic, and predefined tags.
Static Tags
After creation, these types of tags are added manually via Magento order grid. Conditions are not added in these types of tags. They are not shown in order tags logs.
Dynamic Tags
After creation, these types of tags are added automatically to the orders applicable.Conditions are added in these types of tags.They are shown in the Order tags logs.
Predefined Tags
After creation, these types of tags are added automatically to the orders applicable.Conditions are not added in these types of tags as they are already set. They are shown in the Order tags logs Irrespective of the name, only one type of tag can be created for one 'Predefined' field.
There are five types of predefined tags to choose from:-
- Out of Stock :- Gets automatically assigned to the orders whose products are out of stock. As soon as the product is available the tag gets removed automatically.
- Partially Shipped Order:- Gets automatically assigned to orders that are partially shipped i.e only a few quantities are shipped from the order. As soon all the entire order is invoiced the tag gets removed automatically.
- Partially Invoiced Order:- Gets automatically assigned to orders that are partially invoiced i.e only some quantity of the order is invoiced. As soon all the entire order is invoiced the tag gets removed automatically.
- Back Order:- Gets automatically assigned to backorders. This tag doesn't work with downloadable and virtual products. As soon as all the items in the order are shipped the tag gets removed automatically.
- First Time Customer:- Gets automatically assigned to the orders that are placed by first-time customers. This works for both guest/registered users.
Assign Tags
Manually Assign/Remove Tags
Go to Admin>Sales>Orders then select the order or multiple orders then click on the Actions dropdown and click on 'Add tags' or 'Remove tags'. Select the tag that you want add with the order from the 'Select Tags' dropdown and finally click on Add tags.
Note:- Only static Tags can be manually assigned.
Assign Tags Based on Conditions
Tags in Action
Order Grid
Filter Order Grid
Orders can be filtered based on the tags. New filter option can be found in the filters where orders can be sorted based on the tags selected. Go to Admin>Sales>Filters and click on the Tags dropdown to select the tags.
If you have a question related to this extension please check out our FAQ Section first. If you can't find the answer you are looking for then please contact support@scommerce-mage.com.












