PHPackages                             fabit/sylius-odoo-product-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fabit/sylius-odoo-product-plugin

ActiveSylius-plugin[Utility &amp; Helpers](/categories/utility)

fabit/sylius-odoo-product-plugin
================================

Odoo product sync plugin for Sylius applications.

v1.0.0(3y ago)0101MITPHPPHP ^7.4|^8.0|^8.1

Since Apr 17Pushed 3y ago1 watchersCompare

[ Source](https://github.com/FabITSolutions/sylius-odoo-product-plugin)[ Packagist](https://packagist.org/packages/fabit/sylius-odoo-product-plugin)[ RSS](/packages/fabit-sylius-odoo-product-plugin/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (25)Versions (2)Used By (0)

 [ ![](https://camo.githubusercontent.com/660026e32ad74d4491594e860f5bcd7313508eedbba4918ab87d8f50d1eba820/68747470733a2f2f7777772e6661626974736f6c7574696f6e732e696e2f7765622f696d6167652f776562736974652f312f6c6f676f2f4661622532304954253230536f6c7574696f6e73) ](https://www.fabitsolutions.in/r/knk)

Fabit Odoo Product Plugin Skeleton
==================================

[](#fabit-odoo-product-plugin-skeleton)

This plugin sync Odoo products into Sylius Documentation
-------------

[](#documentation)

For a comprehensive guide on Sylius plugin development please go to Sylius documentation, there you will find the [Plugin Development Guide](https://docs.sylius.com/en/latest/plugin-development-guide/index.html), that is full of examples.

Quickstart Installation
-----------------------

[](#quickstart-installation)

- Create new file \[project\]/\]config/packages/sylius\_odoo\_product.yaml and copy configuraiton into it

```
sylius_odoo_product:
    data_transform:
        product:
            mapping:
                -
                    sylius_field: id
                    odoo_field: id
                    required: true
                    default: ''
                    allow_types: [int, 'null']
                -
                    sylius_field: productTmplId
                    odoo_field: product_tmpl_id
                    required: true
                    default: ''
                    allow_types: [int, 'null']
                -
                    sylius_field: code
                    odoo_field: code
                    required: true
                    default: ''
                    allow_types: [string, 'null']
                -
                    sylius_field: name
                    odoo_field: name
                    required: true
                    default: ''
                    allow_types: [string, 'null']
                -
                    sylius_field: description
                    odoo_field: description
                    required: true
                    default: ''
                    allow_types: [string, 'null']
                -
                    sylius_field: categId
                    odoo_field: categ_id
                    required: false
                    default: [ ]
                    allow_types: [array]
                -
                    sylius_field: lst_price
                    odoo_field: lst_price
                    required: true
                    default: ''
                    allow_types: [float]
                -
                    sylius_field: taxes_id
                    odoo_field: taxes_id
                    required: false
                    default: [ ]
                    allow_types: [array]
                -
                    sylius_field: image1920
                    odoo_field: image_1920
                    required: true
                    default: null
                    allow_types: [string, boolean, 'null']
                -
                    sylius_field: active
                    odoo_field: active
                    required: true
                    default: null
                    allow_types: [string, boolean, 'null']

        tax:
            mapping:
                -
                    sylius_field: code
                    odoo_field: id
                    required: true
                    default: ''
                    allow_types: [string, 'null']
                -
                    sylius_field: name
                    odoo_field: name
                    required: true
                    default: ''
                    allow_types: [string, 'null']
                -
                    sylius_field: description
                    odoo_field: description
                    required: true
                    default: ''
                    allow_types: [string, 'null', 'bool']
                -
                    sylius_field: amount
                    odoo_field: amount
                    required: true
                    default: ''
                    allow_types: [float, 'null']
        category:
            mapping:
                -
                    sylius_field: code
                    odoo_field: id
                    required: true
                    default: ''
                    allow_types: [string, 'null']
                -
                    sylius_field: name
                    odoo_field: name
                    required: true
                    default: ''
                    allow_types: [string, 'null']
                -
                    sylius_field: parent
                    odoo_field: parent_id
                    required: true
                    default: ''
                    allow_types: [string, 'null']

```

- Run composer to add dependancy

    `composer require fabit/sylius-odoo-product-plugin`
- Add following entry in `config/bundles.php`

    `Fabit\SyliusOdooProductPlugin\SyliusOdooProductPlugin::class => ['all' => true]`
- Add route entry in `config/routes.yaml`

```
fabit_sylius_odoo_product_plugin:
    resource: "@SyliusOdooProductPlugin/Resources/config/routing.yaml"
```

- Override the Product Entity `src/Entity/Product/Product.php`, Add ProductTrait to your Product entity

```
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;
```

- Override the ProductVariant Entity `src/Entity/Product/ProductVariant.php`, Add ProductVariantTrait to your ProductVariant entity

```
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;
```

- Add following variables in .env file

    ```
    ###> fabit/sylius-odoo-product-plugin ###
    odoo_url=https://demo.odoo.com
    odoo_db=odoo-datbase
    odoo_user=odoo-user
    odoo_password=odoo-password
    odoo_live_stock=True
    odoo_enable=1
    ###> fabit/sylius-odoo-product-plugin ###

    ```

### Sylius basic intallation

[](#sylius-basic-intallation)

- Run following command to install install Sylius `php bin/console sylius:install`

    - note: on a demo Odoo, use `en_EN` as localization
- Make sure media directory has write permission
- Setup Country &amp; Zone

```
INSERT INTO `sylius_country` (`id`, `code`, `enabled`) VALUES
(NULL, 'FR', 1);
INSERT INTO `sylius_zone` (`id`, `code`, `name`, `type`, `scope`) VALUES
(NULL, 'FR', 'France', 'country', 'all');
INSERT INTO `sylius_zone_member` (`id`, `belongs_to`, `code`) VALUES
(NULL, 1, 'FR');
```

### Execute Odoo commands

[](#execute-odoo-commands)

- Update database table, Run command to update database schema

    `php bin/console doctrine:schema:update --force`
- Run following command to import all categories

    `php bin/console odoo:category:import`
- Run following command to import all taxes

    `php bin/console odoo:tax:import`
- Run following command to import all taxes

    `php bin/console odoo:product:import`

### Sylius after Odoo Sync

[](#sylius-after-odoo-sync)

- Choose Odoo category "All" in Configuration -&gt; Channel
- Choose Delivery method
- Choose Payment method

***! ENJOY THE DEMO !***

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1121d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/899bc2046eb0e8c1f4e21842aba8c4de9d81414b0bb3e88645bd31e14370e50a?d=identicon)[Fab IT Solutions](/maintainers/Fab%20IT%20Solutions)

---

Tags

syliussylius-plugin

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/fabit-sylius-odoo-product-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/fabit-sylius-odoo-product-plugin/health.svg)](https://phpackages.com/packages/fabit-sylius-odoo-product-plugin)
```

###  Alternatives

[sylius/refund-plugin

Plugin provides basic refunds functionality for Sylius application.

691.7M14](/packages/sylius-refund-plugin)[stefandoorn/sitemap-plugin

Sitemap Plugin for Sylius

851.0M](/packages/stefandoorn-sitemap-plugin)[synolia/sylius-scheduler-command-plugin

Scheduler Command Plugin.

34361.5k](/packages/synolia-sylius-scheduler-command-plugin)[monsieurbiz/sylius-rich-editor-plugin

A Rich Editor plugin for Sylius.

75380.8k6](/packages/monsieurbiz-sylius-rich-editor-plugin)[tilleuls/sylius-click-n-collect-plugin

Click and Collect plugin for Sylius, to sell and deliver securely during the COVID-19 pandemic.

7814.2k](/packages/tilleuls-sylius-click-n-collect-plugin)[odiseoteam/sylius-blog-plugin

This plugin add blog capabilities to your Sylius project

37104.5k](/packages/odiseoteam-sylius-blog-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
