PHP code example of fabit / sylius-odoo-product-plugin
1. Go to this page and download the library: Download fabit/sylius-odoo-product-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/ */
fabit / sylius-odoo-product-plugin example snippets
namespace App\Entity\Product;
use Doctrine\ORM\Mapping as ORM;
use Sylius\Component\Core\Model\Product as BaseProduct;
use Sylius\Component\Product\Model\ProductTranslationInterface;
use Fabit\SyliusOdooProductPlugin\Traits\ProductTrait;
/**
* @ORM\Entity
* @ORM\Table(name="sylius_product", indexes={
* @ORM\Index(name="sylius_odoo_product_plugin_odoo_product_tmpl_id", columns={"odoo_product_tmpl_id"})
* })
*/
class Product extends BaseProduct
{
use ProductTrait;
namespace App\Entity\Product;
use Doctrine\ORM\Mapping as ORM;
use Sylius\Component\Core\Model\ProductVariant as BaseProductVariant;
use Sylius\Component\Product\Model\ProductVariantTranslationInterface;
use Fabit\SyliusOdooProductPlugin\Traits\ProductVariantTrait;
/**
* @ORM\Entity
* @ORM\Table(name="sylius_product_variant", indexes={
* @ORM\Index(name="sylius_odoo_product_plugin_odoo_product_variant_id", columns={"odoo_product_variant_id"})
* })
*/
class ProductVariant extends BaseProductVariant
{
use ProductVariantTrait;
config/bundles.php
src/Entity/Product/Product.php
src/Entity/Product/ProductVariant.php
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.