Prestashop,wget发票

时间:2017-04-19 07:49:46

标签: bash prestashop wget prestashop-1.6 invoice

我尝试使用bash脚本(wget)下载发票,因为我需要在订单时自动将发票保存到我的服务器。我寻找其他解决方案,但这没有用,比如下载发票更改tcpdf.php。帖子在这里:https://www.prestashop.com/forums/topic/465729-automatically-generate-invoices-in-a-folder/

首先我需要登录到prestashop管理页面。登录让我感到困惑,因为我怎么知道我什么时候登录?这就是我所做的:

wget --save-cookies cookies.txt --keep-session-cookies --post-data 'email=example@gmail.com&passwd=example' http://www.example.ee/admin/index.php?controller=AdminLogin&token=5a01dc4e606baa6c26e95ddea91d3d14

保存我的Cookie后,我尝试通过以下方式下载发票:

wget --load-cookies cookies.txt -e robots=off -A pdf -r -l1 http://www.example.ee/admin/index.php?controller=AdminPdf&token=35b276c05aa6r5eb516437a8d534eb64&submitAction=generateInvoicePDF&id_order=3197

但我收到错误:Deleting, www.example.ee/admin/index.php?controller=AdminPdf, since it should be rejected

我认为这是因为我还没有登录?

如果没有wget,那将是非常好的。

PS将我的网站改为示例等

0 个答案:

没有答案
相关问题