-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Usage and effect of substructure fields on the import process and the imported data is hard to grasp, which often leads to questions and misconfigurations. The documentation should be improved. Two pages mention this currently:
- https://docs.typo3.org/p/cobweb/external_import/8.1/en-us/User/MappingData/Index.html
- https://docs.typo3.org/p/cobweb/external_import/8.1/en-us/Administration/Columns/Index.html#administration-columns-properties-substructure-fields
And the following explanation, given in Slack, was deemed useful:
It's a bit hard to give you a full, correct configuration without knowing your TCA. However, the following may help: when defining substructure fields, 2 things happen: the rows of data being handled by External Import are actually multiplied by the number of rows in each substructure. In your example, there would be 2 rows for your product, one with the regular price, one with the premium price. And columns get added to each row, with the name of the columns being the keys of the substructure fields associative array. One of this key has to match the name of the parent column as it is this that will allow the match to be made between parent and children, and it has to map whatever piece of data is significant in your import. In your case, this would be the _id field.
You then reuse those fields in the children configuration.