Can’t Add Products To Shopping Cart Or Login To Admin Page IE and Chrome

Wednesday, 30. May 2012

I have had rather strange ordeal this morning when a customer reported that all of a sudden no one seemed to be able to add products to Magento shopping cart or log in to admin panel using Chrome or IE. However over to Firefox world, things seemed to be working as they should

After double checking with the hosting guys, we realized there was a power cut the night before! That was good enough reason to base all the investigation on what could have possibly go wrong as there hasn’t been any changes to the site that could have possibly cause this behaviour

Server Time Our Of Date
After some time looking around, we finally noticed the server time is actually one hour behind! Ahaa! So this could explain one scenario, all the seesion cookies that were being created could have been out of date already before they even function!

So we changed the server time and WOOT WOOT, things started to work as they should!

Hope this helps someone out there with similar problems.

Enjoy!

How to Remove session id ?___SID=U from the URL – Magento

Monday, 14. November 2011

If Magento has been frustrating the heck out of you with regards to Session IDs (___SID=U) being appended to the URLs, here is a solution for you..

1) Go to System > Configuration > Web > Session Validation Settings

2) Set Use SID on Frontend to ‘No’

Magento: How to save session data in Magento

Thursday, 28. July 2011

If you have ever wondered, this is how you can easily save data in Magento session

# Initiate session object
$session = Mage::getSingleton("core/session",  array("name"=>"your_session_name"));
#set the actual data:
$session->setData("state_id", 454);
# Access your session data:
$state_id = $session->getData("state_id");