View Single Post
  #3  
Old 07-15-2005, 03:49 AM
  TelaFirma's Avatar 
TelaFirma TelaFirma is offline
 

X-Adept
  
Join Date: Nov 2002
Location: North Carolina USA
Posts: 930
 

Default

...edited to reflect changes made later on in this post...

Here is a mod that will hide the submit button until they check the box that they agree.

Step 1
Create the file /skin1/hide_block_script.tpl with this contents:
Code:
{literal} <SCRIPT type="text/javascript" language="JavaScript 1.2"> // Function to flip visibility of certain div objects function flipdiv(el,state) { if(state=="show"){ status="block"; }else{ status="none"; } document.getElementById(el).style.display = status; } </SCRIPT> {/literal}

Step 2
Open the file /skin1/customer/main/checkout.tpl for editing.
At top of the file right before the first {capture} insert the line

Code:
{include file="hide_block_script.tpl"}

Next look for the line:
Code:
{$lng.txt_you_are_agree} "{$lng.lbl_terms_n_conditions}" {$lng.lbl_and} "{$lng.lbl_privacy_statement}".
and add this right after it:

Code:
No<input type="radio" name="agree" checked="checked" onclick="flipdiv('checkoutbutton','hide')" /> Yes<input type="radio" name="agree" onclick="flipdiv('checkoutbutton','show')">I Agree to the Terms and Conditions

Next find the section that looks like:
Code:
{include file="buttons/button.tpl" button_title=$lng.lbl_submit_order style="button" href=$button_href} {else} {include file="submit_wo_js.tpl" value=$lng.lbl_submit_order} {/if}

and change it to read:

Code:
<div align="center"> <table border=0 cellpadding="0" cellspacing="0" id="checkoutbutton" style="display: none;"> <tr><td> {include file="buttons/button.tpl" button_title=$lng.lbl_submit_order style="button" href=$button_href} {else} {include file="submit_wo_js.tpl" value=$lng.lbl_submit_order} {/if} </td></tr> </table> </div>
Reply With Quote