From 264d14f5f3760b9550019fd033b595a65789de13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Wed, 27 Jun 2018 12:55:01 +0200 Subject: [PATCH] Add dedicated page types for exports to avoid caching issues --- .../Configuration/TypoScript/constants.txt | 2 ++ .../Configuration/TypoScript/setup.txt | 1 + .../Configuration/TypoScript/Page/Export.ts | 31 +++++++++++++++++++ .../Configuration/TypoScript/setup.txt | 1 + .../Private/Templates/Reseller/List.html | 4 +-- web/typo3conf/realurl_conf.php | 13 +++++++- 6 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 web/typo3conf/ext/ep_theme/Configuration/TypoScript/Page/Export.ts diff --git a/web/typo3conf/ext/ep_products/Configuration/TypoScript/constants.txt b/web/typo3conf/ext/ep_products/Configuration/TypoScript/constants.txt index 6ade03fb..3e32f07e 100644 --- a/web/typo3conf/ext/ep_products/Configuration/TypoScript/constants.txt +++ b/web/typo3conf/ext/ep_products/Configuration/TypoScript/constants.txt @@ -32,6 +32,8 @@ plugin.tx_epproducts { priceTableRoomTypes = 1,2,3,4,5,6,7,8,9,10 # cat=plugin.tx_epproducts//a; type=string; label=Ignore following IPs in searchlog searchLogIgnoreIps = + # cat=plugin.tx_epproducts//a; type=string; label=Page UID with reseller export plugin + resellerExportPageUid = } persistence { # cat=plugin.tx_epproducts//a; type=string; label=Default storage PID diff --git a/web/typo3conf/ext/ep_products/Configuration/TypoScript/setup.txt b/web/typo3conf/ext/ep_products/Configuration/TypoScript/setup.txt index d75bf6f2..29bd666d 100644 --- a/web/typo3conf/ext/ep_products/Configuration/TypoScript/setup.txt +++ b/web/typo3conf/ext/ep_products/Configuration/TypoScript/setup.txt @@ -36,6 +36,7 @@ plugin.tx_epproducts { groupsPageUid = {$plugin.tx_eptheme.settings.groupsPageUid} groupsContactFormPageUid = {$plugin.tx_eptheme.settings.groupsContactFormPageUid} googleMapsApiKey = {$plugin.tx_eptheme.settings.googleMapsApiKey} + resellerExportPageUid = {$plugin.tx_epproducts.settings.resellerExportPageUid} datePickerPresets { 1 { label = Silvester diff --git a/web/typo3conf/ext/ep_theme/Configuration/TypoScript/Page/Export.ts b/web/typo3conf/ext/ep_theme/Configuration/TypoScript/Page/Export.ts new file mode 100644 index 00000000..17b4c07d --- /dev/null +++ b/web/typo3conf/ext/ep_theme/Configuration/TypoScript/Page/Export.ts @@ -0,0 +1,31 @@ +xmlExport = PAGE +xmlExport { + typeNum = 1972 + config { + xhtml_cleaning = none + no_cache = 1 + disableAllHeaderCode = 1 + additionalHeaders = Content-Type: text/xml; charset=utf-8 + simulateStaticDocuments = 0 + admPanel = 0 + debug = 0 + tx_realurl_enable = 1 + } + 10 = USER + 10 { + userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run + extensionName = EpProducts + pluginName = reseller + vendorName = EP + switchableControllerActions { + Reseller { + 1 = xml + } + } + } +} + +excelExport < xmlExport +excelExport.typeNum = 1984 +excelExport.config.additionalHeaders = Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet +excelExport.10.switchableControllerActions.Reseller.1 = excel diff --git a/web/typo3conf/ext/ep_theme/Configuration/TypoScript/setup.txt b/web/typo3conf/ext/ep_theme/Configuration/TypoScript/setup.txt index 297b70f1..a4b39db0 100644 --- a/web/typo3conf/ext/ep_theme/Configuration/TypoScript/setup.txt +++ b/web/typo3conf/ext/ep_theme/Configuration/TypoScript/setup.txt @@ -94,6 +94,7 @@ lib.stdheader.3.headerClass > + config { doctype = html5 diff --git a/web/typo3conf/ext/ep_theme/Resources/Private/Templates/Reseller/List.html b/web/typo3conf/ext/ep_theme/Resources/Private/Templates/Reseller/List.html index 9665edff..43489749 100644 --- a/web/typo3conf/ext/ep_theme/Resources/Private/Templates/Reseller/List.html +++ b/web/typo3conf/ext/ep_theme/Resources/Private/Templates/Reseller/List.html @@ -9,11 +9,11 @@

Gesamtexport XML

- Export XML + Export XML

Einzelexport Excel

    -
  • Export XLS: {product.name}
  • +
  • Export XLS: {product.name}
diff --git a/web/typo3conf/realurl_conf.php b/web/typo3conf/realurl_conf.php index c89c6245..bd059bfa 100644 --- a/web/typo3conf/realurl_conf.php +++ b/web/typo3conf/realurl_conf.php @@ -24,6 +24,11 @@ $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = [ 'type' => 1848, ], ], + 'xml' => [ + 'keyValues' => [ + 'type' => 1972, + ] + ] ], ], 'preVars' => [], @@ -145,7 +150,11 @@ $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = [ ], ], [ - 'GETvar' => 'tx_epproducts_reseller[action]', + 'GETvar' => 'type', + 'valueMap' => [ + 'xml' => 1972, + 'excel' => 1984, + ], ], [ 'GETvar' => 'tx_epproducts_reseller[product]', @@ -161,7 +170,9 @@ $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = [ 1446 => 'team', 987 => 'events_contactform', 1300 => 'events_activity', + 1444 => 'reseller', 1448 => 'reseller', + 1483 => 'reseller', 'newsDetailConfiguration' => [ [ 'GETvar' => 'tx_news_pi1[news]',