Link to a second CSV in a list #317
Replies: 2 comments
-
Hi. The way I would do this is with a user function that triggers another import, using the API that External Import provides (see https://docs.typo3.org/p/cobweb/external_import/7.2/en-us/Developer/Api/Index.html#import-api). It would rely on a configuration that does not have a connector information and it would be up to your user function to get the data (you can still use the connector service, but have to call it programmatically yourself) and pass the data to the Importer. I have a similar scenario myself, where I import real estate items, and for each item, I need to call the provided API to retrieve the brokers related to that item. This is done in a user function, which imports the brokers (if needed) and maps them to their primary keys. The user function returns a comma-separated list of uids from the brokers table. I hope this is helpful. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply, I'll try it out later after work. 👍 |
Beta Was this translation helpful? Give feedback.
-
Hi,
thanks for the great extension :)
I have set everything up and am importing a CSV with a list of product feeds. In these entries there is a link to another CSV with the corresponding products. Now I'm not sure how best to implement this and would like some advice.
I am trying to visualize the scenario:
FeedList.csv is mapped to model "Feed".
The CSV looks something like this:
feed1.csv: is mapped to model "Product"
I would like to map these entries from the "ProductsLink" field to the "Product" model and reference them via mm-table with feed data record.
Can the importer handle something like this, that something is reloaded during import? Otherwise I would have tried the following, which is not particularly "nice":
But this is not nice, because in this case I create a database connection in my TCA/Overrides/products.php to extend the TCA dynamically.
Surely there is a more elegant solution for this?
Beta Was this translation helpful? Give feedback.
All reactions