galacticlabs/customer-group-payment-filters
Composer 安装命令:
composer require galacticlabs/customer-group-payment-filters
包简介
Filter available payment methods based on customer groups
README 文档
README
This simple module adds a new section to the Customer Groups admin page, allowing you to define payment options that should not be allowed for the chosen customer group.
Note: These settings will affect both frontend and backend orders.
Installation
Require the module
composer require galacticlabs/customer-group-payment-filters
Enable the module
php bin/magento module:enable GalacticLabs_CustomerGroupPaymentFilters
Run setup to install module and set up table(s)
php bin/magento setup:upgrade
Usage
Once installed, you can choose which payment methods should be restricted by going to Stores > Other Settings > Customer groups and selecting the group you would like to place restrictions on.
The edit screen has a new section called Disallowed Payment Options. This contains a multiselect list of the payment options in the Magento system. Choose the ones you'd like to disable for the customer group, then save for changes to take effect. These options are also available when creating a new customer group.
Note: These options will not affect anything if the chosen payment options are themselves not enabled.
Bugs/Feature Requests & Contribution
Please do open a pull request on GitHub should you want to contribute, or create an issue.
Todo
I plan on cleaning this up a bit and also adding some tests to prove functional correctness. I'd also be interested in discussions on how I could have achieve the same results using alternative/better techniques. I don't like the fact i'm accessing the request object inside the repository save method. Is it possible to perform this action in the admin controller instead? Unfortunately I hit an issue when saving a new customer group in that I couldn't access the ID of the new group in the same request. I'm sure with more time I would of figured it but this was created very quickly.
- Caching should be added
License
MIT - Do as you wish 👍
galacticlabs/customer-group-payment-filters 适用场景与选型建议
galacticlabs/customer-group-payment-filters 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16.76k 次下载、GitHub Stars 达 17, 最近一次更新时间为 2017 年 12 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 galacticlabs/customer-group-payment-filters 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 galacticlabs/customer-group-payment-filters 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 16.76k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 17
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-12-17
