diff --git a/web/typo3conf/ext/ep_products/Classes/Controller/ResellerController.php b/web/typo3conf/ext/ep_products/Classes/Controller/ResellerController.php index cafd00a8..309e021e 100644 --- a/web/typo3conf/ext/ep_products/Classes/Controller/ResellerController.php +++ b/web/typo3conf/ext/ep_products/Classes/Controller/ResellerController.php @@ -99,6 +99,15 @@ class ResellerController extends ActionController $serializer = new Serializer($normalizers, $encoders); + $filename = 'export_' . $reseller->getCode() . '_' . date('Y-m-d') . '.xml'; + + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Content-Description: File Transfer'); + header('Content-type: text/xml'); + header('Content-Disposition: attachment; filename=' . $filename); + header('Expires: 0'); + header('Pragma: public'); + echo $serializer->serialize($data, 'xml', [ 'xml_encoding' => 'utf-8', 'xml_format_output' => true ]); return false; @@ -112,10 +121,12 @@ class ResellerController extends ActionController { $data = $this->resellerService->preprocessAll($reseller, [ 'width' => '1200', 'maxHeight' => '630', 'cropVariant' => 'facebook' ]); + $filename = 'export_' . $reseller->getCode() . '_' . date('Y-m-d') . '.csv'; + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Content-Description: File Transfer'); header('Content-type: text/csv'); - header('Content-Disposition: attachment; filename=export.csv'); + header('Content-Disposition: attachment; filename=' . $filename); header('Expires: 0'); header('Pragma: public');