mysql查看网站是否有重复产品语句
select value,count(*) from `catalog_product_entity_varchar`
where entity_type_id=4 and attribute_id in
(select attribute_id from `eav_attribute` where entity_type_id=4 and attribute_code='name')
group by value
having count(*)>1
短描述里加内容
update catalog_product_entity_text set value= concat(value,'text') where attribute_id =65
magento 批量改自定义选项是否必选
UPDATE `catalog_product_option` SET is_require=0 WHERE product_id IN (SELECT entity_id FROM `catalog_product_entity` )
数据库瘦身
truncate dataflow_batch_export;
truncate dataflow_batch_import;
truncate log_customer;
truncate log_quote;
truncate log_summary;
truncate log_summary_type;
truncate log_url;
truncate log_url_info;
truncate log_visitor;
truncate log_visitor_info;
truncate log_visitor_online;
truncate report_viewed_product_index;
truncate report_compared_product_index;
truncate report_event;
set foreign_key_checks = 0;
truncate index_process_event;
truncate index_event;
set foreign_key_checks = 1;
TRUNCATE `core_url_rewrite`;
批量清空自定义选项
truncate table catalog_product_option
truncate table catalog_product_option_title
truncate table catalog_product_option_type_title
truncate table catalog_product_option_type_value
truncate table catalog_product_option_type_price
select value,count(*) from `catalog_product_entity_varchar`
where entity_type_id=4 and attribute_id in
(select attribute_id from `eav_attribute` where entity_type_id=4 and attribute_code='name')
group by value
having count(*)>1
短描述里加内容
update catalog_product_entity_text set value= concat(value,'text') where attribute_id =65
magento 批量改自定义选项是否必选
UPDATE `catalog_product_option` SET is_require=0 WHERE product_id IN (SELECT entity_id FROM `catalog_product_entity` )
数据库瘦身
truncate dataflow_batch_export;
truncate dataflow_batch_import;
truncate log_customer;
truncate log_quote;
truncate log_summary;
truncate log_summary_type;
truncate log_url;
truncate log_url_info;
truncate log_visitor;
truncate log_visitor_info;
truncate log_visitor_online;
truncate report_viewed_product_index;
truncate report_compared_product_index;
truncate report_event;
set foreign_key_checks = 0;
truncate index_process_event;
truncate index_event;
set foreign_key_checks = 1;
TRUNCATE `core_url_rewrite`;
批量清空自定义选项
truncate table catalog_product_option
truncate table catalog_product_option_title
truncate table catalog_product_option_type_title
truncate table catalog_product_option_type_value
truncate table catalog_product_option_type_price