getRemovePricesQuery example

'autoNumber' => $number,
        ];
    }

    /** * Internal helper function to remove all product prices quickly. * * @param int $articleId */
    protected function removePrices($articleId)
    {
        $query = $this->getRepository()->getRemovePricesQuery($articleId);
        $query->execute();
    }

    /** * Internal helper function to remove the product attributes quickly. * * @param int $articleDetailId */
    protected function removeAttributes($articleDetailId)
    {
        $query = $this->getRepository()->getRemoveAttributesQuery($articleDetailId);
        
if (empty($id)) {
            throw new ParameterMissingException('id');
        }

        $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);

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