Type
magento2-module
Gdpr Compliance Module for Magento 2
magento2-module
MIT
None
None
None
None
None
This extension allows customers to delete, anonymize, and export their personal data.
Magento 2 Open Source or Commerce edition is required.
Zip Package:
Unzip the package in app/code/Opengento/Gdpr.
Composer Package:
composer require opengento/module-gdpr
Then, run the following magento command:
bin/magento setup:upgrade
If you are in production mode, do not forget to recompile and redeploy the static resources.
.zip
archive containing file, .html
by default, with personal data.The configuration for this module is located in 'Stores > Configuration > Customers > Customer Configuration > Privacy (GDPR)'.
The settings are divided as following:
The following documentation explains how to add your own processors to the workflow.
In order to export your custom component, you must create a new processor.
To create a new processor, you must implement the following interface: \Opengento\Gdpr\Service\Export\ProcessorInterface
.
Then, register your processor to the following pool \Opengento\Gdpr\Service\Export\ProcessorPool
, as described:
<type name="Opengento\Gdpr\Service\Export\ProcessorPool">
<arguments>
<argument name="array" xsi:type="array">
<item name="my_component" xsi:type="string">\Vendor\Module\ExportProcessor</item>
</argument>
</arguments>
</type>
You can also create your custom export renderer to make it as be like you want to be.
To achieve this, you must implement the following interface: \Opengento\Gdpr\Service\Export\RendererInterface
Then, register your renderer to the following pool \Opengento\Gdpr\Service\Export\RendererPool
, as described:
<type name="Opengento\Gdpr\Service\Export\RendererPool">
<arguments>
<argument name="array" xsi:type="array">
<item name="my_renderer" xsi:type="string">\Vendor\Module\ExportRenderer</item>
</argument>
</arguments>
</type>
In order to delete your custom component, you must create a new processor.
To create a new processor, you must implement the following interface: \Opengento\Gdpr\Service\Delete\ProcessorInterface
.
Then, register your processor to the following pool \Opengento\Gdpr\Service\Delete\ProcessorPool
, as described:
<type name="Opengento\Gdpr\Service\Delete\ProcessorPool">
<arguments>
<argument name="array" xsi:type="array">
<item name="my_component" xsi:type="string">\Vendor\Module\DeleteProcessor</item>
</argument>
</arguments>
</type>
In order to anonymize your custom component, you must create a new processor.
To create a new processor, you must implement the following interface: \Opengento\Gdpr\Service\Anonymize\ProcessorInterface
.
Then, register your processor to the following pool \Opengento\Gdpr\Service\Anonymize\ProcessorPool
, as described:
<type name="Opengento\Gdpr\Service\Anonymize\ProcessorPool">
<arguments>
<argument name="array" xsi:type="array">
<item name="my_component" xsi:type="string">\Vendor\Module\AnonymizeProcessor</item>
</argument>
</arguments>
</type>
This module allows you to define the strategy to apply for the different processors.
You can configure it thanks to the admin system configuration, but you can also cheat and
define the strategy to apply for them via the etc/di.xml
file. Be careful, the settings from the configuration
are always checked in top priority. To make it via the code, add your preferences as following:
<type name="Opengento\Gdpr\Model\Config\ErasureComponentStrategy">
<arguments>
<argument name="componentsStrategies" xsi:type="array">
<item name="component_name_1" xsi:type="const">Opengento\Gdpr\Service\ErasureStrategy::STRATEGY_ANONYMIZE</item>
<item name="component_name_2" xsi:type="const">Opengento\Gdpr\Service\ErasureStrategy::STRATEGY_DELETE</item>
<item name="component_name_3" xsi:type="string">custom_strategy_code</item>
</argument>
</arguments>
</type>
Warning, if you want to implement your own strategy type, you must create your own strategy class object, but you will be able to use the Opengento\Gdpr\Model\Config\ErasureComponentStrategy
to serve your components by strategy.
Do not forget to use the right services managers, but you are free to use yours:
- Opengento\Gdpr\Service\AnonymizeManagement
- Opengento\Gdpr\Service\DeleteManagement
Raise a new request to the issue tracker.
Please provide your Magento 2 version and the module version. Explain how to reproduce your issue and what's expected.
Model
and Less
sources - flurryboxThis project is licensed under the MIT License - see the LICENSE details.
That's all folks!