MagenTo商品批量调价相关的数据库信息

时间:12-05-21 栏目:网站开发 作者:admin 评论:1 点击: 12,441 次

MagenTo商品批量调价要用到的一些数据库信息,记录如下,方便SQL方式调整产品价格,也会后面制作MagenTo商品批量调价插件做准备工作。

MagenTo商品批量调价参考的SQL语句:
UPDATE catalog_product_index_price_idx SET price=price-price*0.10 where price >200;
UPDATE catalog_product_index_price SET price=price-price*0.10 where price >200;
UPDATE catalog_product_entity_decimal  set value=value-value*0.10 where attribute_id=64 and value >200;

#查询price这个属性的ID在修改catalog_product_entity_decimal表要用到

SELECT attribute_id
FROM `mgn_eav_attribute`
WHERE entity_type_id=4 AND attribute_code ='price';

#mg_catalog_category_product_index  表是分类下及子分类下产品ID
#mg_catalog_category_product 表是本分类下产品ID(category_id,product_id,position )
#mg_catalog_category_entity 分类表(entity_id,entity_type_id,attribute_set_id,parent_id,created_at,updated_at,path,position,level,children_count)
#mg_catalog_category_entity_decimal 分类表(value_id,entity_type_id,attribute_id,store_id,entity_id,value)
#mg_catalog_category_entity_varchar 分类名表
#mgn_catalog_product_option 产品选项(规格:product_id,option_id)
#取分类名的属性ID
SELECT *
FROM `dev_magento`.`mg_eav_attribute`
WHERE `attribute_id` =41

#AND entity_id=11;

UPDATE `mgn_catalog_product_entity_decimal`
SET value='' WHERE attribute_id=64;

#所有字段
#entity_id,customer_group_id,website_id,tax_class_id,price,final_price,min_price,max_price,tier_price
UPDATE `mgn_catalog_product_index_price`
SET price=price-10,final_price=final_price-10,min_price=min_price-10,max_price=max_price-10;

#customer_group 价格
UPDATE `mgn_catalog_product_index_price_idx`
SET price=price-10,final_price=final_price-10,min_price=min_price-10,max_price=max_price-10;

声明: 本文由( admin )原创编译,转载请保留链接: MagenTo商品批量调价相关的数据库信息

MagenTo商品批量调价相关的数据库信息:目前有1 条留言

  1. 不错,好文章,顶一下 😛

    2012-07-07 6:44 am [回复]

发表评论


------====== 本站公告 ======------
联系信息:
电话:19970108113(微信同号) QQ:3142401606
支付宝:https://me.alipay.com/lxq73061
相关插件程序等信息均会在站内发布,敬请关注。

读者排行