Magento sessions not working on server, but work on localhost -


in observer.php storing variable in session

  $itemaddedtocart = 'true';   mage::getsingleton('core/session')->setitemaddedtocart($itemaddedtocart); 

when try retrieve it:

mage::getsingleton('core/session')->getitemaddedtocart(); 

it null. weird thing works fine in local dev environment (mamp). why isn't working on server? tried on both dreamhost , magento hosting company.

thanks in advance!

ended being issue case sensitivity. on mac, things works fine because mac ignores case of folders/file. on linux server failed work because linux uses case sensitive file system.

in case, in config.xml had change class node this:

        <checkout_cart_product_add_after>             <observers>                <mymodule_modulator_model_observer>                   <type>singleton</type>                   <class>mymodule_modulator_model_observer</class> 

to this:

<class>mymodule_modulator_model_observer</class>          ^changed upper case match folder name 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -