dongshuo1856 2015-05-21 14:43
浏览 28
已采纳

PrestaShop:从XLS导入?

Is there a possibility to import XLS Files into Prestashop? I would imagine myself a Script where I define which rows (as an Example A1-A300 should be Names of the articles, etc...) are what (Like name, price, Tax, etc...).

How could I realise that? I hope there is a possibility and I would appreciate if anyone could get ma on the right path.

  • 写回答

2条回答 默认 最新

  • duandong7980 2015-05-21 18:22
    关注

    PrestaShop doesn't support excel files, only simple data tables like .csv. This is because excel files are too complicated, they can by whole programs by themselves.

    However, if you're working for a client or your XLS files are just simple data, then surely you can convert XLS to CSV before import.

    You just need to make an override for AdminImportController::ajaxProcessUploadCSV

    and basically "intercept file upload". Get the uploaded file and convert it to CSV using this library:

    https://github.com/PHPOffice/PHPExcel

    Then just return are the right values in your override to simulate that "everything is running normal" (basically trick PrestaShop :)) .

    It is definitely doable, I've created such module for a client, PHPExcel gave us the ability to work with cells before saving them to CSV.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度