zencart如何批量删除商品,分类,属性,详细描述?

本文提供了一套完整的ZenCart 1.3.x版本演示数据清除脚本,包括订单、商品及其属性、用户信息等关键数据的清空指令,并强调了在执行前进行备份的重要性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

zc_install/index.php ,简单而彻底。

如果要手动删除部分数据,参考下面的脚本。

# ——————————————————–
# 功能:清空Zen Cart中文版1.3.x的演示数据
# 提醒:请做好备份 !!!
# 使用:管理页面 -> 工具 -> 执行SQL脚本
# ——————————————————–

#清空订单和注册:
truncate table address_book;
truncate table admin_activity_log;
truncate table counter;
truncate table counter_history;
truncate table customers;
truncate table customers_basket;
truncate table customers_basket_attributes;
truncate table customers_info;
truncate table customers_wishlist;
truncate table db_cache;
truncate table ips_sessions;
truncate table ips_transactions;
truncate table orders;
truncate table orders_products;
truncate table orders_products_attributes;
truncate table orders_products_download;
truncate table orders_status_history;
truncate table orders_total;
truncate table paypal;
truncate table paypal_payment_status_history;
truncate table paypal_session;
truncate table paypal_testing;
truncate table seo_cache;
truncate table sessions;
truncate table whos_online;


# 清空商品分类、商品、属性(Nike Air Max 2011)
TRUNCATE TABLE categories;
TRUNCATE TABLE categories_description;

# 清空商品以及属性
TRUNCATE TABLE media_clips;
TRUNCATE TABLE media_manager;
TRUNCATE TABLE media_to_products;
TRUNCATE TABLE media_types;
TRUNCATE TABLE music_genre;
TRUNCATE TABLE product_music_extra;
TRUNCATE TABLE product_types_to_category;
TRUNCATE TABLE products;
TRUNCATE TABLE products_attributes;
TRUNCATE TABLE products_attributes_download;
TRUNCATE TABLE products_description;
TRUNCATE TABLE products_discount_quantity;
TRUNCATE TABLE products_notifications;
TRUNCATE TABLE products_options;
TRUNCATE TABLE products_options_values;
TRUNCATE TABLE products_options_values_to_products_options;
TRUNCATE TABLE products_to_categories;
TRUNCATE TABLE record_artists;
TRUNCATE TABLE record_artists_info;
TRUNCATE TABLE record_company;
TRUNCATE TABLE record_company_info;

# 清空推荐商品
TRUNCATE TABLE featured;

# 清空促销商品
TRUNCATE TABLE salemaker_sales;

# 清空特价商品
TRUNCATE TABLE specials;

# 清空团体价格
TRUNCATE TABLE group_pricing;

# 清空厂家及资料
TRUNCATE TABLE manufacturers;
TRUNCATE TABLE manufacturers_info;

# 清空客户评论
TRUNCATE TABLE reviews;
TRUNCATE TABLE reviews_description;




=========================================================================================================

TRUNCATE TABLE categories;
TRUNCATE TABLE categories_description;

TRUNCATE TABLE media_clips;
TRUNCATE TABLE media_manager;
TRUNCATE TABLE media_to_products;
TRUNCATE TABLE media_types;
TRUNCATE TABLE music_genre;
TRUNCATE TABLE product_music_extra;
TRUNCATE TABLE product_types_to_category;
TRUNCATE TABLE products;
TRUNCATE TABLE products_attributes;
TRUNCATE TABLE products_attributes_download;
TRUNCATE TABLE products_description;
TRUNCATE TABLE products_discount_quantity;
TRUNCATE TABLE products_notifications;
TRUNCATE TABLE products_options;
TRUNCATE TABLE products_options_values;
TRUNCATE TABLE products_options_values_to_products_options;
TRUNCATE TABLE products_to_categories;
TRUNCATE TABLE record_artists;
TRUNCATE TABLE record_artists_info;
TRUNCATE TABLE record_company;
TRUNCATE TABLE record_company_info;

TRUNCATE TABLE featured;

TRUNCATE TABLE salemaker_sales;

TRUNCATE TABLE specials;

TRUNCATE TABLE group_pricing;

TRUNCATE TABLE manufacturers;
TRUNCATE TABLE manufacturers_info;

TRUNCATE TABLE reviews;
TRUNCATE TABLE reviews_description;
TRUNCATE TABLE meta_tags_categories_description
TRUNCATE TABLE meta_tags_products_description
TRUNCATE TABLE products

转载于:https://www.cnblogs.com/zencartphp/archive/2012/03/07/2384287.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值