Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create Families using csv import #1218

Closed
mannydoaba opened this issue Jul 2, 2014 · 3 comments
Closed

How to create Families using csv import #1218

mannydoaba opened this issue Jul 2, 2014 · 3 comments
Labels

Comments

@mannydoaba
Copy link

I was able to create Categories, Attributes and Attributes Options using CSV Import. but I don't see a way to import families

@nidup
Copy link
Contributor

nidup commented Jul 2, 2014

Hi mannydoaba,

The installer fixtures allows to import these data (format yml) when you setup a PIM project, here an example of data https://github.com/akeneo/pim-community-dev/tree/1.1/src/Pim/Bundle/InstallerBundle/Resources/fixtures/demo_dev

This data set is defined in app/config/parameters.yml and is installed with the pim:install command, you can define your own set.

We don't have this native csv import job for now and don't have plan to implement it in a near future.

I can give you some hints to implement it, if you would contribute it, we would be glad to help, review and merge your pull request. A good start point about connector part http://docs.akeneo.com/1.1/index.html

The expected csv format could be the following,

code;label-en_US;label-fr_FR;attributes;attributeAsLabel;requirements-ecommerce;requirements-mobile
mug;Mug;Tasse;sku,name,short_description,manufacturer,color,price,weight;name;sku,name,color,price;sku,color

en_US and fr_FR are locales, ecommerce and mobile are the channels.

You can define a new csv_family_import job by taking inspiration from existing one https://github.com/akeneo/pim-community-dev/blob/1.1/src/Pim/Bundle/BaseConnectorBundle/Resources/config/batch_jobs.yml#L91

I think you can use the processor pim_base_connector.processor.family in the new job as we use it for the family import with yml format https://github.com/akeneo/pim-community-dev/blob/1.1/src/Pim/Bundle/BaseConnectorBundle/Resources/config/processors.yml#L101

Let me know if you begin to implement it and if encounter any issue.

Thank you,

@nidup nidup added the question label Aug 12, 2014
@nidup nidup closed this as completed Aug 12, 2014
@mrVrAlex
Copy link
Contributor

mrVrAlex commented Mar 1, 2015

I implemented family import like I said above, but I got this error:

Neither the property "requirements" nor one of the methods "setRequirements()", "__set()" or "__call()" exist and have public access in class "Pim\Bundle\CatalogBundle\Entity\FamilyTranslation". 

Akeneo PIM v1.3.1
Used for batch job:
processor: pim_base_connector.processor.family
writer: pim_base_connector.writer.doctrine

@panploenes
Copy link

Im stuck there too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants