title: product name description company using cart sesssion magento
body: <p>I am trying to get the product details in onepage.php but i am failed. I have tried many codes but i am not getting it. Do i need to get it using the sessions ? anybody know the code how do i will get the product details inside the onepage.php page ?</p>
  
  <p>ok first when i click buy a product it redirect to checkout/cart/ which means cart.phtml and cart.php well in this page i have the product name price qauntity grand total. Ok after i click the Procced to checkout then it redirect to checkout/onepage/ ... onepage.php and onepage.phtml</p>
  
  <p>ok now i have set a email in the onepage.php that whenever the user click in the Procced to checkout button from the cart page when the onepage.php load it will send email.</p>
  
  <p>Well now inside the email i would like to add the product details like product name quantity company name. In here i have completed all steps but can't get the product details. The product will be the product the user select to procced checkout.</p>
  
  <pre><code>here is my simple email template:
      $to = "$email";
      $from = "test@test.com";
      $subject = "email test";
      //begin of HTML message
      $message = &lt;&lt;&lt;EOF
  &lt;html&gt;
    &lt;body bgcolor="#DCEEFC"&gt;
      &lt;center&gt;
          &lt;b&gt;email test&lt;/b&gt; &lt;br&gt;
          &lt;h1&gt;&lt;font color="red"&gt;Your Coupon Code:&lt;/font&gt;$letters$random_chars&lt;br&gt;&lt;/h1&gt;
  
  &lt;h1&gt;Product Name : $productname&lt;/h1&gt;
  &lt;h1&gt;Company Name : $comname&lt;/h1&gt;
      &lt;/center&gt;
  
    &lt;/body&gt;
  &lt;/html&gt;
  EOF;
  $headers  = "From: $from\r\n";
  $headers .= "Content-type: text/html\r\n";
  
  
  mail($to, $subject, $message, $headers);
  </code></pre>
  
  <p>well so here i have send the email its working fine just need to include the product name and company name but i am not getting how i will get it ?</p>