---
title: "Magento 2: How To configure Auto Select Shipping Methods when more than one shipping methods are available."
url: "https://magecomp.com/blog/how-to-configure-auto-select-shipping-methods-in-magento-2/"
date: "2020-03-09T18:52:40+00:00"
modified: "2025-02-21T12:36:10+00:00"
author:
  name: "Dhiren Vasoya"
  url: "https://magecomp.com/"
categories:
  - "How To"
  - "Magento 2"
word_count: 442
reading_time: "3 min read"
summary: "Hello, Magento Folks,"
description: "you can successfully achieve the task of auto select shipping method if multiple shipping methods are available in your store."
keywords: "How To, Magento 2"
language: "en"
schema_type: "Article"
related_posts:
  - title: "How to Set Dynamic Email Subject in Magento 2"
    url: "https://magecomp.com/blog/set-dynamic-email-subject-magento-2/"
  - title: "Magento 2: How to Change Default Sort Order from Ascending to Descending for Product Listing in Category Page?"
    url: "https://magecomp.com/blog/magento-2-change-default-sort-order-from-ascending-to-descending-for-product-listing-in-category-page/"
  - title: "Magento 2: How to Programmatically Add Configurable Products to Cart"
    url: "https://magecomp.com/blog/magento-2-programmatically-add-configurable-products-to-cart/"
---

# Magento 2: How To configure Auto Select Shipping Methods when more than one shipping methods are available.

_Published: March 9, 2020_  
_Author: Dhiren Vasoya_  

![How To Auto Select Shipping Method When More Then One Shipping Method in Magento 2](https://magecomp.com/blog/wp-content/uploads/2020/03/How-To-Auto-Select-Shipping-Method-When-More-Then-One-Shipping-Method-in-Magento-2-1024x512.webp)

Hello, Magento Folks,

We have already learned [**Magento 2: Hide Other Shipping Methods if Free Shipping is Available**](https://magecomp.com/blog/magento-2-hide-shipping-methods-free-shipping-available/). Today I will explain to you about How To Configure Auto Select Shipping method in your Magento 2 store When more than one shipping methods are available.

[![Magento version upgrade](https://magecomp.com/blog/wp-content/uploads/2025/02/Magento-2-Version-Upgrade-CTA-1.webp)](https://magecomp.com/services/magento-upgrade-services/)

In the busy world of technologies, here is an only element called Time which is very expensive. So, the lack of time plays an important role in the checkout process of your store so auto select shipping method is considered to be an essential time-saving option for all your customers. Therefore when you have multiple shipping methods available in your store make sure by default to auto select any one shipping method for better customer experience.

When you have only one shipping method available in your store then definitely by default one shipping method is selected at the checkout page so there is no need of any configuration. But when you have multiple shipping methods available in your store then by default any method is not selected at the checkout page.

So, when you need to configure by default auto select one shipping method then you need to do the following code. You can easily configure and make your customer experience better by following below easy steps.

### 1. You need to override core file in your theme

### Copy Following file.

**vendor\magento\module-checkout\view\frontend\web\js\model\checkout-data-resolver.js**

**Past to**

**app\design\frontend\Themes\Yourtheme\Magento_Chekout\web\js\model\checkout-data-resolver.js**

**Search below code:**

```
if (ratesData.length === 1) {
        //set shipping rate if we have only one available shipping rate
        selectShippingMethodAction(ratesData[0]);

        return;
	}
```

[![Magento 2 Speed & Performance Optimization Services](https://magecomp.com/blog/wp-content/uploads/2025/02/Magento-2-Speed-Performance-Optimization-Services-CTA-1.webp)](https://magecomp.com/magento-performance-optimization.html)

**Replace below code:**

```
 if (ratesData.length >= 1) {
            //set shipping rate if we have only one available shipping rate
            selectShippingMethodAction(ratesData[0]);

            return;
        }
```

If you have completed the above instruction then you have successfully completed the configuration of auto select any one shipping method option by default in your Magento 2 store if multiple shipping methods are available in your store. Now you can give a better customer experience in your Magento 2 store in which there will be by default selection of shipping method if more than one shipping method is available in your store.

So, that was all for the day! With the help of this rich information, you can successfully achieve the task of auto select shipping method if multiple shipping methods are available in your store. If you face any issues while implementing, then contact our [**support team**](https://magecomp.com/support/). We will be happy to help you.

Lastly, if you found this helpful, then let us know your valuable words in the comments below. Also, don’t forget to share this with your Magento development partners.

[![hyva theme development](https://magecomp.com/blog/wp-content/uploads/2025/02/hyva-theme-development-CTA-1.webp)](https://magecomp.com/services/hyva-theme-development/)

Happy Coding?


---

_View the original post at: [https://magecomp.com/blog/how-to-configure-auto-select-shipping-methods-in-magento-2/](https://magecomp.com/blog/how-to-configure-auto-select-shipping-methods-in-magento-2/)_  
_Served as markdown by [Third Audience](https://github.com/third-audience) v3.5.3_  
_Generated: 2026-08-24 13:33:39 UTC_  
