wagento / module-prune-customer
使用CLI命令列出并删除垃圾邮件客户
Requires
- php: ~7.1.3 || ^7.2 || ^7.3
- ext-json: *
- magento/framework: 101.0.* || 102.0.* || 103.0.*
- magento/module-customer: 101.0.* || 102.0.* || 103.0.*
- magento/module-sales: 101.0.* || 102.0.* || 103.0.*
- magento/module-store: 100.2.* || 101.0.* || 103.0.*
This package is not auto-updated.
Last update: 2024-09-18 17:53:06 UTC
README
主要功能
Wagento Prune Customer 扩展添加了CLI命令,可以
- 查找垃圾邮件客户,例如没有地址或没有订单或".ru"电子邮件等
- 以逗号分隔的CSV格式或表格结构列出垃圾邮件客户
- 删除垃圾邮件客户。
CLI使用
要仅列出常见垃圾邮件客户(包括电子邮件或名称中的"%.ru"、"%yandex%"或"http"),请使用选项
-s或--spam-identifier:>$ php bin/magento prune_customer:list --spam-identifier要仅列出没有地址和没有订单的垃圾邮件客户,请使用选项
-a或--no-address-order:>$ php bin/magento prune_customer:list --no-address-order要列出常见垃圾邮件客户和没有地址和没有订单的客户,请使用选项
-s或--spam-identifier和-a或--no-address-order:>$ php bin/magento prune_customer:list --spam-identifier --no-address-order要按自定义电子邮件搜索条件列出垃圾邮件客户,请使用参数
spam-emails:>$ php bin/magento prune_customer:list "%.ru" "%yandex%"要以逗号分隔的CSV格式列出垃圾邮件客户,请使用选项
--csv。如果未使用--csv选项,它将以表格结构显示结果:>$ php bin/magento prune_customer:list --csv您可以将CSV结果重定向到任何文件:>$ php bin/magento prune_customer:list --csv >> spam_list_001.csv
要列出并删除垃圾邮件客户,请使用选项
--delete:>$ php bin/magento prune_customer:list --delete>我们强烈建议在执行此操作之前创建数据库备份。您确定要删除找到的垃圾邮件客户吗?[是/否]
注意:这将询问确认问题,输入yes以继续,不输入任何内容或输入任何内容以跳过删除过程。
- 要查看CLI命令的帮助文档,请使用选项
-h或--help:>$ php bin/magento prune_customer:list --help
Description:
Show SPAM customer lists to prune
Usage:
prune_customer:list [options] [--] [<spam-emails>...]
Arguments:
spam-emails Search criteria with SPAM email
Options:
-a, --no-address-order Search criteria with no address AND no order
-s, --spam-identifier Search criteria with commonly known SPAM cases
--csv Show result as comma separated instead of table structure
--delete Delete customers with Search criteria
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
- 当您看到内存限制问题时,您可以增加CLI命令的内存限制:>$ php -dmemory_limit=-1 bin/magento prune_customer:list --no-address --no-order
要求
- PHP 7.1.3+、7.2.0+或7.3.0+
- Magento开源/ commerce 2.2.0+、2.3.0+或2.4.0+
安装
Composer(推荐)
您可以使用以下命令从终端或命令提示符安装它
$ cd /path/to/your/site
$ composer require wagento/module-prune-customer
手动
您可以从[GitHub]下载此扩展,并使用以下命令将其安装到您的Magento安装的app/code目录中
$ cd /path/to/your/site/app/code
$ mkdir Wagento
$ cd Wagento
$ git clone git@bitbucket.org:wagento-global/prune-customer-accounts.git PruneCustomer
安装后
首次安装扩展后,请运行以下命令以启用它
$ cd /path/to/your/site
$ php bin/magento module:enable Wagento_PruneCustomer
启用扩展后,请按照安装后、更新后或卸载后部分中的说明完成安装过程。
更新
Composer
如果您已使用Composer从Magento Marketplace安装了扩展,请在您的终端或命令提示符中运行以下命令来更新它
$ cd /path/to/your/site
$ composer update wagento/module-prune-customer
手动
如果您已从GitHub手动安装了扩展,请在您的终端或命令提示符中运行以下命令来更新它
$ cd /path/to/your/site/app/code/Wagento/PruneCustomer
$ git pull
卸载
Composer
如果您已使用Composer从Magento Marketplace安装了扩展,请在您的终端或命令提示符中运行以下命令来删除其数据和包
$ cd /path/to/your/site
$ php bin/magento module:uninstall -r Wagento_PruneCustomer
手动
如果您已手动安装了扩展,请在您的终端或命令提示符中运行以下命令来删除其数据
$ cd /path/to/your/site/app/code
$ rm -rf Wagento/PruneCustomer
$ mysql -u your_user -p your_database <<'SQL'
DELETE FROM `setup_module` WHERE `module` = 'Wagento_PruneCustomer';
SQL
安装后、更新后或卸载后
要完成安装、更新或卸载过程,请运行以下命令
$ cd /path/to/your/site
$ php bin/magento setup:upgrade
$ php bin/magento setup:di:compile
$ php bin/magento setup:static-content:deploy