VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-Cart StoreFront Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 General help me questions
 Delete hidden products.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

29 Posts

Posted - August 31 2007 :  23:55:23  Show Profile  Visit chughes's Homepage  Reply with Quote
I have a large number of hidden products simply because I don't offer those products anymore. Can anyone advise on how to write a sql statement to delete all products where hide = 1? Thanks in advance for the assistance.

Craig Hughes

Senior Member

United Kingdom
1898 Posts

Posted - September 01 2007 :  06:52:48  Show Profile  Visit devshb's Homepage  Reply with Quote
it's not just the products table; you'd also need to delete the corresponding prodcategories, discounts, coupons, etc, and also consider the aspect of being able to view historic orders.

my advice, especially if you have historic orders for the products, would be to leave them as hidden and not delete them.

but, if you're feeling brave then you could do it either via admin on the product summary (ie query all the products which have hide set, and then flag those as deleted), but if you have thousands of them then you could do it in sql instead.

in case you do want to do something like that in sql, you could try our freebie:
Advanced SQL Execution:

it's basically just a text-box where you can submit whatever sql text you want, such as:

delete from prodcategories where exists (select 1 from products where hide=1 and intcatalogid=catalogid)


delete from products where hide=1


Simon Barnaby
[email protected]
Web Design, Online Marketing and VPASP addons
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000