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 > Dev Questions
 
Thread Tools Search this Thread
  #51  
Old 11-01-2006, 02:11 PM
  ezi designs's Avatar 
ezi designs ezi designs is offline
 

Senior Member
  
Join Date: Sep 2006
Location: United Kingdom
Posts: 118
 

Exclamation Re: Must "Accept terms" before submitting the order

Probally a real easy one for someone, i have a java script error when installing the mod "must_accept_terms.zip". I am following the 4.1 instruction and the error code states the error lies at the following:

Line 18
Char 12
Expected '/"
Code 0

How i have entered it is from below and line 18 is {/literal}, any ideas ?


{capture name=dialog}
<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>
__________________
x-cart 4.1.6

DSEFU PRO

http.www.demontemplates.com
Reply With Quote
  #52  
Old 11-07-2006, 06:41 AM
  ezi designs's Avatar 
ezi designs ezi designs is offline
 

Senior Member
  
Join Date: Sep 2006
Location: United Kingdom
Posts: 118
 

Default Re: Must "Accept terms" before submitting the order

Can no one follow up on this for me
__________________
x-cart 4.1.6

DSEFU PRO

http.www.demontemplates.com
Reply With Quote
  #53  
Old 11-19-2006, 12:11 AM
 
andreas04031 andreas04031 is offline
 

Advanced Member
  
Join Date: Jun 2004
Location: Dallas, TX
Posts: 64
 

Default Re: Must "Accept terms" before submitting the order

did someone made this work for 3.5.9 version, I tried for hours tonight but I can't get it to work. All shows up but the third part of the code is not showing up, the "normal" submit button is available and it can be clicked without checking the box. Well the checkout.tpl is completely different in version 3.5.9

I also have a 4.1.3 version running and there it works like a charm.

Maybe someone did it already and know where to put the third code in, thanks, Andy
__________________
X-Cart version 3.5.9 (online)
X-Cart Version 4.0.19 (online)
X-Cart Version 4.1.3 (in dev)
PHP 4.4.4
MySQL 4.1.21
Reply With Quote
  #54  
Old 11-19-2006, 01:33 AM
  Zaja's Avatar 
Zaja Zaja is offline
 

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

Default Re: Must "Accept terms" before submitting the order

Andy, download this hack again, version 3.5.x is included.
http://www.7dana.com/free-xcart-mods.phtml
__________________
_/ _/ _/ _/ _/ _/ _/ _/ _/

7dana.com
Reply With Quote
  #55  
Old 11-19-2006, 06:41 AM
 
gastu gastu is offline
 

Senior Member
  
Join Date: Oct 2005
Location: Chile
Posts: 105
 

Default Re: Must "Accept terms" before submitting the order

zaja how can made for must "Accept terms" before register.
__________________
Gonzalo Astudillo Pizarro | https://about.me/gonzaloastudillo
Reply With Quote
  #56  
Old 11-19-2006, 09:04 AM
  Zaja's Avatar 
Zaja Zaja is offline
 

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

Default Re: Must "Accept terms" before submitting the order

Ok, registration page hack:

1. open skin/customer/main/register.tpl and add following code after {capture name=dialog}:
Code:
<script type="text/javascript"> {literal} 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:
{$lng.txt_terms_and_conditions_newbie_note}
with:
Code:
<input name="agreecheck" type="checkbox" onclick="agreesubmit(this)" /> {$lng.txt_terms_and_conditions_newbie_note}

3. replace:
{include file="buttons/submit.tpl" type="input" style="button" href="javascript: return check_registerform_fields();"}

with:
Code:
<input type="button" value="{$lng.lbl_submit}" onclick="javascript: return check_registerform_fields();" style="padding: 4px; color: #BD0000; font-weight: bold;" disabled="disabled" />
__________________
_/ _/ _/ _/ _/ _/ _/ _/ _/

7dana.com
Reply With Quote
  #57  
Old 11-19-2006, 09:25 AM
 
gastu gastu is offline
 

Senior Member
  
Join Date: Oct 2005
Location: Chile
Posts: 105
 

Default Re: Must "Accept terms" before submitting the order

nice!! thanks!
__________________
Gonzalo Astudillo Pizarro | https://about.me/gonzaloastudillo
Reply With Quote
  #58  
Old 11-19-2006, 09:35 PM
 
andreas04031 andreas04031 is offline
 

Advanced Member
  
Join Date: Jun 2004
Location: Dallas, TX
Posts: 64
 

Talking Re: Must "Accept terms" before submitting the order

thanks Zaja, now it works nice in 3.5.9
__________________
X-Cart version 3.5.9 (online)
X-Cart Version 4.0.19 (online)
X-Cart Version 4.1.3 (in dev)
PHP 4.4.4
MySQL 4.1.21
Reply With Quote
  #59  
Old 12-01-2006, 09:28 AM
 
just wondering just wondering is offline
 

X-Adept
  
Join Date: Oct 2006
Location: UK
Posts: 471
 

Default Re: Must "Accept terms" before submitting the order

Cheers Zaja, works great.

Only problem I have is that I want to make the 'Submit' Button on the Registration Page in the centre, but for some unknown reason it's slightly to the right of centre. Any ideas?

Man thanks.
__________________
Location: UK
X-Cart: Gold 4.4.2, Status: Finalizing
Template: Colors
Free Mods: Colour Coded Orders, FAQ Manager
Paid Mods: None... yet.
Server: Linux, Apache: 2.2.15 (Unix), MySQL: 5.0.90-community, PHP: 5.2.13
Reply With Quote
  #60  
Old 01-17-2007, 11:51 AM
 
Sisom Sisom is offline
 

eXpert
  
Join Date: Sep 2006
Posts: 310
 

Default Re: Must "Accept terms" before submitting the order

Hi Zaja, I just wanted to say a big THANKYOU for this mod, I've used it on my checkout page, and also on my registration page, and it looks great, I'm sure it will save a lot of hassles in the future.
Much appreciated!
__________________
X-Cart Gold Version 4.3.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 AM.

   

 
X-Cart forums © 2001-2020