flagbit/table-attribute-bundle

The Flagbit Table Attribute Bundle for Akeneo PIM gives you the possibility to enrich your product with multi-dimensional data presentation in the form of tables, allowing you maximum flexibility within the PIM.

Installs: 3 661

Dependents: 0

Suggesters: 0

Security: 0

Stars: 14

Watchers: 19

Forks: 14

Open Issues: 11

Language:JavaScript

v4.0.0 2020-05-28 08:38 UTC

README

Adds the new attribute type Table for Akeneo products.

68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f666c61676269742f616b656e656f2d7461626c652d6174747269627574652d62756e646c652f6d61737465722e7376673f7374796c653d666c61742d737175617265 68747470733a2f2f706f7365722e707567782e6f72672f666c61676269742f7461626c652d6174747269627574652d62756e646c652f646f776e6c6f6164733f666f726d61743d666c61742d737175617265 68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f666c61676269742f616b656e656f2d7461626c652d6174747269627574652d62756e646c652e7376673f7374796c653d666c61742d737175617265 68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666c61676269742f7461626c652d6174747269627574652d62756e646c652e7376673f7374796c653d666c61742d737175617265 68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265

Key FeaturesInstallationCompatibilityDevelopmentContributing

Key Features

Provides a table as attribute type where you can define a set of columns of different types and validation rules.

Column Types

  • Text
  • Number (Integer or Decimal)
  • Simple select
  • Simple select from URL

Import/Export

The extension supports the standard Akeneo product import/export, so you don't need to create any special import/export profile for table information.

All product information related to attributes of type table will be imported/exported as JSON.

Installation

Simply install the package with the following command:

composer require flagbit/table-attribute-bundle

Enable the bundle

Enable the bundle in the kernel:

<?php
// config/bundles.php

return [
    // ...
    Flagbit\Bundle\TableAttributeBundle\FlagbitTableAttributeBundle::class => ['all' => true],
];

Configuration

Add mapping_overrides in a new config/packages/table.yml file or an existing one:

akeneo_storage_utils:
    mapping_overrides:
        -
            original: Akeneo\Pim\Structure\Component\Model\AttributeOption
            override: Flagbit\Bundle\TableAttributeBundle\Entity\AttributeOption

Clear the cache:

php bin/console --env=prod cache:clear

Update the database schema:

php bin/console --env=prod doctrine:schema:update --force

Build and install the new front-end dependencies (new icon, etc.)

make cache assets css javascript-prod

In case you're using Doctrine migrations, you have to create a new migration class

php bin/console --env=prod doctrine:migration:diff

and migrate the schema updates:

php bin/console --env=prod doctrine:migrations:migrate

Compatibility

This extension supports the latest Akeneo PIM CE/EE stable versions:

  • 4.0
  • 3.2 (LTS)
  • 3.0 (LTS)
  • 2.3 (LTS)

Development

Running Test-Suits

The TableAttributeBundle is covered with tests and every change and addition has also to be covered with unit or/and integration tests. It uses two testing suits: PHPSpec and PHPUnit.

To run the tests you have to change to this project's root directory and run the following commands in your console:

vendor/bin/phpunit
vendor/bin/phpspec run

Coding style

TableAttributeBundle uses the PSR-2 coding style and can be checked with Codesniffer.

vendor/bin/phpcs --standard=PSR2 --extensions=php ./src

Contributing

Contributions are always welcome! Please have a look at the contribution guidelines first.

License

The TableAttributeBundle is licensed under the MIT License - see the LICENSE file for details.

Supported with ❤ by Flagbit GmbH & Co. KG