violinman Posted December 13, 2020 Share Posted December 13, 2020 Hello, I have a issue with deleting and existing customers registered email address. Cubecart will not allow me to delete it, this is the error message: "That email is already being used, failed to update customer" it makes no difference if the customer is registered or unregistered. I am using Cubecart 6.2.9 Thank you, Brian Link to comment Share on other sites More sharing options...
bsmither Posted December 13, 2020 Share Posted December 13, 2020 In CubeCart_customer, the 'email' column is assigned a UNIQUE index and does not allow nulls. (It is also part of a FULLTEXT index - irrelevant for this situation.) As such, the database engine is objecting to the UPDATE that attempts to blank out the email value. The wording of CubeCart's error message is perhaps misleading. But if the problem is actually, somehow, that there exists a record in CubeCart_customer that has for 'email' a zero-length string (which is not the same as a null), trying to make a second record have the same value - a zero-length string - would violate the UNIQUE constraint. Link to comment Share on other sites More sharing options...
violinman Posted December 13, 2020 Author Share Posted December 13, 2020 Well I think I understand that, so if I replaced the email with a different email address would that be accepted? The other problem I have is removing a customer who has placed an order sometime in the past, is there a way to remove the customer without having first to delete their past orders? Many thanks, Brian Link to comment Share on other sites More sharing options...
bsmither Posted December 13, 2020 Share Posted December 13, 2020 Using a new email address not already being used is permitted. You can force deleting a record from CubeCart_customer (though not through normal CubeCart processes). You can disable a customer, which may get you the same effect as what I assume you are wanting. Link to comment Share on other sites More sharing options...
violinman Posted December 13, 2020 Author Share Posted December 13, 2020 Ok thanks Brian, Appreciate your help. Brian Link to comment Share on other sites More sharing options...
macgillivray Posted December 17, 2020 Share Posted December 17, 2020 How about "amending" the login details - eg adding an extra character or two at the end of their name(s) That would mean that they can't log in, I believe. I meant to add that changing the email addy from [email protected] to [email protected] should make life difficult for folks too! Link to comment Share on other sites More sharing options...
violinman Posted December 17, 2020 Author Share Posted December 17, 2020 Hi Bsmither, you mentioned force deleting a customer by other means, could you give me some more information on that? Thanks, Brian Link to comment Share on other sites More sharing options...
bsmither Posted December 17, 2020 Share Posted December 17, 2020 That would be using an external database manager utility, such as phpMyAdmin. Or, in admin, Maintenance, Query Database (Advanced) tab, you can enter a manually constructed DELETE query. I strongly recommend you just disable the customer. Deleting a record that several other tables make reference to needs radical justification. Link to comment Share on other sites More sharing options...
violinman Posted December 17, 2020 Author Share Posted December 17, 2020 Ok will try the disable first. Many thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.