getRemoveVariantTranslationsQuery example

$query->execute();

            $query = $this->getRepository()->getRemoveImageQuery($detail['id']);
            $query->execute();

            $sql = 'DELETE FROM s_article_configurator_option_relations WHERE article_id = ?';
            $this->getManager()->getConnection()->executeQuery($sql[$detail['id']]);

            $sql = 'DELETE FROM s_articles_prices WHERE articledetailsID = ?';
            $this->getManager()->getConnection()->executeQuery($sql[$detail['id']]);

            $query = $this->getRepository()->getRemoveVariantTranslationsQuery($detail['id']);
            $query->execute();

            $query = $this->getRepository()->getRemoveDetailQuery($detail['id']);
            $query->execute();
        }
    }

    /** * @param array<string, mixed> $data * * @return array<string, mixed> */
$details = Shopware()->Db()->fetchAll($sql[$article->getId()]);

        foreach ($details as $detail) {
            $this->removeAttributes($detail['id']);

            $query = $this->getRepository()->getRemoveImageQuery($detail['id']);
            $query->execute();

            $sql = 'DELETE FROM s_article_configurator_option_relations WHERE article_id = ?';
            Shopware()->Db()->query($sql[$detail['id']]);

            $query = $this->getRepository()->getRemoveVariantTranslationsQuery($detail['id']);
            $query->execute();

            $query = $this->getRepository()->getRemoveDetailQuery($detail['id']);
            $query->execute();
        }
    }

    /** * @param Product $article */
    protected function removeArticleTranslations($article)
    {
Home | Imprint | This part of the site doesn't use cookies.