Javatpoint Logo
Javatpoint Logo

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.

Setup shipping methods in Magento 2

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

Setup shipping methods in Magento 2

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

Setup shipping methods in Magento 2

Flat Rate

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

Setup shipping methods in Magento 2
  • 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.
Setup shipping methods in Magento 2
    • 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.
Setup shipping methods in Magento 2
  • 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.

Setup shipping methods in Magento 2
  • 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.

Setup shipping methods in Magento 2
  • 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.
Setup shipping methods in Magento 2
  • 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.
Setup shipping methods in Magento 2
  • 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.

Setup shipping methods in Magento 2

2. A pop-up will open in front of you. Read the message carefully, click OK, and move ahead.

Setup shipping methods in Magento 2

3. There will be two new options Import and Export that will appear in the Table Rate Shipping section.

Setup shipping methods in Magento 2

4. Click on the Export CSV button and a file tablerates.csv will download in your system. Save the file (tablerates.csv) in your system.

Setup shipping methods in Magento 2

5. 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.

Setup shipping methods in Magento 2

6. 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.

7. Save the updated CSV file on your system after completing it.

Setup shipping methods in Magento 2

Import the Table Rate Data

8. Now, Go back to the Table Rate Shipping section in Magento2.

9. Import the updated tablerates.csv file by clicking the Choose File button and then upload the file from your system.

Setup shipping methods in Magento 2

10. Click on Save Config to complete the Table Rate Shipping method.

Setup shipping methods in Magento 2




Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA