How to setup shipping methods in Magento 2

Last updated on May 31 2022
Raghvendra Wanchoo

Table of Contents

How to setup shipping methods in Magento 2

In online business, selling the products to the customers should have scalable and flexible shipping policies. Magento 2 is a friendly system for business needs including shipment rates. The free shipping method is applied on the basis of minimum purchase or condition of cart price rule, which you set. Additionally, the shipping methods can be set for certain items or for an entire order that depends on your current strategy, which you set.

If you want to charge the different shipping rates on your store, then you can do it with the Table Rate Shipping Method and Flat Rate Shipping Method. To enable the shipping method follow the below steps:

Step 1: On the left sidebar of Magento 2 Admin Panel, Navigate to Store >> Setting >> Configuration.

image1 21

Step 2: Under the Sales section, click on the Shipping Methods tab.

image2 20

Here you will get the shipping methods such as Flat Rate, Free Shipping, Table Rates, Magento Shipping, UPS, USPS, FedEx, and DHL.

image3 20

Flat Rate

Step 1: Expand the Flat Rate section and fill the required details in the given fields.

image4 20

  • Enabled: By default, Flat rate is enabled. So, it will be available in the Tax section of the shopping cart, and also in the Shipping section during checkout.
  • Title: Enter the title of the flat rate shipping, which will be visible on the checkout page.
  • Method Name: Set the method name in this field that displays in the shopping cart with the shipping rate. By default, “Fixed” is set.
  • Type: Determine how the flat rate charges in shipping will apply – Per Item, Per Order, or None.image5 20
    • None is similar to the Free shipping method.
    • Select the Per Item to apply the flat rate shipping for each item.
    • Select the Per Order to apply the flat rate shipping for the entire order.
  • Price: Set the Price that you want to charge for the flat rate shipping, e.g., Rs. 6.00. Means 6 rupees per item will apply.
  • Calculate Handling Fee: If you want to apply some additional charges, set it to Fixed or Percent, and then enter the amount in Handling Fee field.

image6 13

  • Display Error Message: Provide a short message if the flat rate shipping is unavailable.
  • Ship to Applicable Countries: We have two options here:
    • All Allowed Countries: By selecting this option, free shipping is supported for every country.
    • Specific Countries: Choose the country to which the Flat Rate Shipping is supported with the Ctrl key.
  • Show Method if Not Applicable: Determines if Flat Rate appears as an option during checkout if the method does not apply to purchase.
  • Sort Order: If two or more shipping is enabled, then in which order it will display. So, set the number that determines the order.

Step 2: Click on the Save Config button to save the Flat shipping method.

Free Shipping

Step 1: Expand the Free Shipping section and fill the required details in the given fields.

image7 13

  • Enabled: Enable the shipping method by setting up the Yes for that. Free Shipping appears as an option in the shipping section during checkout when enabled.
  • Title: Enter the Title for free shipping on the checkout page.
  • Method Name: Provide a name to describe the shipping method in the Method Name field.
  • Minimum Order Amount: Enter the minimum amount applicable for free shipping.
  • Displayed Error Message: Provide an error message that will appear if the free rate shipping is unavailable.
  • Ship to Applicable Countries: Specifies the countries where you offer Free Shipping. We have two options here:
    • All Allowed Countries: By selecting this option, free shipping is available for every country.
    • Specific Countries: Choose the country to which the Free Shipping is supported with the Ctrl key.
  • Show Method if Not Applicable: Determines if Flat Rate appears as an option during checkout if the method does not apply to purchase.
  • Sort Order: If two or more shipping is enabled, then in which order it will display. So, set the number that determines the order.

Step 2: Click on the Save Config button to save the Free shipping method.

Table Rates Shipping

Apply the Table Rates Shipping to calculate the shipping fee according to the combination of conditions such as Price vs. Destination, Weight vs. Destination, and # of items vs. Destination. All are listed in a table rate file that we can import and export in Magento 2 settings. Now, we will learn to configure the table rate shipping method in Magento 2.

