Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Must "Accept terms" before submitting the order
 
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features
 
Thread Tools Search this Thread
  #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

The following 2 users thank Zaja for this useful post:
donavichi (10-25-2009), littlebird1111 (12-15-2009)
  #2  
Old 03-18-2006, 08:19 AM
 
kenwood kenwood is offline
 

Advanced Member
  
Join Date: Jan 2006
Posts: 34
 

Default

Fine, thanx. And please now this hack for different languages.
__________________
XCart Gold [Linux] Version 4.0.18 - 7Dana Design - Germany (Cologne)
Reply With Quote
  #3  
Old 03-18-2006, 08:39 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Quote:
Originally Posted by kenwood
Fine, thanks. And please now this hack for different languages.

Zaja kindly used language variables and no hard set text in the template. This mod can easily be localized.

Code:
alert("You must read accept terms to submit order")

Only part that isn't is the JS error alert.

Just change this to:

Code:
alert("{/literal}{$lng.txt_error_must_read|replace:"'":"\'"}{literal}")

Nice modification, defiantly something I never thought about. It's interesting how many don't read up before completing a purchase.

__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #4  
Old 03-18-2006, 09:18 AM
 
kenwood kenwood is offline
 

Advanced Member
  
Join Date: Jan 2006
Posts: 34
 

Default

perfect, thanx
__________________
XCart Gold [Linux] Version 4.0.18 - 7Dana Design - Germany (Cologne)
Reply With Quote
  #5  
Old 06-20-2006, 03:04 AM
 
nfc5382 nfc5382 is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 452
 

Default

thanks! great mod
__________________
-----------------------
x-cart v4.7.6 [LIVE]
x-cart v4.0.18 [retired 2004-2016]
x-cart v3.5.13 [retired]
x-cart v3.4.14 [retired]
Reply With Quote
  #6  
Old 06-21-2006, 05:25 AM
  crazyoval's Avatar 
crazyoval crazyoval is offline
 

X-Adept
  
Join Date: Jun 2006
Location: UK
Posts: 559
 

Default

some of this code is not around in 4.1, any ideas on what changes are required in 4.1? thanks
__________________
X-Cart 4.1.11 on Linux
HandsOnWebHosting: Very helpful & professional
Custom Skin Design by ARS.
Numerous, ney, hundreds of modifications by ARS.
AlteredCart: Download Expander, One Page Checkout,
BCS Engineering: Great team, Top service.
WebsiteCM: good products & very professional
CDSEO, Hidden Categories, Custom Work
Magnetic One Store Manager: Brill
Forms To Go: Excellent+A+support
Reply With Quote
  #7  
Old 06-26-2006, 01:48 AM
  Zaja's Avatar 
Zaja Zaja is offline
 

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

Default

v. 4.1.1, 4.1.2, 4.1.3:
-----------------

1. open skin/modules/Fast_Lane_Checkout/checkout_3_place.tpl and add following code after {capture name=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_terms_and_conditions_note}
with:
Code:
<input name="agreecheck" type="checkbox" onclick="agreesubmit(this)" /> {$lng.txt_terms_and_conditions_note}

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" />

4. Repeat procedure in skin/customer/main/checkout.tpl (add javascript code after {capture name=checkout_dialog})

Thats it!
__________________
_/ _/ _/ _/ _/ _/ _/ _/ _/

7dana.com
Reply With Quote

The following 2 users thank Zaja for this useful post:
chamberinternet (07-27-2009), wwoj (12-04-2012)
  #8  
Old 06-26-2006, 01:56 AM
  crazyoval's Avatar 
crazyoval crazyoval is offline
 

X-Adept
  
Join Date: Jun 2006
Location: UK
Posts: 559
 

Default

cheers Zaja! thank you.

Im using your Soft Blue template by the way
__________________
X-Cart 4.1.11 on Linux
HandsOnWebHosting: Very helpful & professional
Custom Skin Design by ARS.
Numerous, ney, hundreds of modifications by ARS.
AlteredCart: Download Expander, One Page Checkout,
BCS Engineering: Great team, Top service.
WebsiteCM: good products & very professional
CDSEO, Hidden Categories, Custom Work
Magnetic One Store Manager: Brill
Forms To Go: Excellent+A+support
Reply With Quote
  #9  
Old 07-13-2006, 06:17 AM
 
Amy Amy is offline
 

Senior Member
  
Join Date: Feb 2004
Posts: 147
 

Default

great add on - will test it out soon.
__________________
X-Cart Pro 4.0.19; Unix

Other:
XAOM
XOffers
XGift Reg

Other Mods:
Customers Who Also Bought, Download Link Regenerate, Easy Checkout, Newest Products, SEO/CDSEO, Marketing Manager Pro, View Wishlist for Providers (custom by xcart), Email New Releases (a fav!), Telefirma's Dynamic Image Generator, Download Links on Invoice
Reply With Quote
  #10  
Old 07-13-2006, 09:47 PM
 
jeeya jeeya is offline
 

X-Adept
  
Join Date: May 2003
Location: USA
Posts: 807
 

Default

Thanks! Works Perfect in 4.1.2.
__________________
X-Cart Version 4.1.8
Hosted on Linux
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:13 AM.

   

 
X-Cart forums © 2001-2018