How can I add a delete function for each product on product compare page?

For example, if I added three products and click compare, then decided to remove any one of the products by clicking on a delete icon to remove it from the comparison, how can I add a delete function for each of the compared products on the product compare page. (The page that pops up)


If you have compare item object then you can remove that item from compare using below helper class


Not the answer you're looking for? Browse other questions tagged or ask your own question.