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
Post a Comment