Jump to content

GDPR Module - No privacy policy tickbox on checkout (only on standard signup form)


dipslides

Recommended Posts

Hello,

We have noticed an issue with the official prestashop GDPR module v1.0.3 on PrestaShop 1.7.3.2.

When a customer goes to create an account via https://domain/login?create_account=1 they get the privacy tickbox.

signup fine.PNG

However, if they add an item to the basket and go through the checkout (e.g. https://domain/order), on step 1 "personal information" the privacy tick box is not displayed:

notick.JPG

We are using the default prestashop theme with a few CSS changes (nothing that should alter the signup form).

What we have tried:

1) Clearing all caching and forcing re-compile.
2) Deleting / Re-installing GDPR module.
3) Switching to a clean default copy of the theme.
4) Reviewed hooks (which look to be correct but advice on this is appreciated).
5) Updated to 1.7.3.3.

Same issue still persists.

Anyone got any ideas?

 

Edited by dipslides (see edit history)
Link to comment
Share on other sites

@toplakd - if you look carefully the user hasn't signed up yet.

I actually have the same issue as dipslides. I've deactivated the guest checkout option and basically the user wants to purchase something WITHOUT creating an account first  they will end up on the above screenshot.  To reproduce this on your install just deactivate guest checkout > head to the store > add anything into your cart > proceed to checkout. And now you'll end up on the above page.

Basically this is an actual issue and not a feature per say. Any idea on how could I possibly add the checkbox on the checkout account creation page?

EDIT: after looking for answers online I've found this -> http://disq.us/p/1sht8wx. Basically what we need/want doesn't seem to be implemented. Did anyone find a solution for this or should we wait for an update from the developers?

 
Thanks heaps.

Edited by mrzsozso (see edit history)
  • Like 1
Link to comment
Share on other sites

Hi @mrzsozso, I haven't found a solution yet and and sadly have had to put the site into maintenance mode to avoid breaching GDPR regulation. We purchased the same module for another PS site (running PS 1.6) and it worked without any issues (just the free version for 1.7 that doesn't seem to have the tickbox feature). I'm not sure this is a bug but instead I think it may have been missed in the module design. There is a tickbox for terms & privacy (so not two tick boxes but just one for both) but this is not good enough for GDPR (needs to be separate tick boxes).

I am looking at trying to code up a tick box manually (won't store the 'ticked' status in the database etc but at least it will mean the user can't proceed without ticking the box and in turn allow us to put the site back online). Will share code in here.

Edited by dipslides (see edit history)
Link to comment
Share on other sites

Ok so I worked out/coded a work around for now. It's not perfect but it will allow you to at least keep your store open. I haven't tested it on mobile devices (will likely need extra work).

In brief, it will hide the continue button unless the privacy policy button has been ticked :) 

1) Backup your /themes/<your theme>/templates/checkout/_partials/customer-form.tpl file

2) Open /themes/<your theme>/templates/checkout/_partials/customer-form.tpl

3) Locate line 40 ({block "form_buttons"}) and add the below on a new line:

{literal}   
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
    $('#mycheckbox').change(function() {
        $('#mycheckboxdiv').toggle();
    });
});
</script>
{/literal}

<div class="form-group row ">
	<label class="col-md-3 form-control-label"></label>
    <div class="col-md-6">
	<span class="custom-checkbox">
  		<input id="mycheckbox" type="checkbox" value="1">
  		<span><i class="material-icons checkbox-checked"></i></span>
  		<label>I agree to the privacy Policy<br>
    	<em><a href="PRIVACY URL" target="_NEW">Click here to view our privacy policy in a new window</a></em>
        </label>
  	</span>
    </div>
    <div class="col-md-3 form-control-comment"> </div>
</div>

<div id="mycheckboxdiv" style="display:none">

Next before the final "{/block}" but after the final "</button>" add:

</div>

So to recap, the whole code will look like:

{**
 * 2007-2017 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to [email protected] so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 * @author    PrestaShop SA <[email protected]>
 * @copyright 2007-2017 PrestaShop SA
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 * International Registered Trademark & Property of PrestaShop SA
 *}
{extends "customer/_partials/customer-form.tpl"}

{block "form_field"}
  {if $field.name === 'password' and $guest_allowed}
      <p>
        <span class="font-weight-bold">{l s='Create an account' d='Shop.Theme.Checkout'}</span> <span class="font-italic">{l s='(optional)' d='Shop.Theme.Checkout'}</span>
        <br>
        <span class="text-muted">{l s='And save time on your next order!' d='Shop.Theme.Checkout'}</span>
      </p>
      {$smarty.block.parent}
  {else}
    {$smarty.block.parent}
  {/if}
{/block}

{block "form_buttons"}
{literal}   
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
    $('#mycheckbox').change(function() {
        $('#mycheckboxdiv').toggle();
    });
});
</script>
{/literal}

<div class="form-group row ">
	<label class="col-md-3 form-control-label"></label>
    <div class="col-md-6">
	<span class="custom-checkbox">
  		<input id="mycheckbox" type="checkbox" value="1">
  		<span><i class="material-icons checkbox-checked"></i></span>
  		<label>I agree to the privacy Policy<br>
    	<em><a href="PRIVACY URL" target="_NEW">Click here to view our privacy policy in a new window</a></em>
        </label>
  	</span>
    </div>
    <div class="col-md-3 form-control-comment"> </div>
</div>

<div id="mycheckboxdiv" style="display:none">
    <button
      class="continue btn btn-primary float-xs-right"
      name="continue"
      data-link-action="register-new-customer"
      type="submit"
      value="1"
    >
        {l s='Continue' d='Shop.Theme.Actions'}
    </button>
</div>    
{/block}

Make sure to change the line "<a href="POLICY URL" target="_NEW">" to a URL of your privacy policy.

The Result

So you should now have a contact form that looks like this:

example1.JPG

and when you click the "I Agree" button it should un-hide the continue button like below:

2.JPG.bf8c935491e738f638674a9c6fa18741.JPG

 

Hope this helps :)

If anyone knows an "official way" to fix the issue using the GDPR module, please let us know in this post.

Edited by dipslides
changed to include missing div tag (see edit history)
Link to comment
Share on other sites

Hi,

thanks for the solution but there are 2 problems:

1. It is not required for registration in checkout customer form, so If I click or not on them is the same thing

2. Database doesn't add consense on GDPR table.

 

I hope that Prestashop's developer solve this thing asap.

Thanks

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...