软商 /module-attribute-set-cleaner
通过移除给定集合中未使用的属性来清理属性集。
1.0.2
2024-02-21 16:52 UTC
Requires
- php: ~8.0.0||~8.1.0||~8.2.0
- magento/module-eav: *
- softcommerce/module-core: *
This package is auto-updated.
Last update: 2024-09-21 18:04:31 UTC
README
本模块旨在通过使用CLI从属性组集中移除未使用的属性来清理eav属性集。
从属性集中移除未使用的属性可能是一项艰巨的任务,因为它需要大量努力来查找和识别在给定属性集实体表中未使用的属性。属性集清理器就是为了解决这个问题而开发的。
该模块将搜索并移除未在给定实体表(如catalog_product_entity_int、catalog_product_entity_varchar等)中使用的属性。例如,如果一个代码为"color"的属性分配给了"默认"属性集,并且该属性在给定的实体表[catalog_product_entity_int]中没有值,则该属性将从属性组集中移除。
支持实体
- 目录产品。
我们将未来添加对其他实体的支持。
兼容性
- Magento >= 2.4 CE || EE || ECE
- PHP ~7.4 || ~8.0 || ~8.1
安装
使用composer
composer require softcommerce/module-attribute-set-cleaner
安装后
# Enable the module
bin/magento module:enable SoftCommerce_AttributeSetCleaner
在生产模式下
# compile & generate static files
bin/magento deploy:mode:set production
在开发模式下
bin/magento setup:di:compile
使用方法
移除未使用的属性
命令选项
bin/magento eavattributeset:clean [id|-i]
示例
# Remove ALL unused attributes: bin/magento eavattributeset:clean # Remove attributes for particular attribute set, where -i stands for attribute set IDs: bin/magento eavattributeset:clean -i 4,10
支持
软商有限公司
support@softcommerce.io
许可证
本包中包含的每个源文件均根据OSL 3.0授权。
开放软件许可证 (OSL 3.0)。请参阅LICENSE.txt
以获取OSL 3.0许可证的完整详细信息。