avarel / sw-attribute-installer
Shopware 5 属性安装器
1.0
2019-10-06 09:33 UTC
Requires
- php: ^7.2
- shopware/shopware: ^5.6
This package is auto-updated.
Last update: 2024-09-06 22:38:45 UTC
README
本包提供了一个基于yaml配置的属性安装命令。这是为了与Shopware 5的composer骨架一起使用。
安装
安装此包
$ composer require avarel/sw-attribute-installer
在您的./app/services.xml中启用它
<imports> <import resource="../vendor/avarel/sw-attribute-installer/src/Resources/services.xml"/> </imports>
设置
在您希望的位置定义一个YAML文件。
配置您的字段
attributes: s_articles_attributes: recommended_retail_price: type: 'float' label: 'UVP' displayInBackend: true rating_image: type: 'single_selection' label: 'Image' displayInBackend: true entity: 'Shopware\Models\Media\Media' s_categories_attributes: is_bold: type: 'boolean' label: 'Kategoriename fettgeschrieben darstellen?' displayInBackend: true
执行命令
使用此命令安装属性
$ php ./bin/console avarel:attributes:install /path/to/attributes.yml