zencart 快速清空产品相关信息

zencart 快速清空产品相关信息

注意: 以下语句清空数据将无法恢复,清空数据时先备份下以便恢复

进入zencart后台, 找到Tools->Install SQL Patches 将以下代码复制过去
[sql]
TRUNCATE TABLE `categories`;
TRUNCATE TABLE `categories_description`;
TRUNCATE TABLE `meta_tags_categories_description`;
TRUNCATE TABLE `meta_tags_products_description`;
TRUNCATE TABLE `products`;
TRUNCATE TABLE `products_attributes`;
TRUNCATE TABLE `products_description`;
TRUNCATE TABLE `products_options`;
TRUNCATE TABLE `products_options_values`;
TRUNCATE TABLE `products_options_values_to_products_options`;
TRUNCATE TABLE `products_to_categories`;
TRUNCATE TABLE `specials`;
TRUNCATE TABLE `featured`;
TRUNCATE TABLE `cms_block_store`;
[/sql]

在清空数据后,在后台Catalog->Option Name Manager出现一个警告错误,如下
WARNING: An Error occurred, please refresh the page and try again.
原因是zencart的products_options_values表有一个默认的值被清空了
Tools->Install SQL Patches执行代码:
[sql]INSERT INTO `products_options_values` (`products_options_values_id`, `language_id`, `products_options_values_name`, `products_options_values_sort_order`) VALUES (0, 1, ‘TEXT’, 0);[/sql]

# 清空客户评论
[sql]TRUNCATE TABLE reviews;
TRUNCATE TABLE reviews_description;[/sql]

# 清空推荐商品
[sql]TRUNCATE TABLE featured;[/sql]

# 清空厂家及资料
[sql]TRUNCATE TABLE manufacturers;
TRUNCATE TABLE manufacturers_info;[/sql]

# 清空团体价格
[sql]TRUNCATE TABLE group_pricing;[/sql]

# 清空促销商品
[sql]TRUNCATE TABLE salemaker_sales;[/sql]

# 清空特价商品
[sql]TRUNCATE TABLE specials;[/sql]

发表评论

© 2022. powered by PHP 个人小站