Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Easy Populate - Starting with a fresh database


jstak

Recommended Posts

Hi -

 

I'm using Easy Populate, and love it.

 

Question: is there an easy way of doing a global delete all of your categories & products using a function in the OSCommerce Admin area? I'd like to delete all of my current categories (along with their associated products), then upload my complete tab-delimited file.

 

Thanks

Link to comment
Share on other sites

This will reset your whole database. Careful...customers, orders, products, and all.

 

 

DELETE FROM `address_book`; 
DELETE FROM `banners`; 
DELETE FROM `banners_history`; 
DELETE FROM `categories`; 
DELETE FROM `categories_description`; 
DELETE FROM `counter`; 
DELETE FROM `customers`; 
DELETE FROM `customers_basket`; 
DELETE FROM `customers_info`; 
DELETE FROM `manufacturers`; 
DELETE FROM `manufacturers_info`; 
DELETE FROM `orders`; 
DELETE FROM `orders_products`; 
DELETE FROM `orders_status_history`; 
DELETE FROM `orders_total`; 
DELETE FROM `products`; 
DELETE FROM `products_attributes`; 
DELETE FROM `products_attributes_download`; 
DELETE FROM `products_description`; 
DELETE FROM `products_notifications`; 
DELETE FROM `products_options`; 
DELETE FROM `products_options_values`; 
DELETE FROM `products_options_values_to_products_options`; 
DELETE FROM `products_to_categories`; 
DELETE FROM `reviews`; 
DELETE FROM `reviews_description`; 
DELETE FROM `sessions`; 
DELETE FROM `specials`; 
DELETE FROM `whos_online`; 

ALTER TABLE banners AUTO_INCREMENT = 1; 
ALTER TABLE banners_history AUTO_INCREMENT = 1; 
ALTER TABLE categories AUTO_INCREMENT = 1; 
ALTER TABLE customers AUTO_INCREMENT = 1; 
ALTER TABLE customers_basket AUTO_INCREMENT = 1; 
ALTER TABLE customers_basket_attributes AUTO_INCREMENT = 1; 
ALTER TABLE manufacturers AUTO_INCREMENT = 1; 
ALTER TABLE manufacturers_info AUTO_INCREMENT = 1; 
ALTER TABLE orders AUTO_INCREMENT = 1; 
ALTER TABLE orders_products AUTO_INCREMENT = 1; 
ALTER TABLE orders_status_history AUTO_INCREMENT = 1; 
ALTER TABLE orders_total AUTO_INCREMENT = 1; 
ALTER TABLE products AUTO_INCREMENT = 1; 
ALTER TABLE products_attributes AUTO_INCREMENT = 1; 
ALTER TABLE products_description AUTO_INCREMENT = 1; 
ALTER TABLE products_options_values_to_products_options AUTO_INCREMENT = 1; 
ALTER TABLE reviews AUTO_INCREMENT = 1; 
ALTER TABLE specials AUTO_INCREMENT = 1;

 

HTH.

Chris Sullivan

Link to comment
Share on other sites

That is the sql code to empty all your variable entries. Just pick and choose the delete from and alter lines for the tables you want to adjust.

 

In this case, it's anything that starts with categories or products. Copy those lines, and enter them in phpMyAdmin and you're done.

 

HTH

Chris Sullivan

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...