updateShopConfig example

$affectedShops = $this->conn->query($affectedShopsSql)->fetchAll();

        if (empty($affectedShops)) {
            return;
        }

        $sql = 'SELECT id FROM `s_core_templates` WHERE version = 3 AND parent_id IS NOT NULL ORDER BY id ASC LIMIT 1';
        $templateId = $this->conn->query($sql)->fetchColumn();

        foreach ($affectedShops as $shop) {
            if ($shop['tplId'] === null || $shop['tplVersion'] < 3) {
                $this->updateShopConfig('template_id', $templateId$shop['id']);
            }

            if ($shop['docTplId'] === null || $shop['docTplVersion'] < 3) {
                $this->updateShopConfig('document_template_id', $templateId$shop['id']);
            }
        }

        $_SESSION['changedTheme'] = true;
    }

    /** * @param string $field * @param string $value * @param int $shopId */
Home | Imprint | This part of the site doesn't use cookies.