hryvinskyi / magento2-privacy-consent-pack
Privacy consent checkboxes for Magento 2 store forms and a journal of consents as evidence: versioned consents per store view, checkboxes in the registration, contact, newsletter, product review and checkout forms, a server check for required consents, the consents page of the customer account, with
Package info
github.com/hryvinskyi/magento2-privacy-consent-pack
Type:metapackage
pkg:composer/hryvinskyi/magento2-privacy-consent-pack
Requires
- hryvinskyi/magento2-client-address: 1.0.*
- hryvinskyi/magento2-privacy-consent: 1.0.*
- hryvinskyi/magento2-privacy-consent-admin-ui: 1.0.*
- hryvinskyi/magento2-privacy-consent-api: 1.0.*
- hryvinskyi/magento2-privacy-consent-frontend: 1.0.*
- magento/framework: *
Requires (Dev)
None
Suggests
- hryvinskyi/magento2-privacy-consent-gdpr: adds consent records to GDPR exports and erases them with the subject
- hryvinskyi/magento2-privacy-consent-gdpr-frontend: shows the consents on the GDPR Privacy page
- hryvinskyi/magento2-privacy-consent-import-scommerce: imports the journal of the consent module it replaces
Provides
None
Conflicts
None
Replaces
None
README
Metapackage that installs the privacy consent suite: consent checkboxes in a store's registration, contact, newsletter, product review and checkout forms, and a journal that keeps each consent given or withdrawn as evidence. A store sets up its consents in the admin, each with a checkbox text, an optional link to a CMS page, a required or optional flag, and the store views and forms it shows in. Each change of what a consent says makes a new, unchangeable version, and each journal record names the version the person saw.
composer require hryvinskyi/magento2-privacy-consent-pack bin/magento setup:upgrade bin/magento setup:di:compile # production mode only bin/magento setup:static-content:deploy -f # production mode only bin/magento cache:flush
Run from the Magento root, with Magento Open Source or Adobe Commerce 2.4.x (the suite is built and tested on 2.4.9) and PHP 8.1 to 8.5, and a Luma-based theme. Magento refuses to enable a module while one it requires is disabled, so on a store that disabled modules by hand enable the suite's modules together: bin/magento module:enable Hryvinskyi_Clock Hryvinskyi_ClientAddress Hryvinskyi_Base Hryvinskyi_HeadTagManager Hryvinskyi_ThemeAssets Hryvinskyi_DocumentExport Hryvinskyi_PrivacyConsentApi Hryvinskyi_PrivacyConsent Hryvinskyi_PrivacyConsentAdminUi Hryvinskyi_PrivacyConsentFrontend, before setup:upgrade.
It installs:
hryvinskyi/magento2-privacy-consent-api, the published contracts: consents, versions, forms, the journal, withdrawal actions and the admin permissions.hryvinskyi/magento2-privacy-consent, the engine: consents and their versions, the required-consent rule, the journal and its client address modes, withdrawal, and the six tables.hryvinskyi/magento2-privacy-consent-admin-ui, the admin screens: the consents listing and form, the consent journal with CSV and Excel export, the Consents tab on the customer page, and the settings.hryvinskyi/magento2-privacy-consent-frontend, the checkboxes in the six forms, the server check, the checkout integration, the newsletter withdrawal action, and the Privacy Consents page of the customer account.hryvinskyi/magento2-client-address, a shared block that keeps only the network part of a client address.
The pack suggests three packages that a store installs when it needs them:
hryvinskyi/magento2-privacy-consent-gdpradds consent records to the data-subject exports ofhryvinskyi/magento2-gdprand anonymises or deletes them with the subject.hryvinskyi/magento2-privacy-consent-gdpr-frontendshows the customer's consents on the Privacy Settings page ofhryvinskyi/magento2-gdpr-frontend.hryvinskyi/magento2-privacy-consent-import-scommerceimports the journal of the consent module it replaces. Install it for the import only, then remove it.
After the install no checkbox shows yet: a store view shows a consent only when the consent is active and assigned to that store view and to a form. To bring a store into use:
- Open Stores > Settings > Configuration > Hryvinskyi Extensions > Privacy Consents. Check Show Consent Checkboxes (on by default) and Client Address (the journal keeps the network part of the address by default).
- Open Customers > Privacy Consents > Consents and add the consents: the privacy policy as a required consent linked to its CMS page, and each optional one, such as marketing. Assign each to its store views and forms.
- Give each admin role the resources it needs under System > Permissions > User Roles: the suite adds Customers > Privacy Consents, with a permission to view and to manage consents, to view, export and delete the journal, and to change the settings.
- Open each form on the storefront and check the boxes, then submit it without a required box: the form comes back with
Please accept: <title>. - Read the limits in the README of
hryvinskyi/magento2-privacy-consent-frontend. In short: the checkout covers the checkout page's place-order action only (not a GraphQL or headless checkout, multishipping, the PayPal Express review page or one-click payment buttons), Hyvä themes are not supported, and a store that merges or bundles RequireJS files rebuilds the bundle after the install.
Each package's README describes its settings and limits.