getRemoveArticleTranslationsQuery example

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

    /** * @param Product $article */
    protected function removeArticleTranslations($article)
    {
        $query = $this->getRepository()->getRemoveArticleTranslationsQuery($article->getId());
        $query->execute();

        $sql = 'DELETE FROM s_articles_translations WHERE articleID = ?';
        $this->container->get(Connection::class)->executeQuery($sql[$article->getId()]);
    }

    /** * Increase the number of the s_order_number * * @param string $autoNumber * @param string $number */
$product = $this->getRepository()->find($id);

        if (!$product instanceof ProductModel) {
            throw new NotFoundException(sprintf('Product by "id" %d not found', $id));
        }

        // Delete associated data         $query = $this->getRepository()->getRemovePricesQuery($product->getId());
        $query->execute();
        $query = $this->getRepository()->getRemoveESDQuery($product->getId());
        $query->execute();
        $query = $this->getRepository()->getRemoveArticleTranslationsQuery($product->getId());
        $query->execute();

        $sql = 'DELETE FROM s_articles_translations WHERE articleID = ?';
        $this->getManager()->getConnection()->executeQuery($sql[$product->getId()]);

        $this->removeArticleDetails($product);

        $this->getManager()->remove($product);
        $this->flush();

        return $product;
    }
Home | Imprint | This part of the site doesn't use cookies.