View Single Post
  #1  
Old 03-18-2006, 08:04 AM
  Zaja's Avatar 
Zaja Zaja is offline
 

X-Adept
  
Join Date: Mar 2004
Location: The Universe is my home
Posts: 420
 

Default Must "Accept terms" before submitting the order

http://www.7dana.com/img/I_agree_demo.gif

1. open skin/customer/main/checkout.tpl and add following code after {capture name=checkout_dialog}:
Code:
<script type="text/javascript"> {literal} //"Accept terms" form submission- By Dynamic Drive var checkobj function agreesubmit(el){ checkobj=el if (document.all||document.getElementById){ for (i=0;i<checkobj.form.length;i++){ var tempobj=checkobj.form.elements[i] if(tempobj.type.toLowerCase()=="button") tempobj.disabled=!checkobj.checked }}} {/literal} </script>

2. replace:
Code:
{$lng.txt_you_are_agree} "{$lng.lbl_terms_n_conditions}" {$lng.lbl_and} "{$lng.lbl_privacy_statement}".
with:
Code:
<input name="agreecheck" type="checkbox" onclick="agreesubmit(this)" /> {$lng.txt_you_are_agree} "{$lng.lbl_terms_n_conditions}" {$lng.lbl_and} "{$lng.lbl_privacy_statement}".
3. replace:
Code:
{include file="buttons/button.tpl" button_title=$lng.lbl_submit_order style="button" href=$button_href}
with:
Code:
<input type="button" value="{$lng.lbl_submit_order}" onclick="{$button_href}" style="padding: 4px; color: #BD0000; font-weight: bold;" disabled="disabled" />

Thats it! Using this hack, I have reduced the numbers of absurd questions by 30-40%.

New 4.2 and 4.3 version(11-25-2009): http://www.7dana.com/Must-Accept-terms-before-submitting-the-order/
__________________
_/ _/ _/ _/ _/ _/ _/ _/ _/

7dana.com
Reply With Quote