Step 1: Expand the Table Rates Shipping section and fill the required details in the given fields.

image8 13

  • Enabled: Enable the shipping method by setting up the Yes for that.
  • Title: Enter the Title for table rate shipping on the checkout page. By default, we can use “Best Way” for free shipping.
  • Method Name: Provide a name to describe the shipping method in the Method Name field.
  • Conditions: Determines the condition on which the calculation is based. We have three options: Weight vs. Destination, Price vs. Destination, and # of Item vs. Destination.

image9 11

  • Include Virtual Products in Price Calculation: Determines if virtual products are included in the Table Rate price calculations.

Note: We can calculate the shipping on virtual products. Virtual products do not carry the weight, so it will apply only on Price vs. Destination and # of items vs. Destination.

  • Calculate Handling Fee: If you want to apply some additional charges, set it to Fixed or Percent, and then enter the amount in Handling Fee field.image6 13
  • Displayed Error Message: Provide an error message that will appear if the table rate shipping is not available.
  • Ship to Applicable Countries: Determines the countries where you offer Table Rate Shipping. We have two options here:
    • All Allowed Countries: By selecting this option, free shipping is available for every country.
    • Specific Countries: Choose the country to which the Free Shipping is supported.
  • Show Method if Not Applicable: Determines if Flat Rate appears as an option during checkout if the method does not apply to purchase.
  • Sort Order: If two or more shipping is enabled, then in which order it will display. So, set the number that determines the order.

Step 2: Click on the Save Config button to save the Table Rate shipping method.

Preview the Table Rate Data

Magento 2 allows us to generate or view and download different reports. Magento 2 has integrated tools for CSV file generation. We can create the shipping rates in the spreadsheet and then import them to our website.

  1. On the top-left corner, select the Store View where the configuration is active. We can choose the “Main website” or any website that we need.

image10 10

  1. A pop-up will open in front of you. Read the message carefully, click OK, and move ahead.image11 9
  2. There will be two new options Import and Export that will appear in the Table Rate Shipping section.image12 9
  3. Click on the Export CSVbutton and a file tablerates.csv will download in your system. Save the file (tablerates.csv) in your system.image13 9
  4. Open the downloaded (tablerates.csv) file in Excel where you will get Country, Region/State, Zip/Postal Code, Order Subtotal, and Shipping Price for Price vs. Destination. The CSV structure looks like as given below in the screenshot.image14 7
  5. Complete the CSV file in a spreadsheet.
  • Use an asterisk (*) for all possible values in any category.
  • The Country column must contain a three-character code for each entry. E.g., enter the first three characters of the country name like – IND for INDIA.
  1. Save the updated CSV file on your system after completing it.image15 6

Import the Table Rate Data

  1. Now, Go back to the Table Rate Shipping section in Magento2.
  2. Import the updated tablerates.csv file by clicking the Choose Filebutton and then upload the file from your system.image16 6
  3. Click on Save Config to complete the Table Rate Shipping method.image17 6

So, this brings us to the end of blog. This Tecklearn ‘How to setup shipping methods in Magento 2’ blog helps you with commonly asked questions if you are looking out for a job in Magento Programming. If you wish to learn Java and build a career Java Programming domain, then check out our interactive, Java and JEE Training, that comes with 24*7 support to guide you throughout your learning period. Please find the link for course details:

https://www.tecklearn.com/course/java-and-jee-training/

Java and JEE Training

About the Course

Java and JEE Certification Training is designed by professionals as per the industrial requirements and demands. This training encompasses comprehensive knowledge on basic and advanced concepts of core Java & J2EE along with popular frameworks like Hibernate, Spring & SOA. In this course, you will gain expertise in concepts like Java Array, Java OOPs, Java Function, Java Loops, Java Collections, Java Thread, Java Servlet, and Web Services using industry use-cases and this will help you to become a certified Java expert.

