Post by martynas.barzda » Tue Nov 09, 2010 3:55 am

Customer can delete the account with this modification.
Image
Image

1. EDIT: catalog/model/account/customer.php
Add this function into ModelAccountCustomer class.

Code: Select all

public function deleteCustomer($customer_id) {
		$this->db->query("DELETE FROM " . DB_PREFIX . "customer WHERE customer_id = '" . (int)$customer_id . "'");
		$this->db->query("DELETE FROM " . DB_PREFIX . "address WHERE customer_id = '" . (int)$customer_id . "'");
	}
catalog/language/english/account/account.php

Code: Select all

$_['text_delete']        = 'Delete account';
catalog/view/theme/default/template/account/account.tpl

Code: Select all

<li><a href="<?php echo str_replace('&', '&', $delete); ?>"><?php echo $text_delete; ?></a></li>
2. UPLOAD: extract attached archive into "catalog" directory.

Attachments

extract into "catalog" directory



Posts

Joined
Tue Nov 09, 2010 3:06 am
Location - Kaunas, Lithuania

Post by cricri92 » Mon Nov 15, 2010 11:37 pm

I installed your module but I get an error when I click on "delete account" in the browser

Code: Select all

You don't have permission to acces /opencart/<b>Notice</b>Undefined variable: delete in
<b>C:/wamp/www/opencart/boutique/catalog/view/theme/default/template/account/account.tpl</b> on line <b>19</b> on this server.
thank you

Newbie

Posts

Joined
Wed Aug 11, 2010 12:48 pm

Post by SapporoGuy » Tue Nov 16, 2010 2:02 am

What is on line 19 (17-20) in the account.tpl ?

Also, possibly you might have to add:

Code: Select all

$this->data['text_delete'] = $this->language->get('text_delete');
to the controller/account file

930sc ... because it is fun!


User avatar
Active Member

Posts

Joined
Mon Nov 01, 2010 7:29 pm

Post by Gilmore » Tue Nov 16, 2010 2:53 am

While I do appreciate your making an Extension and I can understand you think the Customer needs this option, they actually don't. You can't go to Sears and delete your account. They do this for a reason. Down the road you have a problem with the very same Customer, you have no records to back up your side of anything. Actually it's pretty unheard of to allow Customers to delete their account. This is not a Forum or Bulletin Board. I would not let a Customer delete their records in my business once I have done business with them. Businesses just don't let the Customers delete their accounts on their own for a reason. What if someone steals this persons login and deletes them while they are waiting on an order? Then they contact you and ask the status of their order? You look it up and can't find a thing because someone deleted their account. What are you going to do then?

And what if they Delete their account after running up a huge order and you ship it only to find out a few days later they were all about the fraud of ripping you off? Now you go to look them up and NO RECORDS!!!! Well so much for having their IP to help the Authorities out! See my point?

DO NOT LET PEOPLE DELETE YOUR CUSTOMER ACCOUNTS!!!
Their records are you proof of what they do. Erase that and it is ALL on you! And try to get a Court to side with you when you are getting sued for not being able to prove they did that form your web site!

I hope next you don't think letting the Customers alter their order once it has been placed will be a good idea too! lol

JMO!

Gilmore

User avatar
Active Member

Posts

Joined
Thu Aug 12, 2010 7:33 am

Post by Xsecrets » Tue Nov 16, 2010 4:12 am

while I don't really see the need for this mod either it would not delete all your records the orders would still be there along with the ip information associated. All that would get deleted is the customer record which is pretty much just their address book, which you will have that information in the order anyways. Like I said I don't really see the need for this mod, but I don't see it being as bad as you are making it out to be. The worst case scenario is like you said someone gets a customers details and deletes their account, however the order would still be there and get processed. That customer would just loose their saved addresses cart and the ability to look at their order history.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by rbelusa » Thu Dec 22, 2011 4:39 pm

a short one from my side. in germany this MOD is absolutely mandatory and also not to store the IP Adress, because in germany you are not allowed to run an ecommerce shop without these 2 functionality (plus some other points). You will get highly sued, before you open your store because of dataprivacy, datasecurity, law. thanks for this Mod/Help.

Newbie

Posts

Joined
Fri Sep 16, 2011 2:38 am

Post by Vytenis » Sun Jan 08, 2012 6:21 pm

Thanks for the mod, it really looks useful. Did anyone tried it with 1.5.1.x?

New member

Posts

Joined
Mon Aug 01, 2011 1:33 am

Post by robster » Mon Apr 30, 2018 9:49 pm

Did this mod ever get developed to be used in later versions of opencart such as 1.5.x 2.0 or later? I think it is a great idea, particularly with the upcoming GDPR data protection laws.

I know my place...!


User avatar
Active Member

Posts

Joined
Tue Jul 13, 2010 8:08 pm
Location - North Yorkshire, UK

Post by OSWorX » Tue May 01, 2018 5:40 pm

robster wrote:
Mon Apr 30, 2018 9:49 pm
Did this mod ever get developed to be used in later versions of opencart such as 1.5.x 2.0 or later? I think it is a great idea, particularly with the upcoming GDPR data protection laws.
Does no matter if this lines got updated for later versions or not

The GDPR has one rule (beside many others): customer shall be able to remove his account (deleting data associated with his person) at any time.

> The right to be forgotten <

This can be done automatically (via a form by the customer) or manually (by shopowner after request) after approval.

EXCEPT: personal data required for bookkeeping is not allowed to delete (depends on locale laws between 7 and 10 [ore more] years).
Otherwise you get in trouble with your financial department.

What can be done: except the sales data all other records can be anonymized.
And an existing newsletter subscription of this customer (which has to have a Double Optin solution at registration btw.) can be deleted - or if stored with IP > anonymized.

One exception from this rule exist: if a (criminal) court decision exists not to delete this data (e.g. in case of fraud or other criminal activity).

Image


User avatar
Expert Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by straightlight » Wed May 02, 2018 10:59 pm

An update I have received today from Axelos / EXIN providers about the implementation of the GDPR restrictions in the ITIL Best Practices starting in the upcoming May 25.

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Guru Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 6 guests