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

[FR] Commerce orders, anonymization #2

Open
McCrisp opened this issue May 2, 2018 · 4 comments
Open

[FR] Commerce orders, anonymization #2

McCrisp opened this issue May 2, 2018 · 4 comments
Labels
enhancement New feature or request

Comments

@McCrisp
Copy link

McCrisp commented May 2, 2018

Have an option to transfer orders from the current user to a pre-defined "dummy" user on account deletion.

Most clients dont want the order to be deleted when a user is deleted, they want to keep the order to keep track of sales etc. Anonymization of the order is prefered to simply deleting it. Replacing the related User on an order would fix this.

@bymayo
Copy link
Owner

bymayo commented May 2, 2018

Commerce orders shouldn't be deleted when a user is deleted. I haven't added this functionality. Saying this though, setting a 'dummy' user will fix this issue. Not sure how this works regarding GDPR though as customer details are still retained.

Any users with access to the CP cannot be deleted (Unless you turn this option off) so all entries etc created via the CP will still be attached to the user that deleted them :)

@iamtompickering
Copy link

Following up from this, I am getting the following error:

CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (two-for-joy.craft_commerce_customers, CONSTRAINT craft_commerce_customers_userId_fk FOREIGN KEY (userId) REFERENCES craft_users (id) ON DELETE SET NULL). The SQL statement executed was: INSERT INTO craft_commerce_customers (uid, email, userId, lastUsedBillingAddressId, lastUsedShippingAddressId, dateUpdated, dateCreated) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6). Bound with :yp0='b43a903e-ee28-445a-b593-71390dd772c1', :yp1='[email protected]', :yp2=1683, :yp3=NULL, :yp4=NULL, :yp5='2018-05-08 15:40:02', :yp6='2018-05-08 15:40:02'

@bymayo
Copy link
Owner

bymayo commented May 24, 2018

@McCrisp I've added a 'Transfer content to' setting in the Craft 2 version (Craft 3 coming tomorrow) to enable you to set a user to transfer any content to once the user is deleted.

@bymayo
Copy link
Owner

bymayo commented Dec 16, 2020

@McCrisp WOW, 2018... How time flies.

I've actually implemented this feature now, and will be available shortly.

@bymayo bymayo added the enhancement New feature or request label Dec 16, 2020
@bymayo bymayo closed this as completed Jun 21, 2022
@bymayo bymayo reopened this Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants