eCart has a function named "InCart" that takes the items ID, for example you could test for an item with the ID of 1 in the cart using:
<?php if($eCart1->InCart("1") == true) echo("Your Message"); ?>
this example assumes that the name of your cart object is "eCart1", if you cart object is named differently, replace "eCart1" with the name of your cart object.