Advertisement

Thursday 18 April 2013

Difference Between Overloading and Overriding

Overloading:
In Simple words, Same function name but different signature(Parameters)



Ex:

class Maths{

function sum($a, $b) {

$c=$a+$b;
return c; 

}

function sum($a, $b, $c) {           //PARAMETERS DIFFERS

$d=$a+$b+$c;
 return $d;
}


}



Overriding(Polyphormism):
Same Function Name, same signature, different functionality.




Ex:

class Maths{

function sum($a, $b) {

$c=$a+$b;
return c; 

}
 
}

Class Another extends Maths{


function sum($a, $b) {

$c=$a-$b;                            // FUNCTIONALITY DIFFERS
return c; 

}
}

Tuesday 9 April 2013

Magento Redirect After Login Not Working - FIXED

1. Go to

           System > Configuration > Customers > Customer Configuration > Login Options

            Make it as NO



2. To Redirect to previous page after login. Go to page login.phtml and replace form action i.e. line 40 or if you are using mini login than go to page mini.login.phtml and replace form action i.e. line 28 with the one given here.


Replace with:

          
<form action="<?php echo $this->getPostActionUrl() ?>" method="post"> 


to:

<form action="<?php echo str_replace('login', 'loginPost', $this->helper('customer')->getLoginUrl()) ?>"  
method="post" id="login-form">

Monday 4 March 2013

Magento - 404 Error

How to find Error in Magento 1.7.2:


1. Enable the Developer Mode :

            Go to Index.php


1. Enable The Developer Mode:

Now the error may be like this:


simplexml_load_string() [function.simplexml-load-string]:
 Entity: line 1: 
parser error : 
XML declaration allowed only at the start of the document 
in C:\wamp\www\{MY PROJ}\app\code\core\Mage\Core\Model\Layout\Update.php on line 445

2. Enable the Log in index.php:

Mage::log(print_r($filename, true));

find Last error in /var/cache/system.log

That's it!

Thursday 15 November 2012

Windows 8 Apps Store Not working

These Steps worked for me!

1. Make Sure you have exe files for all your software installed in your system. [It will remove all programs]

2. Now Go To Settings

3. In General Tab, Scroll Down the right Panel

4. You can find Refresh your PC, Click on GET STARTED button



this will take nearly 15 minutes to refresh and restart your system

5. Once the System is restarted, Login with your Microsoft/ Hotmail Account

Tuesday 5 June 2012

Working with RGBA - CSS3:


1. Set some nice background image like this:

body{
background:url("http://farm9.staticflickr.com/8010/7330498834_4817db077c_c.jpg") no-repeat;
    color:#fff;
    min-height: 450px;
}

2. Style your content div like this:


 p{
    width: 350px;
    padding:10px;
    font-size: 35px;
    margin:225px 45px;
background: rgba(128, 128, 128, 0.3);
}


OR

p{
    width: 350px;
    padding:10px;
    font-size: 35px;
    margin:225px 45px;
background: rgb(128, 128, 128);
opacity: 0.3;
}




then Here we go  -   http://jsfiddle.net/U373w/3/

Thursday 24 May 2012

Create Engarved text

Here are some tips to make engraved text using CSS3 :


 1. Create a div as:



#your div{
background: #COLOR1;
color: #color2;
text-shadow: 0px 0px 1px #fff;

}

2.Color Combinations:


light seagreen -> teal
lightgray -> gray
lightblue ->Teal
#78A931 -> #475B27
#469FAD ->#272627
#80B848 ->#58812D
#AD3A16 -> #68230E
#EEEEEE-> #6F7376
#FDDB6F -> #8FA0A



Tuesday 24 April 2012

Google Doodle

Google Doodle Trick exposed:

Right Click on the cursor before animation take place

Select -> View Image