Forums / Setting Up Categories, Products, Attributes / My deleted products still show in store, but not in admin area

My deleted products still show in store, but not in admin area

Locked

Started by williamsba on 22 Dec 2008, 10:58 PM · Views: 1,519

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
22 Dec 2008, 10:58 PM
#1
williamsba avatar

williamsba

New Zenner

Join Date:
Mar 2008
Posts:
14
Plugin Contributions:
0

My deleted products still show in store, but not in admin area

I deleted about 1200 products from my Zen Cart store, but they still show up on the site. If I search for "battery" on the main site I get 1200 results. If I search for "battery" on the admin side under Catalog > Categories/Products and get no results. Also in my database if I run this query:

SELECT * FROM zen_products_description
WHERE products_description LIKE '%battery%'

I get no results from the DB. What am I doing wrong here? Everything I can tell points to the fact that these products do not exist in Zen Cart, yet they still show on the site.

And yes I have verified I am checking in the correct database. Made that mistake a few times in the past.

Any help is greatly appreciated.

23 Dec 2008, 4:11 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: My deleted products still show in store, but not in admin area

williamsba:

I deleted about 1200 products from my Zen Cart store
"How" exactly did you "delete" them?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

23 Dec 2008, 7:29 PM
#3
williamsba avatar

williamsba

New Zenner

Join Date:
Mar 2008
Posts:
14
Plugin Contributions:
0

Re: My deleted products still show in store, but not in admin area

You probably won't like this but I deleted them using a query:

DELETE zen_products.*
FROM zen_products, zen_products_description
WHERE zen_products.products_id = zen_products_description.products_id
AND zen_products_description.products_description LIKE '%battery%'

Could that be the cause of the problem? If so what options do I have to get these products removed if the main product records are deleted?

23 Dec 2008, 8:27 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: My deleted products still show in store, but not in admin area

Well, that's precisely why you've got unexpected results.
You should never blindly run SQL queries on a database without studying the underlying relationships.

You'll have to go and delete the rest of the data from the appropriate tables.
Here's a reference to the tables and relationships in v1.3.x: http://www.zen-cart.com/wiki/index.php/Developers_-_Database_Schema#Product_Info

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.