Jump to content

Customer Privacy Module


mhu100

Recommended Posts

  • 4 months later...

Actualy is pretty easy to do this. I added this yesterday to 1.6.1.18.

Searched for solution for some time, than finaly I Came across solution on some spanish site with use of google translate while searching for "{$privacy_message} prestashop"  :)

1. You have to edit /theme/your-theme/contact-form.tpl

Search for:

<div class="submit">

 

Make it look like shown below - hook added before it:

{$HOOK_CREATE_ACCOUNT_FORM}
<div class="submit">

Save the file.

 

2. Create new file ContactController.php in folder /override/controllers/front/

Add this code to it:

<?php

class ContactController extends ContactControllerCore
{
public function initContent()
{
$this->context->smarty->assign(array(
'HOOK_CREATE_ACCOUNT_FORM' => Hook::exec('createAccountForm'),
'privacy_message' => Configuration::get('CUSTPRIV_MESSAGE', $this->context->language->id)
));parent::initContent();
}
public function postProcess()
{
if (Tools::isSubmit('submitMessage'))
Hook::exec('actionBeforeSubmitAccount');
parent::postProcess();
}
}

 

3. Upload both files to your server (if you were editing them localy).

4. If it does not start up, delete file /cache/class_index.php and refresh the pages.

5. Enjoy.

 

Credits to the author:

http://felicianoborrego.com/formulario-de-contacto-cumpla-la-lopd-en-prestashop/

 

Edited by toplakd (see edit history)
  • Thanks 1
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...