Is it safe to delete customers directly in the Opencart database, without causing any issuers, errors, or messing things up?
I see there is a table named OC _Customer
My fear is there are connected tables to this one and just deleting rows form this table will cause some error.
It's not the best thing to do.
In addition to the oc_customer table, there are 14 more tables related to the customer table.
By deleting these items directly in the oc_customer table, you will keep the relational records in the other tables. You can delete the customer and all relationships through the customer record itself.
tom327 wrote: ↑Wed Jan 11, 2023 12:28 amI had hundreds of spam customer registrations and want to delete them.
Is it safe to delete customers directly in the Opencart database, without causing any issuers, errors, or messing things up?
I see there is a table named OC _Customer
My fear is there are connected tables to this one and just deleting rows form this table will cause some error.
Only partly correct.
If those "customers" registered themselves only, they can be simply deleted without any side affect.
Either through the shop backend or directly in the database.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Are you sure it doesn't add any related records in that case? What about address?
Anyway, to avoid these, you could consider our extension: https://www.opencart.com/index.php?rout ... er=antropy
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
oc_address
oc_cart
oc_coupon_history
oc_customer_activity
oc_customer_affiliate
oc_customer_approval
oc_customer_history
oc_customer_ip
oc_customer_online
oc_customer_reward
oc_customer_transaction
oc_customer_search
oc_customer_wishlist
oc_order
oc_return
oc_review
If you are getting many fake account registrations, you can use our SpamBot Buster to prevent this from happening.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Yes, I am sure.paulfeakins wrote: ↑Wed Jan 11, 2023 6:09 pmAre you sure it doesn't add any related records in that case? What about address?
Right now tested and customer AND address is deleted when I delete those "customers" through the backend.
And as I said: IF they made no orders, removing them by doing as described above, works and need no additional extensions - sorry.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Then you misunderstood as the OP was talking about removing them from the database directly.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Maybe ..paulfeakins wrote: ↑Thu Jan 12, 2023 1:22 amThen you misunderstood as the OP was talking about removing them from the database directly.
That's why I wrote that both methods will delete such fake registrations.
When done dircectly in the database (whikle I do not see any reason why doing so because it works perfectly when deleting them in the backend), the address table has to be cleaned also.
Which require an additional step, because those records deleted in the customer table has to be recorded (write in sheet e.g.) and then used to delete the address records.
Deleting fake customer through the backend require 1 step, doing it in the database 3 steps.
Selling extensions is one, but only when really needed ..
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
But you can delete hundreds with one query ...
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Increasing the admin list limit to x (for this task) will also delete finally hundreds

I guess we can say: OPs question is answered ..
Better for him to install an extension to avoid such registrations.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Users browsing this forum: campim and 13 guests