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)211.1k↑175%4[2 issues](https://github.com/integer-net/magento2-shippingpreselection/issues)[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 3d 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

25

—

LowBetter than 35% of packages

Maintenance0

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

1230d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2962722?v=4)[integer\_net GmbH](/maintainers/integer-net)[@integer-net](https://github.com/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

1131.9M16](/packages/mollie-magento2)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1011.8k26](/packages/loki-magento2-components)[fastly/magento2

Fastly CDN Module for Magento 2.4.x

1564.4M1](/packages/fastly-magento2)[buckaroo/magento2

Buckaroo Magento 2 extension

32420.3k8](/packages/buckaroo-magento2)[imi/magento2-friendly-captcha

Friendly Captcha integration for Magento2

19131.4k](/packages/imi-magento2-friendly-captcha)[mage-os/module-inventory-reservations-grid

Add a grid with the list of inventory reservations.

1615.9k](/packages/mage-os-module-inventory-reservations-grid)

PHPackages © 2026

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