Removes a products from comparison
@param integer $product_id
@return array|boolean
325499
public function delete($product_id)
    {
        $result = null;
        $this->hook->attach('product.compare.delete.before', $product_id, $result, $this);

        if (isset($result)) {
            return (bool) $result;
        }

        $compared = $this->getList();

        if (empty($compared)) {
            return false;
        }

        $product_ids = array_flip($compared);
        unset($product_ids[$product_id]);

        $result = $this->set(array_keys($product_ids));
        $this->hook->attach('product.compare.delete.after', $product_id, $result, $this);
        return (bool) $result;
    }
851339
public function validateProductCollectionItem($product_id)
    {
        $product = $this->product->get($product_id);

        if (empty($product['status'])) {
            return $this->translation->text('@name is unavailable', array(
                '@name' => $this->translation->text('Product')));
        }

        return true;
    }
99466
protected function setProduct($product_id)
    {
        $this->data_product = $this->product->get($product_id);

        if (empty($this->data_product)) {
            $this->outputHttpStatus(404);
        }

        $this->controlAccessProduct();
        $this->prepareProduct($this->data_product);
    }
839133
public function deleteAction($parentId, $variantId)
    {
        $variant = $this->getProductVariantManager()->deleteVariant($variantId);

        if ($variant->getParent()->getId() !== (int) $parentId) {
            throw new ProductException('Variant does not exists for given product.');
        }
        $this->getEntityManager()->flush();

        $view = $this->view(null, 204);

        return $this->handleView($view);
    }
1129640
protected function deleteImagesProduct()
    {
        $this->controlAccess('product_edit');

        $file_ids = $this->getPosted('delete_images', array(), true, 'array');
        return $this->image->delete($file_ids);
    }
748515
public function setProductId($product_id) {

        $this->checkInArray($product_id, GDAXConstants::$productIdValues);
        $this->product_id = $product_id;
        return $this;

    }
860668
public function editReview($product_id, $review_id = null)
    {
        $this->setProductReview($product_id);
        $this->setReview($review_id);
        $this->setTitleEditReview();
        $this->setBreadcrumbEditReview();

        $this->setData('review', $this->data_review);
        $this->setData('product', $this->data_product);
        $this->setData('can_delete', $this->canDeleteReview());

        $this->submitEditReview();
        $this->setDataRatingEditReview();
        $this->outputEditReview();
    }
1129298
protected function removeListItems( $productId )
	{
		$manager = \Aimeos\MShop::create( $this->getContext(), 'product/lists' );

		$search = $manager->createSearch();
		$expr = array(
			$search->compare( '==', 'product.lists.parentid', $productId ),
			$search->compare( '==', 'product.lists.domain', 'product' ),
			$search->compare( '==', 'product.lists.type', 'bought-together' ),
		);
		$search->setConditions( $search->combine( '&&', $expr ) );

		$listItems = $manager->searchItems( $search );

		$manager->deleteItems( array_keys( $listItems ) );
	}
1321959
protected function deleteLinked($store_id)
    {
        $this->db->delete('triggers', array('store_id' => $store_id));
        $this->db->delete('wishlist', array('store_id' => $store_id));
        $this->db->delete('collection', array('store_id' => $store_id));
        $this->db->delete('product_sku', array('store_id' => $store_id));
    }
824899
public function delete($product_sku, $uid)
    {
        $product = Subbly::api('subbly.product')->find($product_sku);

        $productImage = Subbly::api('subbly.product_image')->delete($uid);

        return $this->jsonResponse(array(
            'product_image' => $productImage,
        ),
        array(
            'status' => array(
                'code'    => 200,
                'message' => 'ProductImage deleted',
            ),
        ));
    }
789962
public function delete()
	{
		$result = $this->getClient()->delete();

		$ids = (array) $this->getView()->param( 'id' );
		$tags = array( 'product' );

		foreach( $ids as $id ) {
			$tags[] = 'product-' . $id;
		}

		$this->getContext()->getCache()->deleteByTags( $tags );

		return $result;
	}
333042
public function delete($product_id, array $options = array())
    {
        $result = null;
        $this->hook->attach('sku.delete.before', $product_id, $options, $result, $this);

        if (isset($result)) {
            return (bool) $result;
        }

        $sql = 'DELETE FROM product_sku WHERE product_id=?';

        if (!empty($options['combinations'])) {
            $sql .= ' AND LENGTH(combination_id) > 0';
        }

        if (!empty($options['base'])) {
            $sql .= ' AND LENGTH(combination_id) = 0';
        }

        $result = (bool) $this->db->run($sql, array($product_id))->rowCount();
        $this->hook->attach('sku.delete.after', $product_id, $options, $result, $this);
        return (bool) $result;
    }
92840
static function cleanupList( $productCollectionIDList )
    {
        $db = eZDB::instance();
        $db->begin();

        // Purge shipping information associated with product collections being removed.
        foreach ( $productCollectionIDList as $productCollectionID )
            eZShippingManager::purgeShippingInfo( $productCollectionID );

        eZProductCollectionItem::cleanupList( $productCollectionIDList );
        $where = $db->generateSQLINStatement( $productCollectionIDList, 'id', false, false, 'int' );
        $db->query( "DELETE FROM ezproductcollection WHERE {$where}" );
        $db->commit();
    }
725650
static function removeReferencesToProductCategory( $cartegoryID )
    {
        $db = eZDB::instance();
        $query = "DELETE FROM ezvatrule_product_category WHERE product_category_id=" . (int) $cartegoryID;
        $db->query( $query );
    }
471029
protected function updateProduct($product_id)
    {
        if (!$this->isError() && !$this->product->update($product_id, $this->getSubmitted())) {
            $this->errorAndExit($this->text('Unexpected result'));
        }
    }
669315
public function destroy($id)
    {
        $product = Product::find($id);
        $product->delete();
        return JsonResponse::create(null, 204);
    }
117310
public function removeOrphanProducts()
    {
        $write = $this->getConnection();
        $catalogTable = $this->getTable(Schema::EMAIL_CATALOG_TABLE);
        $select = $write->select();
        $select->reset()
            ->from(
                ['c' => $catalogTable],
                ['c.product_id']
            )
            ->joinLeft(
                [
                    'e' => $this->getTable(
                        'catalog_product_entity'
                    ),
                ],
                'c.product_id = e.entity_id'
            )
            ->where('e.entity_id is NULL');

        //delete sql statement
        $deleteSql = $select->deleteFromSelect('c');

        //run query
        $write->query($deleteSql);
    }