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)

ecommerce 08-02-2006 09:27 AM

zaja its awsome! good catch on teh language boomer.

ecommerce 08-02-2006 09:30 AM

Quote:

Originally Posted by 2coolbaby
I have 4.0.18, but I do not think there is that much difference. I would think it would work. Do me a favor and go to my site and go through the purchase process... don't fill in credit card info, just see if the click box and submit works for you if you check it. This will tell us if it is implemntation of the script or if it is your browser or computer.

Here is the store:

http://www.dinnerandamurder.com/store/catalog/index.html


works on win xp pro with ie 6.0

ecommerce 08-26-2006 08:21 AM

Re: Must "Accept terms" before submitting the order
 
anybody got zaja's mod to work with ez check out?

Zaja 08-26-2006 12:42 PM

Re: Must "Accept terms" before submitting the order
 
Installation for ezCheckout users on 4.0.18, 4.0.19:

1. open skin/customer/main/checkout.tpl and add following code at the top of the file:
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} <A href="help.php?section=conditions" target="_blank">"{$lng.lbl_terms_n_conditions}"</A> {$lng.lbl_and} <A href="help.php?section=business" target="_blank">"{$lng.lbl_privacy_statement}"</A>.
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" />
4. Clean templates_c directory!

Thats it!

ecommerce 08-26-2006 02:12 PM

Re: Must "Accept terms" before submitting the order
 
Thanks Zaja!

1. How do I clean Template_c directory? (in simple newbie terms)

2. What effect does cleaning Template_c directory have on the store?

2019 08-30-2006 11:16 PM

Re: Must "Accept terms" before submitting the order
 
thank you guys

photo 09-11-2006 10:04 AM

Re: Must "Accept terms" before submitting the order
 
Is there a way to have it so if they did Not check the check box and tryed to hit submit that a popup would show telling them they have to agree to the terms and conditions?

Thanks

Zaja 09-11-2006 11:45 AM

Re: Must "Accept terms" before submitting the order
 
Yes, very easy..using javascript form validation.

2coolbaby 09-11-2006 01:32 PM

Re: Must "Accept terms" before submitting the order
 
Details would be great:-)

Zaja 09-11-2006 01:56 PM

Re: Must "Accept terms" before submitting the order
 
Ahh yes...sorry, I wasn't enough clear. I mean, this can be done very easy, but can't be part of this mode...different concept. The basic idea of the "Accept terms" mod is disabling the Submit button until the check box indicate compliance.


All times are GMT -8. The time now is 01:50 PM.

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