软 commerce / module-url-rewrite-generator
URL 重写生成模块。
1.2.5
2024-07-03 18:56 UTC
Requires
- php: ~8.0.0||~8.1.0||~8.2.0||~8.3.0
- magento/module-url-rewrite: ^101|^102
- softcommerce/module-core: *
README
此扩展的核心目的是提供一个简单的方法,使用 CLI 重新生成 Magento 2 的 URL 重写。
功能
- 为类别生成 URL 重写
- 为产品生成 URL 重写
- 为所有活动店铺生成 URL
- 根据实体或店铺标准删除 URL 重写
- 兼容搜索引擎优化
- 兼容使用类别路径的产品 URL
- 兼容类别和产品 URL 后缀
- 如果 URL 键更改,则创建永久重定向
兼容性
- 开源 >= 2.4.0
- 本地商业 (EE) >= 2.4.0
- 云商业 (ECE) >= 2.4.0
安装
使用 composer
composer require softcommerceltd/module-url-rewrite-generator
安装后
# Enable the module
bin/magento module:enable SoftCommerce_UrlRewriteGenerator
在生产模式下
# compile & generate static files
bin/magento deploy:mode:set production
在开发模式下
bin/magento setup:di:compile
使用方法
为类别生成 URL 重写
命令选项
bin/magento url_rewrite:category:generate [id|-i]
示例
# Regenerate URL rewrites for all categories: bin/magento url_rewrite:category:generate # Generate URL rewrites for particular categories with IDs 25 & 26: bin/magento url_rewrite:category:generate -i 25,26
为产品生成 URL 重写
请注意,具有可见性 不单独可见 [id: 1] 的产品被排除在 URL 重写生成之外。
命令选项
bin/magento url_rewrite:product:generate [id|-i]
# Regenerate URL rewrites for all products: bin/magento url_rewrite:product:generate # Generate URL rewrites for particular products with IDs 25 & 26: bin/magento url_rewrite:product:generate -i 25,26
删除 URL 重写
命令选项
bin/magento url_rewrite:delete [entity|-e || store|-s]
# Delete URL rewrites for entity: product with store IDs: 1 and 2 bin/magento url_rewrite:delete -e product -s 1,2 # Delete URL rewrites for product and category entities with store IDs 1, 2 and 3 bin/magento url_rewrite:delete -e product,category -s 1,2,3
支持
Soft Commerce Ltd
support@softcommerce.io
许可
此包中包含的每个源文件均根据 OSL 3.0 许可。
开源软件许可 (OSL 3.0)。请参阅 LICENSE.txt
了解 OSL 3.0 许可的详细信息。