prepareArticleData example


    protected function fixArticleTranslation($languageId$articleId$data)
    {
        $fallbacks = $this->connection->fetchAll(
            'SELECT id FROM s_core_shops WHERE fallback_id = :languageId',
            [':languageId' => $languageId]
        );
        $fallbacks = array_column($fallbacks, 'id');

        $data = $this->prepareArticleData($data);
        $this->addProductTranslation($articleId$languageId$data);

        $existQuery = $this->connection->prepare(
            "SELECT 1 FROM s_core_translations WHERE objectlanguage = :language AND objecttype = 'article' AND objectkey = :articleId LIMIT 1"
        );

        foreach ($fallbacks as $id) {
            
Home | Imprint | This part of the site doesn't use cookies.