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

Simple Product Import - Categories Field #13

Open
techteamus opened this issue Jul 29, 2016 · 2 comments
Open

Simple Product Import - Categories Field #13

techteamus opened this issue Jul 29, 2016 · 2 comments

Comments

@techteamus
Copy link

Thank you for the module it is exactly what I am looking for.

Could we have clarification of the format of the categories field during simple product import.

For the other fields I have followed the guidelines as for a standard CSV import but when I try this with 'categories' things do not work out as expected. The Magento documentation gives this as an example:

Default Category/Gear|Default Category/Gear/Bags

More than one category can specified using the pipe "|" symbol to separate the category paths.

This does not work with the FireGento import, it took some experimentation to find out that the separator for category paths was "," which causes even more problems if you have comma's in the category names.

Once those issues were understood the simple product worked just fine creating the appropriate categories dynamically.

@EliasKotlyar
Copy link
Contributor

Hello Techteamus,

I figured out a solution for that Problem, and integrated it into the module:

You can now pass the Field-Separator trough a extra Parameter. With this feature , you are able to change the default separator from "," to "|" or any other character.

Just call "setMultipleValueSeparator" on the Import Model, and you are good to go. I have tested it with categorys which include an "," and its working.

Greetings
Elias

@leptoquark1
Copy link

Sorry to push this issue, but I concern that in the M1 Module of firegento import I used the categoryIds in a nested array to set the categories for a product. In M2 module I set importmodel to nested arrays but in not seem to work that way anymore:

$adapterFactory = $this->getObjectManager()->create('FireGento\FastSimpleImport\Model\Adapters\NestedArrayAdapterFactory');
$this->getImporter()->setImportAdapterFactory($adapterFactory);

Do I have to set the value of 'categories' to the full path of the category as a string or is there a way to avoid this and use the id's again?

I realized a simular issue with the visibility that accept just comma seperated strings instead of the actually correct value that I have expected:

$productEntry[\Magento\Catalog\Model\Product::VISIBILITY] =        'Catalog, Search'; // works
$productEntry[\Magento\Catalog\Model\Product::VISIBILITY] =        \Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH; //works not

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

No branches or pull requests

3 participants