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

Remove Terms & Conditions Checkbox for 4.6.1

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-05-2013, 03:38 AM
 
kidroush kidroush is offline
 

Advanced Member
  
Join Date: Apr 2008
Posts: 80
 

Default Remove Terms & Conditions Checkbox for 4.6.1

I see many posts on how to remove the terms and conditions checkbox on the checkout page for earlier versions of xcart but I don't see how to do so for version 4.6.1.

I am using One Page AJAX checkout. You would think there would be a checkbox in the admin panel to disable this feature?
__________________
Lance
X-Cart Gold Version 4.6.1
Reply With Quote
  #2  
Old 10-05-2013, 08:48 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Remove Terms & Conditions Checkbox for 4.6.1

No there isn't. The easiest way to do this is to replace the code for it in the template with hidden field and make it checked
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 10-05-2013, 09:18 AM
 
kidroush kidroush is offline
 

Advanced Member
  
Join Date: Apr 2008
Posts: 80
 

Default Re: Remove Terms & Conditions Checkbox for 4.6.1

Can you provide a little tutorial to do this?
__________________
Lance
X-Cart Gold Version 4.6.1
Reply With Quote
  #4  
Old 10-05-2013, 09:29 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Remove Terms & Conditions Checkbox for 4.6.1

In skin/common_files/modules/One_Page_Checkout/opc_summary.tpl replace

Code:
<div class="terms_n_conditions"> <label for="accept_terms"> <input type="checkbox" name="accept_terms" id="accept_terms" value="Y" /> {$lng.txt_terms_and_conditions_note|substitute:"terms_url":"`$xcart_web_dir`/pages.php?alias=conditions":"privacy_url":"`$xcart_web_dir`/pages.php?alias=business"} </label> </div>

with

Code:
<input type="hidden" name="accept_terms" id="accept_terms" value="Y" /> {* <div class="terms_n_conditions"> <label for="accept_terms"> <input type="checkbox" name="accept_terms" id="accept_terms" value="Y" /> {$lng.txt_terms_and_conditions_note|substitute:"terms_url":"`$xcart_web_dir`/pages.php?alias=conditions":"privacy_url":"`$xcart_web_dir`/pages.php?alias=business"} </label> </div> *}
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 10-05-2013, 09:42 AM
 
kidroush kidroush is offline
 

Advanced Member
  
Join Date: Apr 2008
Posts: 80
 

Default Re: Remove Terms & Conditions Checkbox for 4.6.1

It removed the checkbox but now I get a popup error that says you must accept terms and conditions.
__________________
Lance
X-Cart Gold Version 4.6.1
Reply With Quote
  #6  
Old 10-05-2013, 09:44 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Remove Terms & Conditions Checkbox for 4.6.1

skin/common_files/modules/One_Page_Checkout/opc_init_js.tpl

replace

Code:
var termsObj = $('#accept_terms')[0]; if (termsObj && !termsObj.checked) { xAlert(txt_accept_terms_err, '', 'W'); return false; }

with

Code:
/* var termsObj = $('#accept_terms')[0]; if (termsObj && !termsObj.checked) { xAlert(txt_accept_terms_err, '', 'W'); return false; } */
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #7  
Old 10-05-2013, 09:48 AM
 
kidroush kidroush is offline
 

Advanced Member
  
Join Date: Apr 2008
Posts: 80
 

Default Re: Remove Terms & Conditions Checkbox for 4.6.1

I added checked="checked" and it worked perfect:

PHP Code:
<input type="hidden" name="accept_terms" id="accept_terms" value="Y"  checked="checked" /> 
{*  <
div class="terms_n_conditions">      <label for="accept_terms">       <input type="checkbox"  name="accept_terms" id="accept_terms" value="Y" />        
{
$lng.txt_terms_and_conditions_note|substitute:"terms_url":"`$xcart_web_dir`/pages.php?alias=conditions":"privacy_url":"`$xcart_web_dir`/pages.php?alias=business"}      </label>   </div> *} 
__________________
Lance
X-Cart Gold Version 4.6.1
Reply With Quote
  #8  
Old 10-05-2013, 09:52 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Remove Terms & Conditions Checkbox for 4.6.1

hidden fields do not have this attribute so technically putting "checked" on it is not correct
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #9  
Old 10-05-2013, 01:38 PM
 
kidroush kidroush is offline
 

Advanced Member
  
Join Date: Apr 2008
Posts: 80
 

Default Re: Remove Terms & Conditions Checkbox for 4.6.1

Well it got rid of the error message
Quote:
Originally Posted by cflsystems
hidden fields do nto have this attribute so technically putting "checked" on it is not correct
__________________
Lance
X-Cart Gold Version 4.6.1
Reply With Quote
  #10  
Old 10-05-2013, 04:48 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Remove Terms & Conditions Checkbox for 4.6.1

You can also use css to hide the div

{ display:none; }

or if you want to preserve the page layout, use

{ visibility:hidden; }

both are useful in their own ways
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote

The following user thanks carpeperdiem for this useful post:
totaltec (10-12-2013)
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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:28 PM.

   

 
X-Cart forums © 2001-2020