0

こんにちは、私は magento コマース サイトで作業していて、レポート セクションの下の magento 管理パネルにバグがありました。実際には、ショッピング カートのアイテムやカスタマー レビューなどのレポートを CSV または xml 形式でエクスポートしようとすると、ダウンロードするファイルですが、レポートをcsv形式でダウンロードしている場合など、拡張子のタイプが間違っていると、次のようなファイルが得られます

tag_customer_detail.csv-、添付

ダウンロードしたファイルをどのエディターでも開かないようにする部分(-、添付ファイル)...過去にこの問題に対処したことがある人、またはこの問題の解決策がある人なら誰でも大歓迎です。

ありがとう

4

2 に答える 2

1

メソッドの内容をexportCustomerDetailCsvActionファイルで見るMage/Adminhtml/controllers/Report/TagController.php

そこに割り当てられている値を確認します$fileName-,そこに追加されている場合がありますが、それは大まかな推測です)。

この機能を書き換える拡張機能はありますか?

于 2012-08-01T13:52:34.587 に答える
0

After searching through the internet i found that Google Chrome has some kind of issue with Content-Disposition header parameter, it needs a semicolon after the file name so guys if any one has got this error with their magento 1.6.2 v please edit your code.

1) Go to app/code/core/Mage/Core/Controller/Varien/Action.php 2) find a protected function _prepareDownloadResponse() 3) and change the line
->setHeader('Content-Disposition','attachment;filename="'.$fileName.'"')

TO

->setHeader('Content-Disposition','attachment;filename="'.$fileName.'";')

Happy coding :)

于 2012-08-04T06:28:10.430 に答える