Jump to content

Accept terms & conditions before purchase or dl


Guest

Recommended Posts

  • 3 weeks later...

  • 2 weeks later...
Guest ianfitch

This should work as a way to get people to agree to your terms before they checkout. Be aware though, it uses javascript so people can bypass it if they really want to.

open cart.tpl and replace:

<!-- END: step_4 -->


with:


<p>I have read and agree to the <a href="#" onclick="javascript:openPopUp('index.php?act=viewDoc&docId=3', 'Terms & Conditions', '500', '600', 1)">Terms & Conditions</a> *

    <input name="terms" type="checkbox" tabindex="17" value="1" /></p>

<!-- END: step_4 -->




Open cart.inc.php and replace:	  


$view_cart->assign("CONT_VAL","cart.php?act=step5");


with:


$view_cart->assign("CONT_VAL","cart.php?act=step5\" onclick=\"if (document.cart.terms.checked == false ){alert('You must read and agree to our terms and conditions to continue.');return false; document.cart.terms.focus()}else{return true;}\"");




The link opens up the terms and conditions in a pop up window, but includes all the navigation etc.

If you're happy with that you can stop here but if you want a cleaner pop-up page showing only the terms and conditions, change the link in the code above to:




<p>I have read and agree to the <a href="#" onclick="javascript:openPopUp('content.php?act=viewDoc&docId=3', 'Terms & Conditions', '500', '600', 1)">Terms & Conditions</a> *

    <input name="terms" type="checkbox" tabindex="17" value="1" /></p>

<!-- END: step_4 -->


(basically changing the link from index.php to content.php)



Then create a new file called content.php and save it to the cubecart top level directory.

Paste this into content.php:




<?php

/*

+--------------------------------------------------------------------------

|   CubeCart v3.0.3

|   ========================================

|   by Alistair Brookbanks

|	CubeCart is a Trade Mark of Devellion Limited

|   (c) 2005 Devellion Limited

|   Devellion Limited,

|   Westfield Lodge,

|   Westland Green,

|   Little Hadham,

|   Nr Ware, HERTS.

|   SG11 2AL

|   UNITED KINGDOM

|   http://www.devellion.com

|	UK Private Limited Company No. 5323904

|   ========================================

|   Web: http://www.cubecart.com

|   Date: Thursday, 22 September 2005

|   Email: info (at) cubecart (dot) com

|	License Type: CubeCart is NOT Open Source Software and Limitations Apply 

|   Licence Info: http://www.cubecart.com/site/faq/license.php

+--------------------------------------------------------------------------

|	content.php

|   ========================================

|	Show only content page

+--------------------------------------------------------------------------

*/

	include_once("includes/ini.inc.php");

	

	// FIRE UP THE SESSION

	session_start();

	

	// INCLUDE CORE VARIABLES & FUNCTIONS

	include_once("includes/global.inc.php");

	

	// check if installed

	if($glob['installed']==0){

	

  header("location: install/index.php");

  exit;

  

	} elseif((file_exists($glob['rootDir']."/install/index.php") || file_exists($glob['rootDir']."/upgrade.php") && $glob['installed']==1)){

	

  echo "<strong>WARNING</strong> - Your store will not function until the install directory and/or upgrade.php is deleted from the server.";

  exit;

  

	}

	

	// initiate db class

	include_once("classes/db.inc.php");

	$db = new db();

	include_once("includes/functions.inc.php");

	$config = fetchDbConfig("config");



	include_once("includes/sslSwitch.inc.php");

	

	// get session data

	include_once("includes/session.inc.php");

	

	// get exchange rates etc

	include_once("includes/currencyVars.inc.php");

	

	$lang_folder = "";

	

	if(empty($ccUserData[0]['lang'])){

  $lang_folder = $config['defaultLang'];

	} else {

  $lang_folder = $ccUserData[0]['lang'];

	}

	include_once("language/".$lang_folder."/lang.inc.php");

	

	// require template class

	include_once("classes/xtpl.php");

	

	$body = new XTemplate ("skins/".$config['skinDir']."/styleTemplates/global/index.tpl");



    include("includes/content/viewDoc.inc.php");

    $body->assign("PAGE_CONTENT",$page_content);

	

	// parse and spit out final document

	$body->parse("body");

	$body->out("body");

