Jump to content

Terms & Conditions


madmega

Recommended Posts

Hi, i've noticed that the Terms & Conditions check box stays checked when i reload the page, or when i visit another page and come back.

What i need is to let it uncheck when the page is reloaded.

I've found this so far:

classes/FrontController.php

after line 94 add this:

unset($cookie->checkedTOS);

 

But it doesn't seem to work, and i also found this:
 

 

 

in order-carrier.tpl:

in lines 58-64
{if isset($virtual_cart) && !$virtual_cart && $giftAllowed && $cart->gift == 1}
<script type="text/javascript">
{literal}
// <![CDATA[
    $('document').ready( function(){
        if ($('input#gift').is(':checked'))
            $('p#gift_div').show();

there an additional line was added (new line 63):
{if isset($virtual_cart) && !$virtual_cart && $giftAllowed && $cart->gift == 1}
<script type="text/javascript">
{literal}
// <![CDATA[
    $('document').ready( function(){
        alert("ChangeReadyfunction");
        if ($('input#gift').is(':checked'))
            $('p#gift_div').show();

and in /mytheme/js/tools.js:

after line 229:
$(document).ready(function() {

this was added:
    var paypalCheckbox = document.getElementById('cgv');
    if (paypalCheckbox != null) {
        updatePaymentMethodsDisplay();

But that also doesn't seem to work...and i simply cannot delete the Terms and Conditions.

 

Link to comment
Share on other sites

there is a code like

<input type="checkbox" name="cgv" id="cgv" value="1" {if $checkedTOS}checked="checked"{/if} />

change it to

<input type="checkbox" name="cgv" id="cgv" value="1" />

after that recompile your template (turn off cache and turn on force compile)

Link to comment
Share on other sites

I did this before but it is not working, when i check it, and then refresh, or visit another page and go back to checkout, it is still checked.
It has to uncheck.
I want the customer to check it every time the page refreshes, and only then show the carrier options.

Link to comment
Share on other sites

I am sorry but this doesn't work, it stays checked.

I found a code were it unchecks, but the problem was that the shipping options were still visible.

Normally when a customer is inside the order, they have to check the Terms & Conditions check box, and then the carrier options become visible, if they uncheck the Terms & Conditions check box, the carrier options go away.
And that is exactly what i want, because there are certain carriers inside the carrier options, that are not available for certain pickup locations, problem is when your refresh the page, those carrier options DO become available for the pickup locations you do not want them to be available in.

Link to comment
Share on other sites

and you also recompiled theme and cleared cache? :|

I tried it again with a different browser, the checkbox is unchecked but the carrier options are shown, and they shouldn't when the checkbox is unchecked.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...