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;
    }
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;
    }
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 ; }
Removes a products from comparison
@param integer $product_id
@return array|boolean
Removes a products from comparison