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)

Zaja 03-18-2006 08:04 AM

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%. 8O

New 4.2 and 4.3 version(11-25-2009): http://www.7dana.com/Must-Accept-terms-before-submitting-the-order/

kenwood 03-18-2006 08:19 AM

Fine, thanx. And please now this hack for different languages.

B00MER 03-18-2006 08:39 AM

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.

:mrgreen:

kenwood 03-18-2006 09:18 AM

perfect, thanx

nfc5382 06-20-2006 03:04 AM

thanks! great mod

crazyoval 06-21-2006 05:25 AM

some of this code is not around in 4.1, any ideas on what changes are required in 4.1? thanks

Zaja 06-26-2006 01:48 AM

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!

crazyoval 06-26-2006 01:56 AM

cheers Zaja! thank you.

Im using your Soft Blue template by the way :D

Amy 07-13-2006 06:17 AM

great add on - will test it out soon.

jeeya 07-13-2006 09:47 PM

Thanks! Works Perfect in 4.1.2.

dillion 07-16-2006 05:09 PM

Looks like a great mod, one question though - and it is probably a silly one. I have installed the mod, but the only thing that appears on the checkout page is the check box and the submit button. Works fine, but no verbage. Where and how do you enter " I have read and agree to the "Terms & Conditions" and "Privacy statement"

Zaja 07-16-2006 05:56 PM

If no text is displayed you need to walk through the installation process again.
4.1.x version: http://forum.x-cart.com/viewtopic.php?p=143036#143036

2coolbaby 07-18-2006 01:15 PM

Great Mod!
 
Thanks so much for the Mod. It is just what I need to protect our products from unscrupulous theives who try to steal our copyrighted info. I REALLY do appreciate this easy to install mod.

crazyoval 07-19-2006 12:37 AM

nice site 2coolbaby but I was wondering how this mod "protects" your copyright?

All it does is ensures customers have ticked to say they have read and agreed your terms so that if you find they are infringing copyright you can choose to sue them. This isnt protection as such in my opinion.

I have similar challenges with egoods you see and have a number of ways to protect my work, not all of which I have implemented.

Thanks

2coolbaby 07-19-2006 10:47 AM

By them having to click their acceptance before purchase is called a Click Wrap Agreement. It is as good as a signature stating that they accept my terms. My Terms & Conditions are my EULA. This protects against copying, usage, disseminating and other items. It will stand up in a court of law, whereas it is harder to make a case without the Click Wrap Agreement. I had a company steal my complete method of game play and now they are a competitor. Not much of one as they still can't write (can't steal talent)! But anyway my lawyer helped me create my EULA and told me that I needed a method for them to have to accept it before being able to purchase. This does that. If they do not click on the acceptance check box, then they cannot purchase.

photo 07-20-2006 03:32 AM

Nice mod! Thanks for sharing Zaja \:D/

crazyoval 07-20-2006 03:43 AM

yes Mary Lee, I see, so they can take it, but cant market it.

2coolbaby 07-20-2006 08:05 AM

It really is just a legal agreement that helps you in the event you have to pursue someone legally for whatever reason. If they agreed to something in your Terms & Conditions and your Privacy Policy, then you have them on record as legally agreeing to that with the Click Wrap Agreement.

I not only have copying or theft info in my EULA, but I also have liability claims statements that can help protect me in the event of a lawsuit.

There are many reasons to have a EULA & Click Wrap Agreements (checkbox before buying) have stood up in court again and again as binding, so if you are trying to protect something including your business it is a good idea to have a EULA and this mod!

crazyoval 07-20-2006 09:04 AM

yes I see. as a matter of interest though, how do you go about actually proving to a court that they did click the agreement? surely a court would want to see a log that listed this event because maybe your thief would say that the tick box was not in place when he/she purchased? Maybe Im splitting hairs (but actually I am very interested) but Im wondering what you could do to present this as evidence and be able to convince a court that how ever you present this to the court is actually a true and accurate representation of what happend?

Thanks

2coolbaby 07-20-2006 09:58 AM

I am not really sure how you would prove that. I had read on one case that a judge visited the website and viewed the Click Wrap agreement and choose to enforce it. Here is a site that covers all of this much more:

http://grove.ufl.edu/~techlaw/vol4/issue3/friedman.html

My guess is that as it is a part of the shopping cart system on my site now, they would consider it having exissted. Even before the click to accept I had a statement above the Submit buttons stating that by Clicking on the Submit button that they were agreeing to accept our Terms & Conditions, which were linked to the terms. My last software had the click wrap lisence built into it.

TL408 07-20-2006 10:05 AM

Will this work with version 4.1.2 ?

Thanks
-Tuan

crazyoval 07-20-2006 10:19 AM

Mary I wonder if you might get your lawyer to witness the site and date that he had seen it in existence on the date he/she saw it. At least you might be better prepared for some avoidance tactics. I also wonder if your hoster might be able to prove via a tape backup library that it was in pace too....

..just some thoughts that might be useful.

Thanks for the discussion.

Zaja 07-20-2006 10:22 AM

Quote:

Originally Posted by TL408
Will this work with version 4.1.2 ?

Thanks
-Tuan

Yes. :wink:

fractalspin 08-01-2006 07:43 AM

Hm.. I followed the directions in the first post, (since Zaja's second post references a "Fast_Lane_Checkout" module that I didn't see), but when I go to checkout, I see a stuck, red "SUBMIT ORDER" button that doesn't get "unstuck" by clicking the checkbox.

Does this not work with 4.1.7?

2coolbaby 08-01-2006 08:07 AM

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

crazyoval 08-01-2006 08:07 AM

for 4.1x use Zaja's post dated: Mon Jun 26, 2006 4:48 am. It first details fast checkout but then at the bottom references the normal checkout too. It works fine.

Like your products btw fractalspin

fractalspin 08-01-2006 09:27 AM

2coolbaby: I can get it to work in the same browser I'm using to test my site, so it's definitely not on my side

crazyoval: glad you like our stuff!

I tried using the code from Zaja's second post, but doing this instead in the second part, because the language tags are different:

Code:

<INPUT type="hidden" name="payment_method" value="{$payment_data.payment_method}">

<input name="agreecheck" type="checkbox" onclick="agreesubmit(this)" />

{$lng.txt_you_are_agree}


but I still get the same results... hrm.

Zaja 08-01-2006 10:21 AM

Fractalspin, maybe your checkout.tpl is alredy changed or replaced with some custom modul, for example Easy Checkout?

fractalspin 08-01-2006 10:31 AM

oh--yes, i have EZ checkout. does that make it a no-go?

Zaja 08-01-2006 02:54 PM

Quote:

oh--yes, i have EZ checkout. does that make it a no-go?

Can be easily adapted but unfortunately I don't have EZ checkout mod.

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 12:26 AM.

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