X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Must "Accept terms" before submitting the order (https://forum.x-cart.com/showthread.php?t=20597)

ezi designs 11-01-2006 02:11 PM

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>

ezi designs 11-07-2006 06:41 AM

Re: Must "Accept terms" before submitting the order
 
Can no one follow up on this for me

andreas04031 11-19-2006 12:11 AM

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

Zaja 11-19-2006 01:33 AM

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

gastu 11-19-2006 06:41 AM

Re: Must "Accept terms" before submitting the order
 
zaja how can made for must "Accept terms" before register.

Zaja 11-19-2006 09:04 AM

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

gastu 11-19-2006 09:25 AM

Re: Must "Accept terms" before submitting the order
 
nice!! thanks! :D

andreas04031 11-19-2006 09:35 PM

Re: Must "Accept terms" before submitting the order
 
thanks Zaja, now it works nice in 3.5.9

just wondering 12-01-2006 09:28 AM

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.

Sisom 01-17-2007 11:51 AM

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!


All times are GMT -8. The time now is 10:57 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.