cancel
Showing results for 
Search instead for 
Did you mean: 

Global variables

Global variables

Hello.

I have my custom blocks on a page. When customer select something in it I want to filter list of categories every time when customer select subcategory or reload page (F5). Filtration depends of selection in my block. How can I do it?

I have try to use Mage::register(...) but it don't work after F5. Maybe I do it wrong?

Thanks.

1 REPLY 1

Re: Global variables

Mage::register stores data only for the same HTTP request. When you press F5 or go to another page, registry is fresh and clean again.

 

If you want to use some data across requests, then you should use the session.

 

Mage::getSingleton('core/session')->setData('myData', $myValue);

ET Web Solutions
extensions, custom work, support