flagbit/shopware-6-product-badge

此包已被废弃,不再维护。未建议替代包。

用于导航和产品详情页的徽章

安装: 1

依赖者: 0

建议者: 0

安全: 0

星标: 1

关注者: 1

分支: 3

语言:Twig

类型:shopware-platform-plugin

v2.0.0 2022-01-20 12:32 UTC

This package is auto-updated.

Last update: 2023-03-20 15:26:07 UTC


README

这是一个用于导航和产品详情页徽章的扩展。自定义徽章的文本设置在产品的自定义字段中。徽章的背景色和字体颜色可以通过配置或产品设置。当分配产品页面布局时,自定义徽章也会显示。在安装前,在 src 目录下的 SschreierProductBadge.php 文件中增加 NUMBER_BADGES 常量的值,您可以添加任意数量的徽章。

可能的徽章

  • 折扣徽章
  • 畅销徽章
  • 新品徽章
  • 缺货徽章
  • 自定义徽章

可能的配置

  • 选择是否在分类列表中显示任何徽章
  • 选择是否在产品详情页上显示任何徽章
  • 选择是否通过配置设置自定义或缺货徽章的颜色
  • 设置自定义或缺货徽章的背景色
  • 设置自定义或缺货徽章的字体色

可用的片段

  • badgeText
  • boxLabelDiscount

如何安装扩展

通过 Composer (推荐)

  1. 确保在项目 composer.json 中没有禁用 "packagist.org": false
  2. 通过 Composer 添加包 composer require flagbit/shopware-6-product-badge
  3. 刷新插件 bin/console plugin:refresh
  4. 安装并激活 bin/console plugin:install --activate SschreierProductBadge

通过下载和命令行

  1. 下载最新的 SschreierProductBadge-main.zip
  2. 解压 zip 文件并将文件夹重命名为 SschreierProductBadge
  3. 将文件夹移动到项目文件夹 custom/plugins/ .
  4. 通过 ssh 连接到控制台
bin/console plugin:refresh
bin/console plugin:install --activate SschreierProductBadge

通过 zip 上传

  1. 下载最新的 SschreierProductBadge-main.zip
  2. 解压 zip 文件并将文件夹重命名为 SschreierProductBadge
  3. 将文件夹压缩为 SschreierProductBadge.zip
  4. 在 Shopware 管理中上传 zip 文件。
  5. 安装并激活扩展。

图片

导航中的自定义徽章

custom badge in navigation

产品详情页上的自定义徽章

custom badge on product detail page

扩展配置部分 1

extension configuration part 1

扩展配置部分 2

extension configuration part 2

Shopware管理中的自定义徽章

custom badge in shopware administration