Magento 2:出口产品包含目录价格规则

时间:2021-06-17 08:46:38

标签: magento

有没有办法导出包含目录价格规则的产品列表?

enter image description here

默认导出,csv 包含唯一的标准价格,而不是由“营销”>“目录价格规则”中定义的规则定价

提前致谢

1 个答案:

答案 0 :(得分:0)

如果它对其他人有用,我已经通过这个查询解决了:

SELECT 
      DISTINCT cp.product_id, cpev.value, cpip.price, cpip.min_price, cpe.sku
FROM `m2_catalogrule_product` as cp 
INNER JOIN m2_catalog_product_entity_varchar as cpev 
      ON cp.product_id = cpev.entity_id
INNER JOIN m2_catalog_product_index_price as cpip 
      ON cpip.entity_id = cp.product_id
INNER JOIN m2_catalog_product_entity as cpe 
      ON cpe.entity_id = cp.product_id
GROUP BY cp.product_id