Download the PHP package loevgaard/sylius-barcode-plugin without Composer
On this page you can find all versions of the php package loevgaard/sylius-barcode-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download loevgaard/sylius-barcode-plugin
More information about loevgaard/sylius-barcode-plugin
Files in loevgaard/sylius-barcode-plugin
Package sylius-barcode-plugin
Short Description Add barcodes to your products using this plugin
License MIT
Informations about the package sylius-barcode-plugin
Sylius Barcode Plugin
Add barcodes to your products.
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 the config/bundles.php
file of your project:
Note that adding SetonoDoctrineORMBatcherBundle
also required.
Step 3: Configure the plugin
Step 4: Import product variant trait
NOTE: If you haven't extended the ProductVariant
entity yet, follow the customization instructions first because you need to add a bit more configuration:
Step 5: Update your database schema
Step 6: Add form widgets to twig templates
You need to override the template displaying the product and product variant form and add a form_row
statement with the barcode:
If you haven't overridden the template yet, you can just copy the templates from vendor/loevgaard/sylius-barcode-plugin/src/Resources/views/SyliusAdminBundle
to templates/bundles/SyliusAdminBundle/
Step 7: Add validator constraint
Create config/validator/ProductVariant.xml
:
Like it configured at example application.
Step 8: Using asynchronous transport (optional, but recommended)
All commands in this plugin will extend the CommandInterface. Therefore you can route all commands easily by adding this to your Messenger config:
Usage
Run the check command:
This will mark all product variant as checked and updated the field barcodeValid
to either true or false depending on the result of the check.
All versions of sylius-barcode-plugin with dependencies
doctrine/persistence Version ^1.3 || ^2.0
setono/doctrine-orm-batcher-bundle Version ^0.3.1
sylius/sylius Version ^1.3
symfony/config Version ^4.4 || ^5.4
symfony/event-dispatcher Version ^4.4 || ^5.4
symfony/event-dispatcher-contracts Version ^1.0 || ^2.0 || ^3.0
symfony/messenger Version ^4.4 || ^5.4
thecodingmachine/safe Version ^1.0
violuke/php-barcodes Version ^1.0