avarel / sw-attribute-installer
Shopware 5 attribute installer
1.0
2019-10-06 09:33 UTC
Requires
- php: ^7.2
- shopware/shopware: ^5.6
This package is auto-updated.
Last update: 2024-04-06 21:46:02 UTC
README
This package provides a attribute install command based on a yaml config. This is intended to work with the composer skeleton of shopware 5
Installation
Install the package:
$ composer require avarel/sw-attribute-installer
Enable it in your ./app/services.xml:
<imports> <import resource="../vendor/avarel/sw-attribute-installer/src/Resources/services.xml"/> </imports>
Setup
Define a YAML file anywhere you want.
Configure your fields:
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
Execute the command
Use this command to install the attributes
$ php ./bin/console avarel:attributes:install /path/to/attributes.yml