Why Should you take Java and JEE Training?

  • Java developers are in great demand in the job market. With average pay going between $90,000/- to $120,000/- depending on your experience and the employers.
  • Used by more than 10 Million developers worldwide to develop applications for 15 Billion devices.
  • Java is one of the most popular programming languages in the software world. Rated #1 in TIOBE Popular programming languages index (15th Consecutive Year)

What you will Learn in this Course?

Introduction to Java

  • Java Fundamentals
  • Introduction to Java Basics
  • Features of Java
  • Various components of Java language
  • Benefits of Java over other programming languages
  • Key Benefits of Java

Installation and IDE’s for Java Programming Language

  • Installation of Java
  • Setting up of Eclipse IDE
  • Components of Java Program
  • Editors and IDEs used for Java Programming
  • Writing a Simple Java Program

Data Handling and Functions

  • Data types, Operations, Compilation process, Class files, Loops, Conditions
  • Using Loop Constructs
  • Arrays- Single Dimensional and Multi-Dimensional
  • Functions
  • Functions with Arguments

OOPS in Java: Concept of Object Orientation

  • Object Oriented Programming in Java
  • Implement classes and objects in Java
  • Create Class Constructors
  • Overload Constructors
  • Inheritance
  • Inherit Classes and create sub-classes
  • Implement abstract classes and methods
  • Use static keyword
  • Implement Interfaces and use it

Polymorphism, Packages and String Handling

  • Concept of Static and Run time Polymorphism
  • Function Overloading
  • String Handling –String Class
  • Java Packages

Exception Handling and Multi-Threading

  • Exception handling
  • Various Types of Exception Handling
  • Introduction to multi-threading in Java
  • Extending the thread class
  • Synchronizing the thread

File Handling in Java

  • Input Output Streams
  • Java.io Package
  • File Handling in Java

Java Collections

  • Wrapper Classes and Inner Classes: Integer, Character, Boolean, Float etc
  • Applet Programs: How to write UI programs with Applet, Java.lang, Java.io, Java.util
  • Collections: ArrayList, Vector, HashSet, TreeSet, HashMap, HashTable

Java Database Connectivity (JDBC)

  • Introduction to SQL: Connect, Insert, Update, Delete, Select
  • Introduction to JDBC and Architecture of JDBC
  • Insert/Update/Delete/Select Operations using JDBC
  • Batch Processing Transaction
  • Management: Commit and Rollback

Java Enterprise Edition – Servlets

  • Introduction to J2EE
  • Client Server architecture
  • URL, Port Number, Request, Response
  • Need for servlets
  • Servlet fundamentals
  • Setting up a web project in Eclipse
  • Configuring and running the web app with servlets
  •  GET and POST request in web application with demo
  • Servlet lifecycle
  • Servlets Continued
  • Session tracking and filter
  • Forward and include Servlet request dispatchers

Java Server Pages (JSP)

  • Fundamentals of Java Server Page
  • Writing a code using JSP
  • The architecture of JSP
  • JSP Continued
  • JSP elements: Scriptlets, expressions, declaration
  • JSP standard actions
  • JSP directives
  • Introduction to JavaBeans
  • ServletConfig and ServletContext
  • Servlet Chaining
  • Cookies Management
  • Session Management

Hibernate

  • Introduction to Hibernate
  • Introduction to ORM
  • ORM features
  • Hibernate as an ORM framework
  • Hibernate features
  • Setting up a project with Hibernate framework
  • Basic APIs needed to do CRUD operations with Hibernate
  • Hibernate Architecture

POJO (Plain Old Java Object)

  • POJO (Plain Old Java Object)
  • Persistent Objects
  • Lifecycle of Persistent Object

Spring

  • Introduction to Spring
  • Spring Fundamentals
  • Advanced Spring

Got a question for us? Please mention it in the comments section and we will get back to you.

 

 

0 responses on "How to setup shipping methods in Magento 2"

Leave a Message

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