I havent done any serious web developing so looking for a little help.
My aim to create a batch product delete feature so i can delete loads of products at once.
....
I have started by going into the products.ascx.... gone to the products grid.
1) Added and ItemTemplate field. 2) Selected CheckBoxes 3) Named the header as "Delete" 4) Selected the part of the page I wanted and added a button 5) Named the button. BtnDeleteProducts. 6) Double clicked to add the event into the page.
Thats pretty much it - I think I need to create a stored procedure for deleting, call it to the button and give it selected checkbox numbers... i think....
Could anyone offer any help please?
Figure this would be useful for other people aswell.
There is a method in ProductManager called MarkProductAsDeleted() that sets the Deleted flag on the product row to true and sets all associated productVariant's deleted flags to true.
Did you want to actually remove the product records from the table?
there is a good reason for not physically deleting the record from the DB. suppose you had a product that was sold on your site and is not available anymore or you dont carry anymore. if you look at historical data and want to see the order details of one or more customers who bought it, if the product does not exist in the db anymore, you would have errors and alot of data inconsistencies.