diff --git a/config/sites/ep-reisen/config.yaml b/config/sites/ep-reisen/config.yaml
index 531c26e1..081406f0 100644
--- a/config/sites/ep-reisen/config.yaml
+++ b/config/sites/ep-reisen/config.yaml
@@ -128,22 +128,11 @@ routeEnhancers:
- 41
routes:
-
- routePath: /ergebnis
+ routePath: '/ergebnis/{filter_settings}'
_controller: 'Search::searchresult'
- defaultController: 'Search::searchresult'
- StaticResultsPlugin:
- type: Extbase
- extension: EpProducts
- plugin: staticresult
- limitToPages:
- - 1757
- routes:
- -
- routePath: '/{filter_settings}'
- _controller: 'Search::staticresult'
_arguments:
- filter_settings: encodedFilterSettings
- defaultController: 'Search::staticresult'
+ filter_settings: filterSettings
+ defaultController: 'Search::searchresult'
requirements:
filter_settings: '[A-Z\d%\-]+'
ResellerPlugin:
diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/ProductController.php b/public/typo3conf/ext/ep_products/Classes/Controller/ProductController.php
index 7be5cbca..148cf5a5 100644
--- a/public/typo3conf/ext/ep_products/Classes/Controller/ProductController.php
+++ b/public/typo3conf/ext/ep_products/Classes/Controller/ProductController.php
@@ -173,7 +173,6 @@ class ProductController extends ActionController
$this->view->assignMultiple([
'hotels' => $hotels,
'product' => $product,
- 'currentPageUid' => $GLOBALS['TSFE']->id,
'linkHotel' => true,
]);
}
diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/SearchController.php b/public/typo3conf/ext/ep_products/Classes/Controller/SearchController.php
index f77572d7..16b003d1 100644
--- a/public/typo3conf/ext/ep_products/Classes/Controller/SearchController.php
+++ b/public/typo3conf/ext/ep_products/Classes/Controller/SearchController.php
@@ -27,6 +27,7 @@ namespace EP\EpProducts\Controller;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
+use EP\EpEvents\Domain\Model\Search;
use EP\EpProducts\Domain\Model\FilterSettings;
use EP\EpProducts\Domain\Model\SearchParams;
use EP\EpProducts\Service\FilterService;
@@ -36,7 +37,6 @@ use TYPO3\CMS\Core\Log\LogManager;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
use TYPO3\CMS\Extbase\Mvc\Exception\StopActionException;
-use TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException;
class SearchController extends ActionController
{
@@ -82,7 +82,7 @@ class SearchController extends ActionController
public function searchbarAction()
{
- $fixed = (bool) $this->settings['fixed'];
+ $fixed = (bool)$this->settings['fixed'];
$searchParams = new SearchParams($GLOBALS['TSFE']->id);
$this->view->assignMultiple([
'filterSettings' => $this->defaultFilterSettings,
@@ -102,24 +102,46 @@ class SearchController extends ActionController
]);
}
- public function initializeSearchresultAction()
+ public function initializeProcessSearchAction()
{
$forcedConceptUids = GeneralUtility::trimExplode(',', $this->settings['forcedConceptUids'], true);
$this->processSearchParamsArgument($forcedConceptUids);
+ }
+
+ /**
+ * @param SearchParams $searchParams
+ * @throws StopActionException
+ * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
+ */
+ public function processSearchAction(SearchParams $searchParams)
+ {
+ $filterSettings = FilterSettings::fromSearchParams($searchParams);
+
+ $redirectUri = $this->uriBuilder
+ ->reset()
+ ->setCreateAbsoluteUri(true)
+ ->uriFor(
+ 'searchresult',
+ ['filterSettings' => FilterSettingsEncoder::encode($filterSettings)],
+ null,
+ null,
+ 'searchresult'
+ );
+
+ $this->redirectToUri($redirectUri);
+ }
+
+ public function initializeSearchresultAction()
+ {
+ $forcedConceptUids = GeneralUtility::trimExplode(',', $this->settings['forcedConceptUids'], true);
$this->processFilterSettingsArgument($forcedConceptUids);
}
/**
- * @param \EP\EpProducts\Domain\Model\SearchParams $searchParams
* @param \EP\EpProducts\Domain\Model\FilterSettings $filterSettings
*/
- public function searchresultAction(SearchParams $searchParams = null, FilterSettings $filterSettings = null)
+ public function searchresultAction(FilterSettings $filterSettings)
{
- if ($searchParams !== null) {
- $this->logSearch($searchParams);
- $filterSettings = FilterSettings::fromSearchParams($searchParams);
- }
-
$this->view->assignMultiple([
'detailPageUid' => $this->settings['detailPageUid'],
'referringPageUid' => $this->settings['defaultSearchPageUid'],
@@ -127,20 +149,6 @@ class SearchController extends ActionController
]);
}
- /**
- * @param string $encodedFilterSettings
- * @throws StopActionException
- */
- public function staticresultAction($encodedFilterSettings)
- {
- $this->forward(
- 'searchresult',
- null,
- null,
- ['filterSettings' => $encodedFilterSettings]
- );
- }
-
/**
* @param SearchParams $searchParams
*/
diff --git a/public/typo3conf/ext/ep_products/Classes/Middleware/StaticSearchParamsMiddleware.php b/public/typo3conf/ext/ep_products/Classes/Middleware/StaticSearchParamsMiddleware.php
index 4d0125f6..46225d9b 100644
--- a/public/typo3conf/ext/ep_products/Classes/Middleware/StaticSearchParamsMiddleware.php
+++ b/public/typo3conf/ext/ep_products/Classes/Middleware/StaticSearchParamsMiddleware.php
@@ -42,7 +42,7 @@ class StaticSearchParamsMiddleware implements MiddlewareInterface
use DbConnectionTrait;
const PREFIX_PATH_SEGMENT = 'reiseauswahl';
- const SEARCH_RESULT_URI = '/skireisen/auswahl/';
+ const SEARCH_RESULT_URI = '/skireisen/suche/ergebnis/';
const REDIRECT_RESPONSE_CODE = 302;
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
diff --git a/public/typo3conf/ext/ep_products/Configuration/TCA/Overrides/tt_content.php b/public/typo3conf/ext/ep_products/Configuration/TCA/Overrides/tt_content.php
index c69a73b4..32393cbd 100644
--- a/public/typo3conf/ext/ep_products/Configuration/TCA/Overrides/tt_content.php
+++ b/public/typo3conf/ext/ep_products/Configuration/TCA/Overrides/tt_content.php
@@ -17,12 +17,6 @@ call_user_func(function () {
'Suchergebnis'
);
- \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
- 'EP.EpProducts',
- 'staticresult',
- 'statisches Suchergebnis'
- );
-
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'EP.EpProducts',
'product_detail',
diff --git a/public/typo3conf/ext/ep_products/Configuration/TypoScript/constants.typoscript b/public/typo3conf/ext/ep_products/Configuration/TypoScript/constants.typoscript
index a3160370..8bb0ae81 100644
--- a/public/typo3conf/ext/ep_products/Configuration/TypoScript/constants.typoscript
+++ b/public/typo3conf/ext/ep_products/Configuration/TypoScript/constants.typoscript
@@ -20,8 +20,6 @@ plugin.tx_epproducts {
snowReportStoragePid =
# cat=plugin.tx_epproducts//a; type=string; label=Default search page UID
defaultSearchPageUid =
- # cat=plugin.tx_epproducts//a; type=string; label=Default static search page UID
- defaultStaticSearchPageUid =
# cat=plugin.tx_epproducts//a; type=string; label=Default product detail page UID
defaultDetailPageUid =
# cat=plugin.tx_epproducts//a; type=string; label=Exclude products with concept UIDs from search result (CSV)
diff --git a/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript b/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript
index 286ff92e..8b1aebd9 100644
--- a/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript
+++ b/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript
@@ -27,7 +27,6 @@ plugin.tx_epproducts {
destinationsStoragePid = {$plugin.tx_epproducts.settings.destinationsStoragePid}
snowReportStoragePid = {$plugin.tx_epproducts.settings.snowReportStoragePid}
defaultSearchPageUid = {$plugin.tx_epproducts.settings.defaultSearchPageUid}
- defaultStaticSearchPageUid = {$plugin.tx_epproducts.settings.defaultStaticSearchPageUid}
defaultDetailPageUid = {$plugin.tx_epproducts.settings.defaultDetailPageUid}
excludedConceptUids = {$plugin.tx_epproducts.settings.excludedConceptUids}
excludedRegionUids = {$plugin.tx_epproducts.settings.excludedRegionUids}
diff --git a/public/typo3conf/ext/ep_products/ext_localconf.php b/public/typo3conf/ext/ep_products/ext_localconf.php
index 28e5f408..12ad5e2f 100644
--- a/public/typo3conf/ext/ep_products/ext_localconf.php
+++ b/public/typo3conf/ext/ep_products/ext_localconf.php
@@ -50,21 +50,10 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\EP\EpProducts\T
'EP.' . $_EXTKEY,
'searchresult',
[
- 'Search' => 'searchresult',
+ 'Search' => 'searchresult,processSearch',
],
[
- 'Search' => 'searchresult',
- ]
-);
-
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
- 'EP.' . $_EXTKEY,
- 'staticresult',
- [
- 'Search' => 'staticresult',
- ],
- [
- 'Search' => 'staticresult',
+ 'Search' => 'searchresult,processSearch',
]
);
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/_app.js b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/_app.js
index baa96e25..059117b3 100644
--- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/_app.js
+++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/_app.js
@@ -30,8 +30,8 @@ import ContactForm from './components/ContactForm.vue'
import WatchlistToggle from './components/WatchlistToggle.vue'
import Watchlist from './components/Watchlist.vue'
import HotelList from './components/HotelList.vue'
-import ReferrerLink from './components/ReferrerLink.vue'
import FacebookPixel from './components/FacebookPixel.vue'
+import BackLink from './components/BackLink.vue'
// Define global constants
const $window = $(window);
@@ -64,7 +64,7 @@ new Vue({
WatchlistToggle,
Watchlist,
HotelList,
- ReferrerLink,
+ BackLink,
MyEp: () => import('./myep/components/App.vue'),
FacebookPixel
},
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/BackLink.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/BackLink.vue
new file mode 100644
index 00000000..d7c482e0
--- /dev/null
+++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/BackLink.vue
@@ -0,0 +1,31 @@
+
+
- {{ referringPage.label }}
-
+