Installation

Prerequisites

  • An Akeneo CE project (minimum supported version 4.x)
  • Akeneo runs on a server with CRON installed
  • Composer
  • A Bynder instance

Installing the connector

Add our packages.induxx.be repository to the composer.json of the Akeneo CE project.

{
  "repositories": [
    {
      "type": "composer",
      "url": "packages.induxx.be"
    }
  ]
}

Install the connector using Composer

composer require induxx/akeneo-bynder-bundle

Add the following lines to /config/bundles.php

Induxx\Bundle\BynderBundle\InduxxBynderBundle::class => ['all' => true],
Induxx\Bundle\CredentialsManagerBundle\InduxxCredentialsManagerBundle::class => ['all' => true],

Add the necessary routes to config/routes/bynder.yml

bynder_media:
    resource: "@InduxxBynderBundle/Resources/config/routing/bynder_media.yml"

Add the necessary routes to /config/routes/credentials_manager.yml

induxx_credentials_manager:
  resource: "@InduxxCredentialsManagerBundle/Resources/config/routing.yml"
  prefix:   /induxx/

Add the new parameters in the /config/services/services.yml

parameters:
    tmp_storage_dir:    '%kernel.project_dir%/var/tmp/file_storage'
    kernel_secrets_dir: '%kernel.project_dir%/config/secrets'

Add the new catalog storage adapter configuration to /config/packages/oneup_flysystem.yml or /config/packages/<environment>/oneup_flysystem.yml

oneup_flysystem:
    adapters:
        catalog_storage_adapter:
            custom:
                service: induxx.bynder.adapter

Create the yaml file config/services/bynder_attribute_mappings.yml with the content below.

parameters:
    asset_type_metaproperty_options_mappings: [ ]
    metaproperty_mappings:
        'product_code': ''
        'product_model_code': ''
        'asset_type': ''
        'sort_order': ''
    sortable_asset_type_metaproperty_mappings: []
    enrichment_metaproperty_mappings: []
    enrichment_metaproperty_options_mappings: []
    enrichment_metaproperty_locale_mappings: []
    derivative_to_use: 'original'
    asset_unlink_after_archiving: true
    update_metaproperty_on_empty_only_mappings: []

We will ellaborate on this file in the next chapter to provide the connector with the correct mappings and configuration.

The ‘autoload’-section of the composer.json file should contain the the FileUploader.php path and namespace under ‘files’ and ‘exclude-from-classmap’

{
  "autoload": {
    "psr-0": {
      "": "src/"
    },
    "files": [
      "src/Bynder/Api/Impl/Upload/FileUploader.php"
    ],
    "psr-4": {
      "Pim\\Upgrade\\": "upgrades/"
    },
    "exclude-from-classmap": [
      "vendor/akeneo/pim-community-dev/src/Kernel.php",
      "vendor/bynder/bynder-php-sdk/src/Bynder/Api/Impl/Upload/FileUploader.php"
    ]
  }
}

Unzip Bynder.zip located in the bundle in the src folder of the project (/src/Bynder/..)

Lastly, make sure you recompile the frontend assets running make front and run a composer dump-autoload to reflect the changes made in the composer.json file.