?>

Link to comment
Share on other sites

  • 3 months later...

Hi,

Thanks to ianfitch I have successfully installed the terms and condition mod. Most people have their pop ups blocked these days so had to customise it a bit but after that it works pefectly.

Would anyone know though how to make that a part of the email we get from Cubecart with customers order details? We need to be able to prove that our customers have accepted T&C if such event occurs? Any ideas?

Miriam (merlin)

Link to comment
Share on other sites

  • 3 weeks later...
Guest nyvagyrl

Maybe a stupid question but where would one find cart.tpl and cart.inc.php? Would the "top level" be the main folder on the server or something else?

Sorry, but I am very new to this.

Thanks in advance.

NyVa

This should work as a way to get people to agree to your terms before they checkout. Be aware though, it uses javascript so people can bypass it if they really want to.

open cart.tpl and replace:

<!-- END: step_4 -->


with:


<p>I have read and agree to the <a href="#" onclick="java script:openPopUp('index.php?act=viewDoc&docId=3', 'Terms & Conditions', '500', '600', 1)">Terms & Conditions</a> *

	<input name="terms" type="checkbox" tabindex="17" value="1" /></p>

<!-- END: step_4 -->




Open cart.inc.php and replace:	  


$view_cart->assign("CONT_VAL","cart.php?act=step5");


with:


$view_cart->assign("CONT_VAL","cart.php?act=step5\" onclick=\"if (document.cart.terms.checked == false ){alert('You must read and agree to our terms and conditions to continue.');return false; document.cart.terms.focus()}else{return true;}\"");




The link opens up the terms and conditions in a pop up window, but includes all the navigation etc.

If you're happy with that you can stop here but if you want a cleaner pop-up page showing only the terms and conditions, change the link in the code above to:




<p>I have read and agree to the <a href="#" onclick="java script:openPopUp('content.php?act=viewDoc&docId=3', 'Terms & Conditions', '500', '600', 1)">Terms & Conditions</a> *

	<input name="terms" type="checkbox" tabindex="17" value="1" /></p>

<!-- END: step_4 -->


(basically changing the link from index.php to content.php)



Then create a new file called content.php and save it to the cubecart top level directory.

Paste this into content.php:




<?php

