Magento 2 module to make your store GDPR compatible
Extension provides easier compliance with GDPR. Allows customers to delete, anonymize, or export their personal data. View detailed information on store page., (*1)
Magento 2 Open Source (CE) or Commerce edition (EE). Supported versions: Magento 2.1.6+, 2.2.x, (*2)
Commands should be run at the root of your Magento 2 installation., (*3)
composer require flurrybox/enhanced-privacy php bin/magento module:enable Flurrybox_EnhancedPrivacy php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy
app/code/Flurrybox/EnhancedPrivacy
directoryphp bin/magento module:enable Flurrybox_EnhancedPrivacy
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
Besides default export entites its possible to implement your own custom data export. When customers will make a request for their personal data export, your class instance will be executed by data export processor and will add new file to data archive., (*4)
Flurrybox\EnhancedPrivacy\Api\DataExportInterface
interface.
php
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
...
<type name="Flurrybox\EnhancedPrivacy\Api\ProcessorsInterface">
<arguments>
...
<argument name="exportProcessors" xsi:type="array">
...
<item name="entity" xsi:type="object">Vendor\Module\Privacy\Export\Entity</item>
...
</argument>
...
</arguments>
</type>
...
</config>
To delete or anonymize data that's gathered by 3rd party integrations you can implement your own data processor., (*5)
Create a new class implementing Flurrybox\EnhancedPrivacy\Api\DataDeleteInterface
interface., (*6)
<?php declare(strict_types=1); namespace Vendor\Module\Privacy\Delete; use Flurrybox\EnhancedPrivacy\Api\DataDeleteInterface; use Magento\Customer\Api\Data\CustomerInterface; class Entity implements DataDeleteInterface { /** * Executed upon customer data deletion. * * @param \Magento\Customer\Api\Data\CustomerInterface $customer * * @return void */ public function delete(CustomerInterface $customer) { ... } /** * Executed upon customer data anonymization. * * @param \Magento\Customer\Api\Data\CustomerInterface $customer * * @return void */ public function anonymize(CustomerInterface $customer) { ... } }
etc/di.xml
xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
...
<type name="Flurrybox\EnhancedPrivacy\Api\ProcessorsInterface">
<arguments>
<argument name="deleteProcessors" xsi:type="array">
...
<item name="entity" xsi:type="object">Vendor\Module\Privacy\Delete\Entity</item>
...
</argument>
</arguments>
</type>
...
</config>
Copyright (c) 2018 Flurrybox, Ltd. under GNU General Public License ("GPL") v3.0, (*7)