getRemoveDetailQuery example

$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> */
    protected function prepareAssociatedData($data, ProductModel $article)
    {
        
$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)
    {
        $query = $this->getRepository()->getRemoveArticleTranslationsQuery($article->getId());
        $query->execute();

        
Home | Imprint | This part of the site doesn't use cookies.