Solved: Magento agree to terms in checkout checked by default

Magento one page checkout has also inbuilt functionality to make users agree to terms and conditions prior to payment. This generated a lot of errors for customers because not all of them are intelligent enough to know that this checkbox needs to be checked in order to proceed with payment. 

We got a load of support issues because of this small checkbox. 

Solution? Make the checkbox checked by default. Not a very moral way to handle things and yes a lot of people may actually not read the TOS, but we can’t take the responsibility for that on our shoulders. 

How to make Magento one page checkout checkbox checked by default

1. Open the agreements file from the base file section
\app\design\frontend\base\default\template\checkout\onepage\agreements.phtml

2. Make a new file named agreements.phtml in your template directory maintaining the same path / folder structure as in base.

Let’s say, you are using the rwd theme, then the new file should be: 
\app\design\frontend\rwd\default\template\checkout\onepage\agreements.phtml

3. Copy the contents of base file to the new agreements file. This is necessary because we need to put all modified files to our own template folder and not modify the base /core files. 

4. On line 46 find the checkbox code and add checked=”checked” to it. 

magento checkout terms checked default

Save and enjoy, this is how you made the checkbox of Terms and conditions checked by default in Magento. 

 

Ps, to enable the terms and conditions on checkout in the first place, go to:

System -> Configuration -> Sales -> Checkout and under Checkout options find Enable Terms and Conditions – change that to Yes.

Post Author: Tom Pai