enjoydevelop / magento2-module-reset-image-roles
Magento 2模块,通过直接SQL查询重置图片角色
1.0.0
2024-04-23 08:59 UTC
Requires
- php: ~8.1.0||~8.2.0
- magento/framework: 103.0.*
README
更新图片角色。它将基础图片的值复制到特定的图片角色(small_image, thumbnail, swatch_image)。
本模块解决了什么问题?
当您的产品有图片和基础角色,但缺少其他角色时。因此,您可以使用此脚本来设置其他角色。
安装
composer require enjoydevelop/magento2-module-reset-image-roles
bin/magento module:enable EnjoyDevelop_ResetImageRoles && bin/magento setup:upgrade && bin/magento setup:di:compile && bin/magento setup:static-content:deploy -f
使用方法
将small_image角色设置为与Base Image Role相同的图片
bin/magento catalog:image-roles:reset small_image
将small_image、thumbnail、swatch_image角色设置为与Base Image Role相同的图片
bin/magento catalog:image-roles:reset small_image,thumbnail,swatch_image
将custom_role_attribute_code角色设置为与Base Image Role相同的图片
bin/magento catalog:image-roles:reset custom_role_attribute_code
将custom_role_attribute_id角色设置为与Base Image Role相同的图片
bin/magento catalog:image-roles:reset custom_role_attribute_id


