PHP code example of loevgaard / sylius-barcode-plugin
1. Go to this page and download the library: Download loevgaard/sylius-barcode-plugin library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
loevgaard / sylius-barcode-plugin example snippets
// config/bundles.php
return [
// ...
Setono\DoctrineORMBatcherBundle\SetonoDoctrineORMBatcherBundle::class => ['all' => true],
Loevgaard\SyliusBarcodePlugin\LoevgaardSyliusBarcodePlugin::class => ['all' => true],
// ...
];
// src/Entity/ProductVariant.php
declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Loevgaard\SyliusBarcodePlugin\Model\ProductVariantInterface as LoevgaardSyliusBarcodePluginProductVariantInterface;
use Loevgaard\SyliusBarcodePlugin\Model\ProductVariantTrait as LoevgaardSyliusBarcodePluginProductVariantTrait;
use Sylius\Component\Core\Model\ProductVariant as BaseProductVariant;
/**
* @ORM\Entity
* @ORM\Table(name="sylius_product_variant")
*/
class ProductVariant extends BaseProductVariant implements LoevgaardSyliusBarcodePluginProductVariantInterface
{
use LoevgaardSyliusBarcodePluginProductVariantTrait;
// ...
}