keat Posted September 17, 2019 Share Posted September 17, 2019 I've not run the feature 'delete all customers without orders' for fear that it might delete customers who registered only yesterday, (or 10 minuts ago for that matter). Is it possible to choose a date range and delete all customers without orders older than a given time. I dare not click the button, to see what it does. Link to comment Share on other sites More sharing options...
Al Brookbanks Posted September 17, 2019 Share Posted September 17, 2019 It will delete even ones registered 10 minutes ago. Adding a registration time limit may not be such a bad idea. Link to comment Share on other sites More sharing options...
keat Posted September 17, 2019 Author Share Posted September 17, 2019 What about this scenario. ?? Customer registers, starts filling his cart, (hasn't completed his order yet). I run the script. Customer gets deleted ?? Link to comment Share on other sites More sharing options...
Al Brookbanks Posted September 17, 2019 Share Posted September 17, 2019 yup Link to comment Share on other sites More sharing options...
keat Posted September 17, 2019 Author Share Posted September 17, 2019 yikes !!!! Link to comment Share on other sites More sharing options...
fabriceunko Posted September 17, 2019 Share Posted September 17, 2019 Hello, where is this function? Link to comment Share on other sites More sharing options...
bsmither Posted September 17, 2019 Share Posted September 17, 2019 In admin, Customer List, GDPR Tools tab. Link to comment Share on other sites More sharing options...
keat Posted September 19, 2019 Author Share Posted September 19, 2019 What data does this feature remove. I note that there are a few tables used for customer data. I have an idea. What if I were to run the following query in PHPMyAdmin SELECT * FROM `CubeCart_customer` WHERE `order_count` = 0 Export the last 100 entries to a CSV file. Run the GDPR tool, and let it do it's magic. Import those 100 entries back in the cubecart_customer table. would this work ? Link to comment Share on other sites More sharing options...
bsmither Posted September 19, 2019 Share Posted September 19, 2019 I think a better solution to your situation is to modify the query sent to the database server by CubeCart to also include a timestamp that is less than a certain value (now minus x days). Link to comment Share on other sites More sharing options...
havenswift-hosting Posted September 19, 2019 Share Posted September 19, 2019 56 minutes ago, bsmither said: I think a better solution to your situation is to modify the query sent to the database server by CubeCart to also include a timestamp that is less than a certain value (now minus x days). Definitely a much better solution - Keat's solution would probably leave orphaned records in other tables for example the address table. This solution really needs to be added to core for exactly the reasons outlined by Keat on Tuesday ! Link to comment Share on other sites More sharing options...
keat Posted September 19, 2019 Author Share Posted September 19, 2019 The orphaned data was my thinking but in the opposite direction to you. My reasoning, if I exported and removed 100 customers from the customer table, when I run the built in script, there would be potential orphaned address in the address table. But when I import the 100 back in, the addresses would no longer be orphaned. Thoughts. .? Link to comment Share on other sites More sharing options...
bsmither Posted September 19, 2019 Share Posted September 19, 2019 The tables affected by CubeCart's gathering up of customers to be deleted are: CubeCart_customer, CubeCart_addressbook, CubeCart_customer_membership, CubeCart_newsletter_subscriber, and a hook to affect additional tables if necessary. There are some tables that will have orphaned records - containing customer_id of now non-existent customers - but probably irrelevant to GDPR requirements. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.