/*

+--------------------------------------------------------------------------

|   CubeCart v3.0.3

|   ========================================

|   by Alistair Brookbanks

|	CubeCart is a Trade Mark of Devellion Limited

|   (c) 2005 Devellion Limited

|   Devellion Limited,

|   Westfield Lodge,

|   Westland Green,

|   Little Hadham,

|   Nr Ware, HERTS.

|   SG11 2AL

|   UNITED KINGDOM

|   http://www.devellion.com

|	UK Private Limited Company No. 5323904

|   ========================================

|   Web: http://www.cubecart.com

|   Date: Thursday, 22 September 2005

|   Email: info (at) cubecart (dot) com

|	License Type: CubeCart is NOT Open Source Software and Limitations Apply 

|   Licence Info: http://www.cubecart.com/site/faq/license.php

+--------------------------------------------------------------------------

|	content.php

|   ========================================

|	Show only content page

+--------------------------------------------------------------------------

*/

	include_once("includes/ini.inc.php");

	

	// FIRE UP THE SESSION

	session_start();

	

	// INCLUDE CORE VARIABLES & FUNCTIONS

	include_once("includes/global.inc.php");

	

	// check if installed

	if($glob['installed']==0){

	

  header("location: install/index.php");

  exit;

  

	} elseif((file_exists($glob['rootDir']."/install/index.php") || file_exists($glob['rootDir']."/upgrade.php") && $glob['installed']==1)){

	

  echo "<strong>WARNING</strong> - Your store will not function until the install directory and/or upgrade.php is deleted from the server.";

  exit;

  

	}

	

	// initiate db class

	include_once("classes/db.inc.php");

	$db = new db();

	include_once("includes/functions.inc.php");

	$config = fetchDbConfig("config");



	include_once("includes/sslSwitch.inc.php");

	

	// get session data

	include_once("includes/session.inc.php");

	

	// get exchange rates etc

	include_once("includes/currencyVars.inc.php");

	

	$lang_folder = "";

	

	if(empty($ccUserData[0]['lang'])){

  $lang_folder = $config['defaultLang'];

	} else {

  $lang_folder = $ccUserData[0]['lang'];

	}

	include_once("language/".$lang_folder."/lang.inc.php");

	

	// require template class

	include_once("classes/xtpl.php");

	

	$body = new XTemplate ("skins/".$config['skinDir']."/styleTemplates/global/index.tpl");



	include("includes/content/viewDoc.inc.php");

	$body->assign("PAGE_CONTENT",$page_content);

	

	// parse and spit out final document

	$body->parse("body");

	$body->out("body");

?>

Link to comment
Share on other sites

Cart.tpl is in Skins/Legend(or whichever skin you're using)/StyleTemplates/Content.

Cart.inc.php is in Includes/Content.

Hope this helps. What kind of proof that the customer has accepted your t&c do you get if I may ask?

Miriam (merlin)

Link to comment
Share on other sites

Guest nyvagyrl

I guess I really can't show any proof. I want to put this check box in the order form and hope people use it. I think since the instructions provided allows the purchaser to by pass it if they want, what I have done so far is post a message on my terms and conditions stating that all purchases are subjected to these conditions whether they accept or not as long as they are utilizing the site. I will post a message on each product telling the customer that their usage of the site is subjected to the terms and conditions. I am not live yet and I actually done all this time morning. I have not consulted an attorney to see if that is legal as of yet but I have time. I hope someone has an idea of how this can be fixed so we can avoid any types of problems with the customer in regards to them accepting the terms and conditions. With that said, I thought that would be the best I can do at this time. I am assuming since there are many thousands of people who use Cube Cart and are up and running live, I thought at least posting the message that their use of my site is their acceptance of the terms that are posted. I don't know, what do you think?

Just to further expand on this, I have not used the code yet but it look like it says the customer must agree to the terms. I think if they don't agree then they just can't use the site. Since, I haven't used the code yet, I don't know this but how you we know if they checked it or not? Is it on the order page?

Cart.tpl is in Skins/Legend(or whichever skin you're using)/StyleTemplates/Content.

Cart.inc.php is in Includes/Content.

Hope this helps. What kind of proof that the customer has accepted your t&c do you get if I may ask?

Miriam (merlin)

I ran my mouth... well fingers so long that I forgot to thank you for the instructions. Silly me. ;)

Thank you for the instructions. :(

NyVa

Cart.tpl is in Skins/Legend(or whichever skin you're using)/StyleTemplates/Content.

Cart.inc.php is in Includes/Content.

Hope this helps. What kind of proof that the customer has accepted your t&c do you get if I may ask?

Miriam (merlin)

Link to comment
Share on other sites

  • 1 year later...

Is there any way to do this by modding the PHP code and not use JavaScript?

Thanks :blink:

I put it into version 3.17 but i get on the first 2 carts no problems but when i want to put the extra "content.php" it say wrong on line 325 in cart.inc

When i go 1 step back (so no "content.php") than it work for 70% meaning i see the line at the cart and i can put a V but i can also leave it away because both work?

So or i do somthing wrong or this script is not for the latest version?

Please let me know

William

(from Holland)

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...