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-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
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  

chughes
Starting Member

USA
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
http://www.avaccessoryhouse.com

devshb
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:
http://www.bigyellowzone.com/shopexd.asp?id=114

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)

or:

delete from products where hide=1

etc

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
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