Guest Posted December 24, 2005 Share Posted December 24, 2005 Hello everyone. I just noticed that when I delete entire categories, for example, the products are NOT deleted from the database. While they are NOT accessible any longer from the admin section, they are still in the database, and, when someone searches for them in the Store, they come up. Try it: http://www.unlimitedperfumes.com/advanced_...sterling+silver As you can see, all those sterling silver jewelry items still come up, despite the fact that they were all supposedly deleted from the admin section. I see when I go into the database, that they are still there. Is there a fix for this type of bug? JP Link to comment Share on other sites More sharing options...
stevel Posted December 24, 2005 Share Posted December 24, 2005 Um, delete the products first? A product can belong to multiple categories. You are warned when deleting a category that it contains products. The stock osC does not provide a feature of deleting products when their containing category is deleted. You can certainly delete them from the database using phpmyadmin, etc. Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Guest Posted December 24, 2005 Share Posted December 24, 2005 The problem is that each of those categories has THOUSANDS of products. Is there a way, once the category is deleted, to delete all the products? JP Link to comment Share on other sites More sharing options...
stevel Posted December 24, 2005 Share Posted December 24, 2005 I'm sure there's an SQL query that would do it, but it involves data from two tables so it would take a while for me to figure it out. The correlation of categories to products is in table products_to_categories. I'm uncertain if deleting the category deletes all the corresponding records in that table. If so, then you have to come up with a query that identifies all the products that are orphans. Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Guest Posted December 24, 2005 Share Posted December 24, 2005 I know nothing about programming or MYSql so you will forgive me but, I did figure out that deleting an entire category deletes ALL corresponding entries in the products_to_categories table. Having said that, is there any way that you could help me put something together that, I suppose, will delete all records in the OTHER product tables, for which there isn't a row in the products_to_categories table? Any help would be GREATLY appreciated. JP Link to comment Share on other sites More sharing options...
stevel Posted December 25, 2005 Share Posted December 25, 2005 Sorry, I don't know enough about creating SQL queries to come up with something appropriate. Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Guest Posted December 27, 2005 Share Posted December 27, 2005 Is there ANYONE out there that might know the anser to this? Link to comment Share on other sites More sharing options...
Guest Posted December 28, 2005 Share Posted December 28, 2005 anyone at all? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.