-
-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Labels
Milestone
Description
Description
Guest users cannot export their data because improper entity_id is being recorded in the "opengento_gdpr_export_entity" table
Prerequisites
PHP Version:
- 7.4
Magento Version:
- 2.4.3
Module Version:
- [e.g. 1.0.0]
Desktop (if applicable):
- OS: macOS
- Browser: Chrome
- Version 94.0.4606.71
Issue Details
Steps to reproduce the behavior
- Submit an order
- Go to guest order view (/sales/guest/form and fill in form info)
- Click "Export Personal Data". You will see the message "A document is already available in your order page" however there is no way to download the document [1]
- If you go to the "opengento_gdpr_export_entity" and search for the export entity that was just created, you will see that the entity_id is 0 but it should be the entity_id of the sales_order being viewed [2]
Expected behavior
- The guest should be able to click "Download Personal Data" and download the appropriate zip file [3]
- I believe the solution is to set "getCustomerId()" in this line to "getId()" in because guest orders have no customerId.
magento2-gdpr/Controller/Guest/Export.php
Line 66 in 5689c57
ArgumentReader::ENTITY_ID => (int) $this->currentOrder()->getCustomerId(),
thomas-kl1


