Showing posts from August, 2013

Magento - How to check in the frontend if admin is logged in

In Magento, 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 :

I used that in the custom router I created.

Now buy me some beer!

Ubuntu Terminal: mysql -u username -p database_name < database.sql does not import completely

If ever you have encountered the issue mentioned in the title of this post, I have an alternative for that. I experienced that when I imported a very large sql file which is about 2GB.

What I did was I used the mysql command line client. I think you have an idea now how i did it.
But here we go. In your terminal, type mysql -u <your_username> -p. Then type of course type the password when prompted.

Then run use <database_name>; press enter.
And then, source sqlfile.sql;

That should do the trick. Just wait for it to finish importing.