Download the PHP package loevgaard/sylius-brand-plugin without Composer
On this page you can find all versions of the php package loevgaard/sylius-brand-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download loevgaard/sylius-brand-plugin
More information about loevgaard/sylius-brand-plugin
Files in loevgaard/sylius-brand-plugin
Package sylius-brand-plugin
Short Description A Sylius plugin for handling brands
License MIT
Informations about the package sylius-brand-plugin
Sylius Brand Plugin
If you want to add a brand to your products this is the plugin to use. Use cases:
- Add brand logo to your product pages
- Filter by brand in the frontend or backend, i.e. product lists
Screenshots
CLICK TO SEE
Menu: ![Screenshot showing admin menu](docs/images/admin-menu-with-brand.png) Brand admin pages: ![Screenshot showing brand admin index page](docs/images/admin-brand-index.png) ![Screenshot showing brand admin update page](docs/images/admin-brand-update.png) ![Screenshot showing brand admin media tab at update page](docs/images/admin-brand-update-tab-media.png) Products admin pages: ![Screenshot showing product admin index page with brand filter](docs/images/admin-product-index-filter-with-brand.png) ![Screenshot showing product admin index page with brand column](docs/images/admin-product-index-brand-column.png) ![Screenshot showing brand tab at product admin update page](docs/images/admin-product-update-tab-brand.png)Installation
Step 1: Download the plugin
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the plugin
Then, enable the plugin by adding it to the list of registered plugins/bundles
in config/bundles.php
file of your project before (!) SyliusGridBundle
:
Step 3: Configure the plugin
Step 4: Extend services and entities
Extend Product
-
If you use
annotations
mapping: - If you use
xml
mapping:
Extend ProductRepository
Configure
Step 5: Update your database schema
Fixtures
-
Include prefedined brand fixtures to play with on your dev environment:
-
Or write your own:
-
Add a new yaml file to the folder
config/packages
and name it as you wish, e.g.my_own_fixtures.yaml
. - Fill this yaml with your own brand fixtures and don't forget to declare the definition of your product(s) before this brand definition or use existing product(s) code.
See example at
src/Resources/config/app/fixtures.yaml
.- Load your fixtures
-
Installation and usage for plugin development
To run test application to play with just type composer try
.
Sonata blocks available
loevgaard_sylius_brand.admin.brand.create.tab_details
loevgaard_sylius_brand.admin.brand.update.tab_details
loevgaard_sylius_brand.admin.brand.create.tab_media
loevgaard_sylius_brand.admin.brand.update.tab_media
Events available
loevgaard_sylius_brand.menu.admin.brand.form
to customizeBrand
admin form like you usually do withProduct
form viasylius.menu.admin.product.form
event.
Testing
Play with API
-
Install https://stedolan.github.io/jq/ (type
brew install jq
at OSX terminal) -
Get admin API access token:
-
Make requests:
(
GET
requests indexing/showing resources shown here as an example, seetests/Controller/*ApiTest.php
to discover more details about creating/updating/removing brand-related resources, creating new products with brand attached to it, uploading image files forBrandImages
via API)To Brands admin API:
Brand images API:
Brand images by type API:
Brand products API:
Product details API:
For XML output, add
-H "Accept: application/xml"
to request
Contribute
Please, run composer all
to run all checks and tests before committing.
Contribute by translating
We use the same service as Sylius for translating, namely Crowdin. You can help out by translating this project into your mother tongue ;)
Thanks!