Magento - Can't login to admin in localhost

I am currently working on magento version 1.3.2.4. When i login to admin, it looks like i have entered proper username and password because it doesn't show any error like "Invalid username or password". When i try with fake login I do get error. Even i am not getting any error it stays on the login page.
So, I had to go through code and comment out few lines after which I was able to login and access admin again.
app\code\core\Mage\Core\Model\Session\Abstract\Varien.php line 77: original:
// set session cookie params
session_set_cookie_params(
    $this->getCookie()->getLifetime(),
    $this->getCookie()->getPath(),
    $this->getCookie()->getDomain(),
    $this->getCookie()->isSecure(),
    $this->getCookie()->getHttponly()
);

Commented out three lines:
// set session cookie params
session_set_cookie_params(
    $this->getCookie()->getLifetime(),
    $this->getCookie()->getPath() /*,
    $this->getCookie()->getDomain(),
    $this->getCookie()->isSecure(),
    $this->getCookie()->getHttponly()*/
);

Hide "Showing posts with label" message in blogger

  • First go to Template > Edit HTML
  • In Blogger default templates, search for <body> and in custom templates, search for <body>
  • Add the below code just after above code.
<b:if cond='data:blog.pageType == &quot;index&quot;'>
<b:if cond='data:blog.searchLabel'>
<style>
.status-msg-wrap{display:none;}
</style>
</b:if>
</b:if>
Now Save the template and check the result by clicking any of your labels 

How to call an attributes on product page in Magento

Create a new attribute or find a existing attribute to call on product page.

Step 1:- First of all go to catalog->attributes->manage attributes on this page you will see a list of attributes under attribute code you will see all the attribute code copy any code. For example “cost” to display it on front end on product view page.

Step 2:- Open \template\catalog\product\view.phtml now find this code line.

“<?php $_product = $this->getProduct(); ?>”

After this code we call our attribute by this code.

<?php
If($_product->getCost ()):
echo $_product->getCost ()
endif;
?>


That’s it.

How to make a module in Magento Part 1

So here is our file and folder structure for module.


A)     app\etc\modules\Summer_Spring.xml (Create a file for Module Configuration file).
B)     \app\code\local\Summer (Create a namespace folder).C)     \app\code\local\Summer\Spring (Create a module folder).D)     \app\code\local\Summer\Spring\controllers (Create a controller folder).E)      \app\code\local\Summer\Spring\etc (Create a Configuration folder).F)      \app\code\local\Summer\Spring\etc\config.xml (Create a Configuration file).G)    \app\code\local\Summer\Spring\controllers\IndexController.php (Create a Controller file).

How to install Magento On wamp Server.

Please follow these instruction to install Magento on local Server,  

Step 1:- For Download magento go To             http://www.magentocommerce.com/download and download latest version.

Step 2:- Extract Magento folder and copy in your localhost folder.
Step 3:- Create database in phpnyadmin database name should be in lower case.
Before go further we have to make some changes So let’s do it now.