cancel
Showing results for 
Search instead for 
Did you mean: 

How to get session data in custom extension block

How to get session data in custom extension block

Hi,

 

I am setting magento session but unable to get it in my block.

I have controller where session data is save into "LB_Session".

Mage::getSingleton('customer/session')->setLB_Session(serialize($_SESSION['LB_Session']));

 

I am getting this into controller.

 

But when I try to get it in block its not working.

 

I am calling block on add product to cart page which is called as per below

<catalog_product_view>
<reference name="product.info.addtocart">
<block type="lb/lbblock" name="lbregistration_button_lbblock" template="lb/lbregistration_button.phtml" />
<reference name="content" >
<block type="lb/lbblock" name="lbregistration_popup_lbblock" template="lb/lbregistration_popup.phtml" />
</reference>
</reference>
</catalog_product_view>

 

 

Thanks in advance

1 REPLY

Re: How to get session data in custom extension block

@SandipMgnt

 

 

Can you specify the method with which you want to get the session Data?

Found something useful, please give "Kudos" or "Accept as Solution" for Token of Appreciation.
Free Magento Extensions : https://magecomp.com/free-magento-extensions.html