public function getPath()
    {
        if (is_null($this->moduleId) || is_null($this->fileName)) {
            throw oxNew(\OxidEsales\Eshop\Core\Exception\StandardException::class);
        }

        $fileName = $this->fileName;

        // for < 4.6 modules, since 4.7/5.0 insert in oxtplblocks the full file name and path
        if (basename($fileName) === $fileName) {
            // for 4.5 modules, since 4.6 insert in oxtplblocks the full file name
            if (substr($fileName, -4) !== '.tpl') {
                $fileName = $fileName . ".tpl";
            }

            $fileName = "out/blocks/$fileName";
        }

        $moduleList = oxNew(\OxidEsales\Eshop\Core\Module\ModuleList::class);
        $activeModuleInfo = $moduleList->getActiveModuleInfo();

        if (!array_key_exists($this->moduleId, $activeModuleInfo)) {
            throw oxNew('oxException', 'Module: ' . $this->moduleId . ' is not active.');
        }

        $modulePath = $activeModuleInfo[$this->moduleId];

        $fileSystem = oxNew(FileSystem::class);

        return $fileSystem->combinePaths($this->modulesPath, $modulePath, $fileName);
    }