Skip to main content

Delete all products from database

More
13 years 8 months ago #83338 by plantpotphil
I'd like to delete all products from Hikashop and "start again" (with product IDs reset to 0 etc). I just wanted to check which database tables do I need to flush to achieve this?

Create your own style of luxury bespoke furniture online

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #83358 by Jerome
Hi,

You need to flush:
#__hikashop_product
#__hikashop_price
#__hikashop_product_category
#__hikashop_product_related

And
#__hikashop_order
#__hikashop_order_product
#__hikashop_history

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: SG

Please Log in or Create an account to join the conversation.

More
13 years 4 months ago #103820 by SG
Hi,

And #__hikashop_file too if I'm not mistaken, where file_type is equal to 'product'.

Greets
The following user(s) said Thank You: Jerome

Please Log in or Create an account to join the conversation.

More
13 years 1 month ago #119092 by Flooder
I suggest this SQL code to do the job :
Code:
-- ----------------------------- -- Delete all products (and not categories) from database. -- ----------------------------- TRUNCATE TABLE `tosdq_hikashop_product`; ALTER TABLE `tosdq_hikashop_product` AUTO_INCREMENT=0; TRUNCATE TABLE `tosdq_hikashop_price`; ALTER TABLE `tosdq_hikashop_price` AUTO_INCREMENT=0; TRUNCATE TABLE `tosdq_hikashop_product_category`; ALTER TABLE `tosdq_hikashop_product_category` AUTO_INCREMENT=0; TRUNCATE TABLE `tosdq_hikashop_product_related`; ALTER TABLE `tosdq_hikashop_product_related` AUTO_INCREMENT=0; TRUNCATE TABLE `tosdq_hikashop_order`; ALTER TABLE `tosdq_hikashop_order` AUTO_INCREMENT=0; TRUNCATE TABLE `tosdq_hikashop_order_product`; ALTER TABLE `tosdq_hikashop_order_product` AUTO_INCREMENT=0; TRUNCATE TABLE `tosdq_hikashop_history`; ALTER TABLE `tosdq_hikashop_history` AUTO_INCREMENT=0; DELETE FROM `tosdq_hikashop_file` WHERE file_type='product'; ALTER TABLE `tosdq_hikashop_file` AUTO_INCREMENT=0; TRUNCATE TABLE `tosdq_hikashop_variant`; ALTER TABLE `tosdq_hikashop_variant` AUTO_INCREMENT=0; TRUNCATE TABLE `tosdq_hikashop_cart`; ALTER TABLE `tosdq_hikashop_cart` AUTO_INCREMENT=0; TRUNCATE TABLE `tosdq_hikashop_cart_product`; ALTER TABLE `tosdq_hikashop_cart_product` AUTO_INCREMENT=0;
The following user(s) said Thank You: SG

Please Log in or Create an account to join the conversation.

Time to create page: 0.219 seconds
Powered by Kunena Forum