dqzuo0327 2014-04-04 14:57
浏览 30
已采纳

比较两个CSV文件并更新主CSV上的价格

Magento CSV

SKU,Price
BFJ182H,£89.85
BFJ135Y,£163.10
EC32,£100.00
EC37,£104.00

Price Update Sheet

SKU,Price
BFJ182H,£109.47
BFJ135Y,£180.28
EC32,£150.69
EC37,£200.73

Basically what I want to do is run a query that searches for the SKU codes in the price update sheet and compares the price from the price update sheet against the price from the Magento CSV and if the price is different in the Magento CSV to the price in the price update sheet regardless of if it is lower or higher and update the price on the Magento CSV to the same as the price update sheet.

How can I go about doing this?

which I can then put back into the full CSV and re upload to their site to update the prices.

  • 写回答

1条回答 默认 最新

  • dqkf49487 2014-04-05 00:32
    关注

    Use magmi instead. http://sourceforge.net/projects/magmi/

    It takes a little while to learn -- but when you do get around learning the import processes using this tool, you'll never look back.

    Read the docs! http://sourceforge.net/apps/mediawiki/magmi/index.php?title=Main_Page

    For magmi, your price update sheet alone is already almost sufficient to do the update. (you don't need the original CSV really, assuming you already have values from Magento CSV as current prices on your Magento store). You just need the 'store' column after sku e.g.:

    sku,store,price
    BFJ182H,admin,109.47
    BFJ135Y,admin,180.28
    EC32,admin,150.69
    EC37,admin,200.73
    

    The above assumes that your default store currency is GBP (£) and the store value set at 'admin' tells magmi to update default values. replace with appropriate store code(s). More at the documentation for this specific feature: http://sourceforge.net/apps/mediawiki/magmi/index.php?title=Magmi_Behaviour_-_store_column

    Good luck!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥120 计算机网络的新校区组网设计
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等
  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单