flagbit / shopware-6-product-badge
此包已被废弃,不再维护。未建议替代包。
用于导航和产品详情页的徽章
v2.0.0
2022-01-20 12:32 UTC
Requires
- shopware/core: ~6.4.1
- shopware/storefront: ~6.4.1
README
这是一个用于导航和产品详情页徽章的扩展。自定义徽章的文本设置在产品的自定义字段中。徽章的背景色和字体颜色可以通过配置或产品设置。当分配产品页面布局时,自定义徽章也会显示。在安装前,在 src 目录下的 SschreierProductBadge.php 文件中增加 NUMBER_BADGES 常量的值,您可以添加任意数量的徽章。
可能的徽章
- 折扣徽章
- 畅销徽章
- 新品徽章
- 缺货徽章
- 自定义徽章
可能的配置
- 选择是否在分类列表中显示任何徽章
- 选择是否在产品详情页上显示任何徽章
- 选择是否通过配置设置自定义或缺货徽章的颜色
- 设置自定义或缺货徽章的背景色
- 设置自定义或缺货徽章的字体色
可用的片段
- badgeText
- boxLabelDiscount
如何安装扩展
通过 Composer (推荐)
- 确保在项目 composer.json 中没有禁用
"packagist.org": false
- 通过 Composer 添加包
composer require flagbit/shopware-6-product-badge
- 刷新插件
bin/console plugin:refresh
- 安装并激活
bin/console plugin:install --activate SschreierProductBadge
通过下载和命令行
- 下载最新的 SschreierProductBadge-main.zip。
- 解压 zip 文件并将文件夹重命名为 SschreierProductBadge。
- 将文件夹移动到项目文件夹 custom/plugins/ .
- 通过 ssh 连接到控制台
bin/console plugin:refresh
bin/console plugin:install --activate SschreierProductBadge
通过 zip 上传
- 下载最新的 SschreierProductBadge-main.zip。
- 解压 zip 文件并将文件夹重命名为 SschreierProductBadge。
- 将文件夹压缩为 SschreierProductBadge.zip。
- 在 Shopware 管理中上传 zip 文件。
- 安装并激活扩展。