All About Ubuntu, Magento, Linux thingy, Business Catalyst... and more!
If any of my posts helped you, kindly RETURN THE FAVOR. Just click any of the ADS on this page. Don't worry they won't harm you. Thanks!
Why the name is "I Am The Shadow On The Sun"? It's taken from my favorite Audioslave song - Shadow On The Sun.
Magento 184.108.40.206 - How to check in the frontend if admin is logged in
In Magento 220.127.116.11, I've tried different approaches just to check in the frontend if the admin is logged in. There are lots of codes I found in the net but they didn't work.
Well, the easiest approach is just this : Mage::getModel('admin/session')->isLoggedIn() I used that in the custom router I created. Now buy me some beer!
If ever you encountered issues like you cannot login to the admin panel or cannot even add product to the cart, I have a better solution for you.
Using phpMyAdmin, in your magento database, look for the core_config_data table and click it. Click the "Search" tab. Then on the "path" column set the operator to LIKE %...% and the Value to cookie and click the "Go" button to search.
After searching, set the value of web/cookie/cookie_path, web/cookie/cookie_domain, web/cookie/cookie_httponly, and web/browser_capabilities/cookies to NULL Just like this on the screenshot. Adding product to cart and logging in to the admin panel should work now!