Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Delete product with search


Paulz

Recommended Posts

I had the problem of deleting a large number of discontinued products, as quick and simple as possible.

Found this contribution: Delete product with search, http://www.oscommerce.com/community/contri...+product+search

It allows a type of wild card search lists all matching products with check boxes enabling multiple deletion.

 

However It only deletes from the products table..

 

I want it to delete from all the other product tables, one question though will any of the products tables

effect the customer account_history_info.php for deleted products? Ive deleted items from the product table

and the products_description table

and they still appear OK in the customer account_history_info.

 

Cannot find any feedback on this contribution in the forum, has anyone modified it

or had any provlems.

 

or could anyone help with modifying.

 

p.s. Another advantage compared with similar contributions is it doesnt effect the categories and you dont have to search through the cats either!

Link to comment
Share on other sites

Im still unsure on what other product tables to delete the unwanted items from, can anyone help on that.

 

Ive added 'Delete from products_description' to the script, i dont think it looks right but it works ok! Id apreciate if someone could tidy the code.

 

if ($action == "update_prices") {

foreach($HTTP_POST_VARS['product_new_price'] as $id => $cancella) {

echo "id: $id -> $cancella<br>";

mysql_query("DELETE FROM products WHERE products_id=$id");

mysql_query("DELETE FROM products_description WHERE products_id=$id");

$count++;

}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...