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条)

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?