Configure an import directory per site

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
cnoelker
Advanced
Posts: 140
Joined: 20 Feb 2016, 18:21

Configure an import directory per site

Post by cnoelker » 10 May 2020, 13:23

Hi,
I am preparing XML files for the import and put them into the directory which I configured in controller.php, e.g. jobs.product.import.xml.location= ... .
Afterwards, I start the import on the command line, e.g.
typo3cms aimeos:jobs product/import/xml default

Now, I have a second site. I can provide xml files in the same location and then run
typo3cms aimeos:jobs product/import/xml secondsite

This works fine. But in order not to mix up the import files (for either default site or the second site), I would like to configure two different import locations. With the scheduler, I can provide TypoScript per scheduler task. How can I provide TypoScript for the command line call?

Claudia

cnoelker
Advanced
Posts: 140
Joined: 20 Feb 2016, 18:21

Re: Configure an import directory per site

Post by cnoelker » 11 May 2020, 11:31

A second thought on this:

I am able to provide a second controller.php configuration with the import locations for the second site in an extension which applies only for the second site. The tx_aimeos.mshop.locale.site PageTS will be set to the site name of the second site.

Is aimeos:jobs smart enough to recognize the correct controller.php configuration based on the site name?

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Configure an import directory per site

Post by aimeos » 12 May 2020, 11:35

None of the variants will work because the CLI commands do only use the configuration they get and don't do a selection based on the site. Our plan in the future is to add the configuration you can add to the locale site object on top of the configuration object so you can set configuration for each site easily.

In the meantime your only option is to use the scheduler tasks where you can add configuration per task (and site).
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply