title: Magento data array storage in custom session object
body: <p>I am using my own session class, in that class, I am using some protected data members and some public data methods While I storing some variable on my session class Like</p>
  
  <pre><code>Mage::getSingleton('decision/session')-&gt;storeProductInfo('2');
  </code></pre>
  
  <p>Here is function implementation, <code>$this-&gt;_productId</code> is the private data member of my session class.</p>
  
  <pre><code>Public function storeProductInfo($product_id){
      $this-&gt;_productId = $product_id;
      return $this;
  }
  </code></pre>
  
  <p>I am getting the stored variable by calling the below statement, it return me "<strong>null</strong>".</p>
  
  <pre><code>$product_stored_id = Mage::getSingleton('decision/session')-&gt;getStoredProductInfo();
  
  public function getStoredProductInfo(){
     return $this-&gt;_productId;
  }
  </code></pre>
  
  <p>Even  </p>
  
  <pre><code>Mage:getSingleton('decision/session')-&gt;setData('product_id', '2');
  </code></pre>
  
  <p>Didn't working. Can you please let me know where I am going wrong? I have to store some arrays in my session that's why I created my own session class to separately deal with my logic.</p>