Coder Social home page Coder Social logo

excelinitbundle's Introduction

Excel Init Bundle

Build Status

alt text

This bundle adds support of Excel XSLX files as a source for initializing catalog structure for Akeneo PIM.

This extension replaces the ExcelConnectorBundle for Akeneo PIM >= 1.6. Be carefull to use the new init.xlsx file of this bundle as there are some structure modifications.

Note: this bundle is not compatible with Excel 2003 xls files. Editing the XLSX file with LibreOffice/OpenOffice is also not supported as it can lead to unwanted behavior.

Requirements

ExcelInitBundle Akeneo PIM Community Edition
v3.0.* >= v3.0
v2.1.* >= v2.2 - < 3.0
v2.0.* v2.0 - v2.1
v1.2.* v1.7.*
v1.1.* v1.6.*
v1.0.* v1.6.*

Installation

From your application root:

    php composer.phar require --prefer-dist akeneo/excel-init-bundle:3.0

Enable the bundle in the app/AppKernel.php file in the registerProjectBundles() method:

    $bundles = [
        // ...
        new Pim\Bundle\ExcelInitBundle\PimExcelInitBundle(),
    ]

Now let's clean your cache and dump your assets:

    php bin/console cache:warmup --env=prod
    php bin/console pim:installer:assets --env=prod

Documentation

Getting started

See doc/Getting started for more details on how to set your catalog structure using the init.xslx file.

See doc folder for more details on how to set your catalog structure.

Supported file

Input file must follow init.xslx structure.

Note that the file should be opened with Excel. LibreOffice/OpenOffice are not fully in compliance with validations data that are available in the spreadsheet.

Troubleshooting

The import fails when importing families

Check that your channels names are correct in both family and channel tabs. You might have a typo in the channels tab and not in the family tab. You will have to remove the mispelled channel once you corrected this.

Dev notes

Unit tests

You can launch the PHPSpec tests with the provided docker-compose.yml file:

docker-compose pull
docker-compose up -d
docker-compose exec fpm composer install --prefer-dist
docker-compose exec fpm ./bin/phpspec run

excelinitbundle's People

Contributors

a-ast avatar anaelchardan avatar clementgautier avatar fitn avatar francescopis avatar frverdeja avatar jmleroux avatar maximequeneau avatar mmetayer avatar nei avatar pchasle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

excelinitbundle's Issues

EE Jobs for completeness breaks product save

There are 2 missing job setup for PIM EE that breaks the product save.

[2017-03-29 13:37:11] request.CRITICAL: Uncaught PHP Exception RuntimeException: "Cannot run refresh project completeness, there is no available job" at /akeneo-ee/vendor/akeneo/pim-enterprise-dev/src/PimEnterprise/Bundle/TeamworkAssistantBundle/Job/RefreshProjectCompletenessJobLauncher.php line 64 {"exception":"[object] (RuntimeException(code: 0): Cannot run refresh project completeness, there is no available job at /akeneo-ee/vendor/akeneo/pim-enterprise-dev/src/PimEnterprise/Bundle/TeamworkAssistantBundle/Job/RefreshProjectCompletenessJobLauncher.php:64)"} []

I have it fixed, will PR.

Boolean attributes are not valid

Hi,

We have some attributes that are booleans and is required for completeness. After loading the init file we try to create a product and we get errors on the completness saying we must specify a value.. On the interface the switch is off, but to pass the completeness validation I must turn it on and off again.

Common documentation

We must find a way to have a documentation easier to maintain.
Currently, we must maintain the README tab of all init.xlsx examples files. This can lead to synchronisation problems.

Maybe just add a link in the README tab to a common documentation on this repo would be better.

Enable a "initxlsx" import profile

We could create a special import profile to initialise the catalog fom the UI.
This feature existed in the ExcelConnector bundle. It was not recommended, but was nevertheless used.

Error Load Data before trying to read

I am getting this warning message ans after that a fatal error. It does not show much information where is the issue. There is a way to have debug messages to see what is going on during this process?

[2017-01-23 18:24:04] translation.WARNING: Translation not found. {"id":"Warning: XMLReader::read(): Load Data before trying to read","domain":"messages","locale":"en"} []
[2017-01-23 18:24:04] batch.ERROR: Encountered an error executing the step: Warning: XMLReader::read(): Load Data before trying to read [] []

