infinitum-space/module-checkmo-permission
最新稳定版本:1.0.2
Composer 安装命令:
composer require infinitum-space/module-checkmo-permission
包简介
Magento 2 module that restricts access to the Check / Money Order (checkmo) payment method based on a customer attribute 'Allow Check / Money Order'.
README 文档
README
Magento 2 module that adds a "Allow Check / Money order" attribute to the customer entity and conditionally enables the Check / Money Order (checkmo) payment method based on that attribute.
✨ Features
-
Adds
allow_checkmoattribute tocustomerentity. -
Attribute is visible only in the Admin Panel on the customer edit page.
-
The
checkmopayment method is available only if:- it is enabled in configuration, and
- the logged-in customer has the attribute enabled.
📦 Installation
Composer (recommended)
composer require infinitum-space/module-checkmo-permission bin/magento module:enable InfinitumSpace_CheckmoPermission bin/magento setup:upgrade bin/magento cache:flush
Manual Installation (alternative)
-
Copy the module to:
app/code/InfinitumSpace/CheckmoPermission -
Run the following commands:
bin/magento module:enable InfinitumSpace_CheckmoPermission bin/magento setup:upgrade bin/magento cache:flush
-
Ensure that the Check / Money Order payment method is enabled:
- Go to:
Stores → Configuration → Sales → Payment Methods → Check / Money Order - Set
Enabled = Yes
- Go to:
📃 Customer Attribute
- Code:
allow_checkmo - Type: Boolean (Yes / No)
- Form:
adminhtml_customeronly - Default value: No
💳 checkmo Payment Visibility Logic
| Condition | checkmo available? |
|---|---|
| checkmo disabled in configuration | ❌ |
| Customer not logged in | ❌ |
| Customer attribute not enabled | ❌ |
| Customer attribute enabled + checkmo on | ✅ |
📊 Dependencies
This module depends on the following Magento components:
Magento_CustomerMagento_EavMagento_PaymentMagento_QuoteMagento_Ui
📄 License
MIT
📧 Support
Developer: unicorn.ares
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-23