Can´t login to Magento after installation

This is a common problem when installing Magento. The background of the problem is that Magento can´t store cookies when you run it on localhost. The easiest way to solve this is to tell the code not to do this controlls. To do this you just have to comment a couple of lines in the ”Varien.php” file. Just follow the checklist and it will work:

  • Open file ”app/code/core/Mage/Core/Model/Session/Abstract/Varien.php”
  • Find where the  ”$cookieParams” array is set, in version 1.4.2.0 it is line #78
  • Comment lines 81, 82 and 83 (in version 1.4.2.0)
  • Should look like this:
    $cookieParams array(
    $this->getCookie()->getLifetime(),
    $this->getCookie()->getPath()
    //$this->getCookie()->getDomain(),
    //$this->getCookie()->isSecure(),
    //$this->getCookie()->getHttponly()
    );
  • If it´s in line #78 in your file, just search for ”cookieParams” and you will find it.
  • Now just go to the administration login page and login with your username and password

PS! If you are new to Magento and this is you first login, I suggest that you read the postShow categories and products in Magento”, it might save you some time (and frustration) =)

Show categories and products in Magento

Just installed Magento? Can´t get any categories and products to be visible in frontend?

Well you are not the first one. To get them visible is a bit tricky,  just follow this checklist and then it will work:

Show categories in Magento

  • Login to administration
  • Go to dropdown menu ”Catalog” and click item ”Manage categories”
  • Add a new category inside the category ”Default Category”
  • Make sure ”Is Active” is set to ”yes”
  • Go to frontend and your category will now be visible in the top horizontal menu (standard layout)

Show products in Magento

  • Login to administration
  • Go to dropdown menu ”Catalog” click in item ”Manage products”
  • Click ”Add product” or ”Edit” to the right of a existin product
  • Fill in all requierd fields (you will be promted if you missed something)
  • In tab ”General” (tabs are to the left) make sure ”Status” is set to ”Enable” and Visibility is set to ”Catalog, Search” or ”Catalog”
  • In tab ”Inventory” make sure ”Qty” (Quantity) is set to more the 0 and that ”Stock Availability” is set to ”In Stock”
  • In tab ”Categories”, select the categories that you wan your product to appear in.
  • Save your product
  • Go to frontend and your product will now be visible inside the categories you selected above.