Fixtures fixtures_currency_csv has been successfully executed.
[2017-01-23 18:24:04] translation.WARNING: Translation not found. {"id":"Warning: XMLReader::read(): Load Data before trying to read","domain":"messages","locale":"en"}
[2017-01-23 18:24:04] batch.ERROR: Encountered an error executing the step: Warning: XMLReader::read(): Load Data before trying to read
An error occurred during the fixtures execution.
Error #0 in class Symfony\Component\Debug\Exception\ContextErrorException: Warning: XMLReader::read(): Load Data before trying to read
#0 [internal function]: Symfony\Component\Debug\ErrorHandler->handleError(2, 'XMLReader::read...', '/Users/neisanto...', 103, Array)
#1 /akeneo-ee/vendor/box/spout/src/Spout/Reader/Wrapper/XMLReader.php(103): XMLReader->read()
#2 /akeneo-ee/vendor/box/spout/src/Spout/Reader/XLSX/RowIterator.php(138): Box\Spout\Reader\Wrapper\XMLReader->read()
#3 /akeneo-ee/vendor/akeneo/excel-init-bundle/src/Iterator/InitFileIterator.php(82): Box\Spout\Reader\XLSX\RowIterator->next()

Errors with init bundle & akeneo 1.6 EE

First problem
In Akeneo 1.6EE and the minimal installer, the command php app/console pim:installer:db fails with an error looking for init.xlsx in the enterprise minimal bundle.

Second problem
With a custom installer bundle & Akeneo 1.6EE, the command fails because the user_groups.csv file must be imported before the init file so that the category can be imported with an existing user group.

[2016-09-29 15:47:41] batch.ERROR: Encountered an error executing the step: Catchable Fatal Error: Argument 2 passed to PimEnterprise\Bundle\SecurityBundle\Manager\CategoryAccessManager::buildGrantAccess() must be an instance of Oro\Bundle\UserBundle\Entity\Group, null given, called in /home/smile/pim/vendor/akeneo/pim-enterprise-dev/src/PimEnterprise/Bundle/SecurityBundle/Manager/CategoryAccessManager.php on line 154 and defined

We put a position of 15 to the user_group.csv import to solve the problem and import it before the init file.

Charlotte

ReadMe update for 2.0

Change the command lines in the ReadMe install instructions
$ php bin/console cache:clear --no-warmup --env=prod
$ php bin/console pim:installer:assets --symlink --clean --env=prod

(always used app/console from 1.7)

Improve error messages and or log

Error messages and logs management are left to the parent classes, but they are not very well processed.
I should think of a way to improve this point.

Akeneo 2.1.*

Please check if is it compatible with akeneo 2.1.* and change composer requirements

Crash when trying to import families

Hi,

I'm going to migrate my Akeneo from 1.5 to 1.6 and i've got some troubles with the init.xlsx import.

When i launch the import process, it already crashed cause of Family import. As you you said in README.md, i check the code / name of channels in channel tab, but it still does not works.

What do i have to check too ?

Thanks for support.

Jonathan

asset_categories.csv not being imported on 1.7 EE

It seems the init is broken for 1.7 EE.

When it try to load the asset_categories.csv it break with this error.

[2017-03-27 15:58:51] translation.WARNING: Translation not found. {"id":"Catchable Fatal Error: Argument 2 passed to PimEnterprise\\Bundle\\SecurityBundle\\Manager\\CategoryAccessManager::buildGrantAccess() must implement interface Pim\\Component\\User\\Model\\GroupInterface, null given, called in /akeneo-ee/vendor/akeneo/pim-enterprise-dev/src/PimEnterprise/Bundle/SecurityBundle/Manager/CategoryAccessManager.php on line 160 and defined","domain":"messages","locale":"en"}

If I comment out the content of this file and the access file it works.

Full example of init.xlsx

We've upgraded PIM to 1.7.1 and the init bundle to 1.2.*. The init.xlsx is not compatible but we don't have a full version of init file to see how it should looks like and fix ours.

Add all fixtures in Excel

Due to the new import process, it would be simple to include all fixtures in the excel file:

  • currencies
  • locales
  • user groups
  • user roles
  • users

There would be only jobs.yml left alone.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.