Skip to main content

Import

Uploading the files with the property data

You can import your own property data or the demo data. You can only import your own property data with the full version.

If you want to download the demo data first, select Maklermodul Setup under PDIR APPS in the left navigation and click the button Download demo data. You then find the demo data in the file manager in the folder maklermodul/data.

Importing your own property data

After the installation there is a new directory maklermodul under the back end module System → File manager. This folder must contain 3 more directories with the following names: data, org, upload.

To upload the zip file, click File upload. The view changes; click the icon Paste into this folder to the right of upload. Under File upload, click the button Choose files. Select the zip file and click Open at the bottom right. Then click the button Upload files.

The file should now be in the directory ‘upload’.

Notes

Uploaded file is too large:

If the file cannot be imported because of its size, select Settings in the left navigation and increase the value for Maximum upload file size in the File uploads tab.

jQuery is not loaded:

Make sure jQuery is loaded. To add it, select Themes in the left navigation and then the icon for Page layouts. When editing the layout, you can load jQuery in the jQuery tab.

Changing the files folder or keeping the file after the import:

If you have changed the files directory or want to keep the imported file after the import, create a file named import.ini in the folder maklermodul in the file manager. The imported file is then stored in the folder maklermodul/org after the import.

The file could look as follows. With the option keep-source you set whether the imported file is kept after the import.

import-source="files/maklermodul/upload"
import-target="files/maklermodul/data"
keep-source=true

Starting the import

To run the import manually, start it in the back end module Maklermodul Setup by clicking the button Run import.

Setting up a cron job

​

Since Contao 5, recurring tasks should no longer be implemented with the Contao cron ($GLOBALS['TL_CRON']). Instead, set up a real cron job on the server. How to configure it depends on your hosting provider.

Many hosting providers allow running a console command directly as a cron job. In this case use the following command:

php vendor/bin/contao-console maklermodul:import && php vendor/bin/contao-console maklermodul:index

Depending on the hosting environment, the PHP command may differ, for example:

  • php
  • php84
  • php8.4
  • /usr/bin/php
  • /usr/bin/php8.4-cli

Your hosting provider tells you the exact name.

Option 2: call a PHP file

If your host doesn’t support CLI commands as cron jobs, create a PHP file instead (e.g. in the public directory) that runs the required console commands. The cron job then calls this file regularly.

maklermodul.import.php

<?php

$command = sprintf(
    'php %1$s/vendor/bin/contao-console maklermodul:import && php %1$s/vendor/bin/contao-console maklermodul:index',
    dirname(__DIR__)
);

exec($command, $output, $result);

exit($result);

Here, too, php is only an example. Depending on the hosting provider, adjust this part to the available PHP CLI version.

We recommend running the cron job at a regular interval (e.g. every half hour). The right interval depends on how often new data should be imported.

Notes on hosting providers

All-Inkl

At All-Inkl you set up the cron job in the KAS under Tools → Cronjobs. With Cronjob anlegen (create cron job) you select the PHP file and set the execution interval.

Poor man’s cron

Create the file app/Resources/contao/config/config.php if it doesn’t exist and add the following content. Then rebuild the cache in the Contao Manager.

Note

Since Contao 4.9, place config.php in contao/config/config.php.

<?php

/**
 * Maklermodul Cron
 *
 * see documentation for details
 * https://docs.maklermodul.de/import.html
 *
 */
$GLOBALS['TL_CRON']['hourly'][] = array('Pdir\MaklermodulSyncBundle\Module\Sync', 'estateImport');
$GLOBALS['TL_CRON']['hourly'][] = array('Pdir\MaklermodulSyncBundle\Module\Sync', 'estateIndex');

Note: these cron jobs only run when the website is actually visited.

Possible options for the execution frequency:

$GLOBALS['TL_CRON']['monthly']
$GLOBALS['TL_CRON']['weekly']
$GLOBALS['TL_CRON']['daily']
$GLOBALS['TL_CRON']['hourly']
$GLOBALS['TL_CRON']['minutely']

More information about cron jobs in Contao:

https://docs.contao.org/dev/framework/cron/

Run the poor man’s cron regularly: (depending on the hosting provider, this can be set up in its interface)

https://example.org/_contao/cron

Please note that in the settings under Front end settings the checkbox Disable the command scheduler must not be enabled for the poor man’s cron to work.

Real cron job on the server

22 minutes past every full hour (for hourly jobs)

22 * * * * cd /path/to/contao && php vendor/bin/contao-console maklermodul:import && php vendor/bin/contao-console maklermodul:index

Running it manually on the console

php vendor/bin/contao-console maklermodul:import
php vendor/bin/contao-console maklermodul:index
Nov 7, 2026 Spare Zeit bei allen Webprojekten mit pdir+

Subsections of Import

Immobilienscout24 import

Installation

You need the pdir/maklermodul-immobilienscout24-bundle. The bundle must be installed in addition to the Sync Bundle.

Setup

You need your personal access data for the Immobilienscout24 API. You find out how to get it here (in German).

Enter your personal access data (consumerKey, consumerSecret, tokenKey and tokenSecret) in the Contao back end under PDIR APPS -> Immobilienscout24 Import. Select “api” as the type and “immobilienscout24” as the model.

Cron

Recommendation: set up a real cron job with the Contao console.

php vendor/bin/contao-console maklermodul:immoscout:import
php vendor/bin/contao-console maklermodul:index

Alternatively, use a poor man’s cron (runs when the Contao website is visited).

Activate the poor man’s cron in the cron job settings.