Announcement:Materials and articles for ProductCart 5 can be found at our brand new support center.

Create an account to edit articles | See Formatting Syntax for Wiki syntax | We look forward to your contribution!

Permanently Removing Products

There are times when you might need to completely purge products from the store database. The main purpose of this feature is to permanently remove products that were entered into your database for testing purposes. Once your store is “live” and there are real orders in your database, you should not perform this action.

Deleting vs. Purging Products

Products deleted through the Control Panel are not removed from the database. This is done to maintain the integrity of previous orders (most product information is saved to the productsOrdered table when an order is placed, but some product information is referenced in the “products” table itself).

Instead of being completed removed from the system, products that are deleted in the Control Panel are kept in the database with the “removed” field set to ”-1”. Removed products never appear in the Control Panel or in the storefront.

If you wish to completely remove a previously deleted product you can use the Purge Products feature, which is discussed below.

How to Permanently Remove Products

Purging Deleted Products

Purging products is a dangerous feature. It allows you to completely remove a product from your database, and everything else that is referencing that product. This includes orders that included that product. This action is permanent and cannot be undone.

To completely remove deleted products from the database:

  • Log into the Control Panel and load the page “purgeProducts.asp”. There is no link to this page in the Control Panel navigation because it is obviously a dangerous feature.
  • Only the master administrator has access to the page. If you load the page and get redirected to the Control Panel start page (menu.asp), that means that you are not logged in as the master administrator.
  • Enter the product ID or select the product by name using the drop down list below. Only products that have previously been deleted from the Control Panel are shown.
  • This file allows you to permanently removed previously deleted products one at a time.

To completely remove ALL deleted products from the database, we have created a new file

This file will be included in ProductCart beginning with v4.5.

Purging All Products

  • If you wish to purge all products, click on Remove All Products.
  • Note that when you do so, you will remove all products and all orders from the database, not just previously deleted products
  • This feature - in most cases - is ONLY used when a store that has been used for testing is now ready to go live and all test products and orders are removed.

Purging Inactive Products

This script can be useful if you wish to purge a certain number of products (but not all of them). In this scenario, you can:

  • Import a spreadsheet that contains the SKU of those products and another column that will set the “Active” property to inactive. To do so, enter 0 in that column (you can name the column anything you'd like)
  • Alternatively, you can use the Global Changes feature to set certain products to be “inactive”.
  • Then, download this file (“purgeInactiveProducts.asp”).
  • Unzip it and upload it to your Control Panel folder via FTP
  • Log into the Control Panel and load the page “purgeInactiveProducts.asp”
  • Follow the instructions on the screen. Note that the action cannot be undone.

Restoring Previously Deleted Products

Purged product have been permanently removed and cannot be restored. Products that have been deleted through the Control Panel, however, still exist in the database, as mentioned above. To restore them:

  • Select Reports > Custom Data Export
  • Check the “SKU” field
  • Select “Include deleted products: Only deleted products”: you will be exporting a list of previously deleted products.
  • Now import the file back into your store, updating the existing product catalog.
  • No product information will be updated, since you are simply importing a list of part numbers. However, all imported products will be restored. This is because the Product Import Wizard by default restores a previously deleted product when you update it.

QR Code
QR Code Permanently Removing Products (generated for current page)