使用产品ID删除magento购物车商品产品链接

I'm trying to prevent one specific product from linking back to itsproduct page from the magento cart.

This is what I've tried but it still generates the link:

<?php $product_id = $this->getProduct()->getId(); ?>

<?php if ($this->hasProductUrl() && $this->product_id != '387'):?>
            <a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->htmlEscape($this->getProductName()) ?></a>
 <?php else: ?>
            <?php echo $this->htmlEscape($this->getProductName()) ?>
        <?php endif; ?>

Can anyone please tell me what am I doing wrong?

You've used $this->product_id, you should just have used $product_id, ie;

 <?php if ($this->hasProductUrl() && $product_id != '387'):?>