The convertCurrency hook will be triggered if your store configuration uses custom currency conversion provider (i.e. other than or that Isotope ships by default). This hook will be triggered by Isotope Automator according to cronjob schedule (daily by default), and this is where you should pull the up-to-date exchange rate and save it to the database.


  1. \Isotope\Model\Config $config

    The instance of the Config model. The hook is called once for each store config that has custom provider set up.


// contao/config/config.php
$GLOBALS['TL_DCA']['tl_iso_config']['fields']['currencyProvider']['options'][] = 'cbr_ru';
// src/EventListener/Isotope/ConvertCurrencyListener.php
namespace App\EventListener\Isotope;

use Isotope\Model\Config;
use Isotope\ServiceAnnotation\IsotopeHook;
use Psr\Log\LoggerInterface;
use Symfony\Contract\HttpClient\HttpClientInterface;

 * @IsotopeHook("convertCurrency")
class ConvertCurrencyListener 
    private HttpClientInterface $client;
    private LoggerInterface $logger;

    public function __construct(HttpClientInterface $client, LoggerInterface $contaoErrorLogger) {
        $this->client = $client;
        $this->logger = $contaoErrorLogger;

    public function __invoke(Config $config): void
        // Query custom exchange rate provider
        if ('cbr_ru' != $config->currencyProvider) {

        try {
            $response = $this->client->request('GET', '');
        } catch (\Exception $e) {
            $this->logger->error('Error retrieving data from ' . $e->getMessage());


        // Process API response...
        $fltCourse = ...;
        $fltCourseOrigin = ...;

        // Save updated exchange rate
        $config->priceCalculateFactor = round($fltCourse / $fltCourseOrigin, 10);