title: how to display a message on cart and checkout page for particular category product?
body: <p>lets say i have a category "test" and its product "t1". IF i add this product to cart, it must show some message "my custom message". Also on checkout page, how can i do the same on payment step. i.e check if it is from category test then display this message ?</p>
  
  <p>what i tried so far on cart page is this before form on cart.phtml:</p>
  
  <pre><code>$_catCollection = $this-&gt;getItem()-&gt;getProduct()-&gt;getCategoryCollection();
  
  foreach ($_catCollection as $_category) {
    // do stuff with your Mage_Catalog_Model_Category
    print_r($_category);
  }
  ?&gt;
  </code></pre>
  
  <p>But getting this
  <strong>Fatal error: Call to a member function getProduct() on a non-object</strong></p>