定制 mhinspeya/module-checkout-address 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mhinspeya/module-checkout-address

Composer 安装命令:

composer require mhinspeya/module-checkout-address

包简介

Splits checkout street address into Street, House Number, and Address Suffix fields and filters payment methods by shipping method.

README 文档

README

Magento 2 module that customises the checkout address forms and filters available payment methods based on the selected shipping method.

Compatibility

MagentoPHP
2.4.4 – 2.4.88.2 · 8.3 · 8.4

Features

Street Address Splitting

The default Magento street address field is replaced with three dedicated sub-fields on both the shipping and billing address forms:

FieldData ScopeRequiredMax Length
Streetstreet[0]Yes255
House Numberstreet[1]Yes10
Address Suffixstreet[2]No255

Field Reordering

The following fields are reordered for a more logical European address layout:

FieldSort Order
Company59
Street (group)60
Postcode65
City70–75

Payment Method Filtering

The MethodList plugin filters available payment methods based on the active shipping method:

Shipping MethodPayment Method Hidden
tablerate_bestwaycheckmo (Check / Money Order)
(none selected)checkmo (Check / Money Order)
flatrate_flatratebanktransfer (Bank Transfer)

Installation

Composer (recommended)

composer require mhinspeya/module-checkout-address
bin/magento module:enable MHinspeya_CheckoutAddress
bin/magento setup:upgrade
bin/magento cache:flush

Manual

  1. Copy the module files to app/code/MHinspeya/CheckoutAddress/
  2. Run:
    bin/magento module:enable MHinspeya_CheckoutAddress
    bin/magento setup:upgrade
    bin/magento cache:flush
    

Module Structure

MHinspeya/CheckoutAddress/
├── composer.json
├── registration.php
├── changelog.txt
├── etc/
│   ├── module.xml          — Module declaration with sequence dependencies
│   ├── di.xml              — Plugin registrations
│   └── acl.xml             — ACL resource definitions
├── i18n/
│   └── de_DE.csv           — German translations
├── Model/
│   └── Checkout/
│       └── LayoutProcessorPlugin.php   — Splits street fields & reorders address form
└── Plugin/
    └── Model/
        └── MethodList.php              — Filters payment methods by shipping method

Plugin Details

LayoutProcessorPlugin

  • Type: After-plugin on Magento\Checkout\Block\Checkout\LayoutProcessor::process()
  • Registered in: etc/di.xml as rewrite-street
  • Scope: Both shipping and all billing address forms (iterates over all payment method forms)

MethodList

  • Type: After-plugin on Magento\Payment\Model\MethodList::getAvailableMethods()
  • Registered in: etc/di.xml as override_method
  • Sort Order: 10

Translations

The following strings are translatable via __():

Keyde_DE
StreetStraße
House numberHausnummer
Address suffixAdresszusatz

License

Proprietary — © MHinspeya

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2026-06-26