cancel
Showing results for 
Search instead for 
Did you mean: 

How to get session data in custom extension block

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

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 1

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?

Was my answer helpful? You can accept it as a solution.
200+ Premium Magento 2 Extensions Need help? Hire Magento Developer