This is a short weblog of damodar bashyal

I love reading.

I love reading.

Study time

Study time

Text

How do you get secure or unsecure urls in magento? It’s quite simple actually. We discussed about getting different base url types in previous blog post here - [Magento get base url].
Now we will show you how to get secure urls in magento. So in previous post we got base url as: http://dlvr.it/6q0x0Q

Text

Who is full stack developer? Many of you may think that they are just the same as those typical programmers. Well, you may be correct, but full stack developers have distinctions. Their skill and knowledge on computer software is superb.
Who are Full Stack Developers? http://dlvr.it/6mH9rg

Text

This post details on how I was able to add new template tag on Magento Cms pages and static blocks. If you want to know more about these directives and template tags, you can check official magento wiki here.
I have already added this functionality and example on my github repository here https://github.com/dbashyal/Magento-General-Module-Extension. This module consists of other functionalities, so check code and strip out that you don’t need it. http://dlvr.it/6KqnMd

Text

It’s easy to redirect simple page urls from one location to another but query strings redirection can make you pull your hair.
This is how I redirected simple pages: http://dlvr.it/5pqLvc

Text

Lets create new image attribute first at: magento admin > Catalog > Attributes > Manage Attributes > Add New Attribute
Set Attribute Properties as below: http://dlvr.it/5p7jDD

Text

This is the function I always forget and keep googling, So here are my finds to delete, revert or remove commits from local and remote. http://dlvr.it/5ldBLk

Text

This is raw copy from my notes during magento store upgrade.

======================================= Restrict access to /index.php with IP Address whitelist.
This is what I have:
if (file_exists($maintenanceFile)) {
// START IP BLOCKER
// Remove file ‘maintenance.flag’ when you decide to go live
$ip_whitelist = array(‘x.x.x.x’, ‘127.0.0.1’, ‘x.x.x.x’);
if(!in_array($_SERVER[‘REMOTE_ADDR’], $ip_whitelist)) {
$protocol = “HTTP/1.0”;
if ( “HTTP/1.1” == $_SERVER[“SERVER_PROTOCOL”] )
$protocol = “HTTP/1.1”;
header( “$protocol 503 Service Unavailable”, true, 503 );
header( “Retry-After: 3600” );
header(‘Location: /index_landingpage.php’); // our own custom landing page.
exit;
}
// END IP BLOCKER
include_once dirname(__FILE__) . ‘/errors/503.php’;
exit;
} http://dlvr.it/5l0ZGM

Text

Are you seeing a lot of 404 page reports on google webmaster tools? Then fear not, we now have free t404 to handle magento’s 404 pages. http://dlvr.it/5jx3HX