我有一个问题,导出报告(报告 -> 销售 -> 计费)时,下载的文件如下:
-
如果我导出为 CSV:
invoiced.csv-, attachment
-
如果我导出为 XML:
invoiced.xml-, attachment
我不明白为什么文件末尾带有" -, attachment
"。奇怪的是,这只发生在:
- 报告 ->
- 销售 -> 计费 报告 ->
- 销售 -> 优惠券
其余报告选项工作正常。
有没有人经历过这种情况或知道问题的原因是什么?
感谢您的聆听
请检查下面的文件
magentoappcodecoreMageAdminhtmlcontrollersReportSalesController.php
1) exportInvoicedCsvAction()
2) exportInvoicedExcelAction()
检查文件名在两个函数中都应该是
$fileName = 'invoiced.csv';//for csv
$fileName = 'invoiced.xml';//for excel xml
希望这对你有帮助
我找到了另一种解决方案
打开文件:
app/code/core/mage/core/controller/varien/action.php
改变:
-> setHeader ('Content-Disposition', 'attachment; filename =, true "' $ fileName.. '"')
自:
-> setHeader ('Content-Disposition', 'attachment; filename =';, true "'$ fileName.."')
基本上添加,在 $ 文件名","得到 $ 文件名";'。