PHPackages                             integer-net/magento2-shippingpreselection - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. integer-net/magento2-shippingpreselection

AbandonedMagento2-module[HTTP &amp; Networking](/categories/http)

integer-net/magento2-shippingpreselection
=========================================

This module provides methods to preselect a shipping method upon quote creation of the customer. It fetches all available countries from Magento Config and will preselect the default country/region/postcode of the current storeview.

0.0.4(3y ago)210.7k↓33.3%4[1 PRs](https://github.com/integer-net/magento2-shippingpreselection/pulls)MITPHPPHP ~7.3||~7.4

Since Oct 1Pushed 3y ago10 watchersCompare

[ Source](https://github.com/integer-net/magento2-shippingpreselection)[ Packagist](https://packagist.org/packages/integer-net/magento2-shippingpreselection)[ RSS](/packages/integer-net-magento2-shippingpreselection/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (12)Versions (9)Used By (0)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7391fb02a6bc65f92f3017e87d2d2d45ea93b00e22ae7661ee970f944c0f23e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e74656765722d6e65742f6d6167656e746f322d7368697070696e6770726573656c656374696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/integer-net/magento2-shippingpreselection)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Supported Magento Versions](https://camo.githubusercontent.com/2113b3a30955562f026a2b7dda3a09fee30d0c49aacbfce67193c5dc7b434617/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d6167656e746f2d322e342d627269676874677265656e2e7376673f6c6f676f3d6d6167656e746f266c6f6e6743616368653d74727565267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/2113b3a30955562f026a2b7dda3a09fee30d0c49aacbfce67193c5dc7b434617/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d6167656e746f2d322e342d627269676874677265656e2e7376673f6c6f676f3d6d6167656e746f266c6f6e6743616368653d74727565267374796c653d666c61742d737175617265)

[![Maintainability](https://camo.githubusercontent.com/db0017e32e1a1d7ad0364b0b8e83dabbae3ef1a05cb8c954d91006c02ef7050a/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6d61696e7461696e6162696c6974792f696e74656765722d6e65742f6d6167656e746f322d7368697070696e6770726573656c656374696f6e3f7374796c653d666c61742d737175617265)](https://codeclimate.com/github/integer-net/magento2-shippingpreselection)

⚠️ THIS PACKAGE IS NO LONGER MAINTAINED
=======================================

[](#️--this-package-is-no-longer-maintained)

It was provided open source "as is" on demand, but since we do not even use this approach in our own projects anymore, we won't make any effort to keep this up to date.

Do you need help with implementing shipping estimation on the cart page for the default country? Contact  with your inquiry.

---

IntegerNet ShippingPreselection (AutoShipping)
==============================================

[](#integernet-shippingpreselection-autoshipping)

This module preselects the cheapest shipping method by filling shipping address with mock data and default country/region/postcode of the current storeview.

Upon entering checkout, PayPal Express or PayOne pages, the mock data is removed from shipping address.

Installation
------------

[](#installation)

1. Install it into your Magento 2 project with composer:

    ```
    composer require integer-net/magento2-shippingpreselection

    ```
2. Enable module

    ```
    bin/magento setup:upgrade

    ```

Configuration
-------------

[](#configuration)

In general, make sure your configuration settings meet requirements:

- postcode, region and country set in General &gt; Store Information
- all available countries need to have at least one shipping method available
- available countries cannot have mandatory region setting

1. Add selectedShippingCountry select to `Mage_Checkout::cart.phtml`

```

```

2. Add shipping country script to `Mage_Checkout::cart/js/cart.phtml`

```
     updateCartDataDependencies() {
         [...]
         this.selectedShippingCountry = this.cartData && this.cartData.shipping_addresses && this.cartData.shipping_addresses[0] && this.cartData.shipping_addresses[0].country && this.cartData.shipping_addresses[0].country.code || null
     },

```

3. Set config value for the mock data `integernet/shipping_preselection/mock_data` to custom value if desired
4. If you have an altered cart query for GraphQl, you need to override `IntegerNet\ShippingPreselection\ViewModel\ShippingAddressMutation` accordingly.

.

Please mind: *The template provided is supposed to work with table rates / one shipping method.*

If you have several shipping methods and through changes made in cart - like quantity changes - the best available method changes, this will not be recognized by the module (because a shipping method is already in place). You can solve this by checking client-side in the cart, or adding a check backend-wise.

Extending configuration
-----------------------

[](#extending-configuration)

Override config values for integernet/shipping\_preselection/mock\_clearance\_urls or hook into the service to modify behaviour for pages where the shipping address should be (un-)mocked.

Known issues
------------

[](#known-issues)

**1. When aborting PayPal Express and return to cart, the shipping method isn't displayed anymore**

Paypal doesn't properly set the telephone address attribute, as it is called differently in its response. You can make the telephone field nullable in a `etc/schema.graphql` of your own

```
interface CartAddressInterface {
    telephone: String
}

input CartAddressInput {
    telephone: String
}

```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [integer\_net GmbH](https://github.com/integer_net)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~168 days

Total

4

Last Release

1184d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/78e73cb79c6200c1d74eb632e79da9d227041735160b9795a1146537ba58f386?d=identicon)[integer-net](/maintainers/integer-net)

---

Top Contributors

[![schmengler](https://avatars.githubusercontent.com/u/367320?v=4)](https://github.com/schmengler "schmengler (63 commits)")[![lbuchholz](https://avatars.githubusercontent.com/u/2143086?v=4)](https://github.com/lbuchholz "lbuchholz (7 commits)")[![rajeev-k-tomy](https://avatars.githubusercontent.com/u/7589113?v=4)](https://github.com/rajeev-k-tomy "rajeev-k-tomy (2 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/integer-net-magento2-shippingpreselection/health.svg)

```
[![Health](https://phpackages.com/badges/integer-net-magento2-shippingpreselection/health.svg)](https://phpackages.com/packages/integer-net-magento2-shippingpreselection)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1121.6M10](/packages/mollie-magento2)[dotdigital/dotdigital-magento2-extension

Dotdigital for Magento 2

50374.2k18](/packages/dotdigital-dotdigital-magento2-extension)[developersalliance/module-table-rates

This module allows administrators to manage and view shipping table rates from the admin UI.

443.4k](/packages/developersalliance-module-table-rates)[o2ti/sigep-web-carrier

O2TI - Sigep Web Carrier

141.5k](/packages/o2ti-sigep-web-carrier)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
