Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.0.2 #216

Merged
merged 10 commits into from
Sep 15, 2023
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,22 @@

Make your store comply with the General Data Protection Regulation (GDPR).

## Compatibility

PrestaShop: `8.0.0` or later

## Multistore compatibility

This module is partially compatible with the multistore feature. Some of its options might not be available.

## How to test

Link to specs : https://docs.prestashop-project.org/functional-documentation/functional-documentation/ux-ui/back-office/improve/modules/module-gdpr

In BO, configure the Personal data management block
Consent checkbox customization : Enable GDPR block to be displayed for some forms and modules, Edit the Consent request message.
In FO, go to customer account and check GDPR - Personal data block. Download pdf and CSV data.

## Contributing

PrestaShop modules are open source extensions to the [PrestaShop e-commerce platform][prestashop]. Everyone is welcome and even encouraged to contribute with their own improvements!
Expand Down
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>psgdpr</name>
<displayName><![CDATA[Official GDPR compliance]]></displayName>
<version><![CDATA[2.0.1]]></version>
<version><![CDATA[2.0.2]]></version>
<description><![CDATA[Make your store comply with the General Data Protection Regulation (GDPR).]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
Expand Down
2 changes: 1 addition & 1 deletion psgdpr.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function __construct()
{
$this->name = 'psgdpr';
$this->tab = 'administration';
$this->version = '2.0.1';
$this->version = '2.0.2';
$this->author = 'PrestaShop';
$this->need_instance = 0;

Expand Down
2 changes: 1 addition & 1 deletion sql/install/psgdpr_consent.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ CREATE TABLE IF NOT EXISTS `PREFIX_psgdpr_consent` (
error_message TEXT,
date_add DATETIME NOT NULL,
date_upd DATETIME NOT NULL,
PRIMARY KEY (id_gdpr_consent, id_module)
PRIMARY KEY (id_gdpr_consent)
) ENGINE InnoDB DEFAULT CHARSET = UTF8;
43 changes: 43 additions & 0 deletions upgrade/upgrade-2.0.2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* 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.md.
* 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 license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*/
if (!defined('_PS_VERSION_')) {
exit;
}

/**
* @param Psgdpr $module
*
* @return bool
*/
function upgrade_module_2_0_2($module)
{
$primaryKeyColumn = 'id_gdpr_consent';

$query = sprintf(
'ALTER TABLE %spsgdpr_consent DROP PRIMARY KEY, ADD PRIMARY KEY (%s)',
_DB_PREFIX_,
$primaryKeyColumn
);

\Db::getInstance()->execute($query);

return true;
}
Loading