Gruppenrabatt bis zu 100€ möglich
-Für Gruppen bis 15 Personen könnt ihr
Loading...
diff --git a/web/typo3conf/ext/ep_products/Classes/Controller/ProductController.php b/web/typo3conf/ext/ep_products/Classes/Controller/ProductController.php
index 59612aa7..2a3c5542 100644
--- a/web/typo3conf/ext/ep_products/Classes/Controller/ProductController.php
+++ b/web/typo3conf/ext/ep_products/Classes/Controller/ProductController.php
@@ -35,15 +35,12 @@ use EP\EpProducts\Service\DateService;
use EP\EpProducts\Service\FilterService;
use EP\EpProducts\Service\HotelDataService;
use EP\EpProducts\Service\ProductDataService;
-use EP\EpProducts\Traits\RequestArgumentTypeConversionTrait;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
class ProductController extends ActionController
{
- use RequestArgumentTypeConversionTrait;
-
/**
* @var \EP\EpProducts\Domain\Repository\ProductRepository
*/
@@ -100,22 +97,15 @@ class ProductController extends ActionController
$this->filterService = $filterService;
}
- public function initializeAction()
- {
- $this->processFilterSettingsArgument();
- }
-
/**
* @param Product $product
* @param Hotel $hotel
- * @param int $referringPageUid
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
*/
public function detailAction(
Product $product = null,
- Hotel $hotel = null,
- $referringPageUid = null
+ Hotel $hotel = null
)
{
// Get product to display from flexform settings if not provided via url
@@ -137,7 +127,6 @@ class ProductController extends ActionController
if ($product->getHotels()->count() > 1) {
$arguments = [
'product' => $product,
- 'referringPageUid' => $referringPageUid,
];
$this->forward('hotelList', null, null, $arguments);
}
@@ -153,8 +142,6 @@ class ProductController extends ActionController
$this->view->assignMultiple([
'hotel' => $hotel,
'product' => $product,
- 'referringPageUid' => $referringPageUid,
- 'currentPageUid' => $GLOBALS['TSFE']->id,
'isProductWithExcludedConcept' => $isProductWithExcludedConcept,
'isProductWithNoInfoConcept' => $isProductWithNoInfoConcept,
]);
@@ -178,18 +165,16 @@ class ProductController extends ActionController
/**
* @param Product $product
- * @param int $referringPageUid
*/
public function hotelListAction(
- Product $product,
- $referringPageUid = null
+ Product $product
)
{
$hotels = $this->hotelDataService->getList($product);
$this->view->assignMultiple([
'hotels' => $hotels,
'product' => $product,
- 'referringPageUid' => $referringPageUid,
+ 'currentPageUid' => $GLOBALS['TSFE']->id,
'linkHotel' => true,
]);
}
diff --git a/web/typo3conf/ext/ep_products/Classes/Domain/Repository/DateRepository.php b/web/typo3conf/ext/ep_products/Classes/Domain/Repository/DateRepository.php
index 2d0eef0c..2b661552 100644
--- a/web/typo3conf/ext/ep_products/Classes/Domain/Repository/DateRepository.php
+++ b/web/typo3conf/ext/ep_products/Classes/Domain/Repository/DateRepository.php
@@ -129,13 +129,13 @@ class DateRepository extends AbstractRepository
$qb = $this->getDbConnection()->createQueryBuilder();
$query = $qb
- ->select('hotel uid')
+ ->select('hotel as uid')
->addSelectLiteral('REPLACE(hotel_name, "\r\n", " ") name')
->from('tx_epproducts_domain_model_date', 'date')
->where('product_searchable = 1')
->andWhere($qb->expr()->orX(
- $qb->expr()->like('LOWER(hotel_name) COLLATE utf8_bin',':searchName'),
- $qb->expr()->like('LOWER(hotel_keywords) COLLATE utf8_bin', ':searchKeywords')
+ $qb->expr()->like('hotel_name',':searchName'),
+ $qb->expr()->like('hotel_keywords', ':searchKeywords')
))
->orderBy('hotel_name')
->groupBy('hotel_name')
@@ -170,14 +170,14 @@ class DateRepository extends AbstractRepository
->from('tx_epproducts_domain_model_date', 'date')
->where('product_searchable = 1')
->andWhere($qb->expr()->orX(
- $qb->expr()->like('LOWER(product_name) COLLATE utf8_bin',':searchName'),
- $qb->expr()->like('LOWER(product_keywords) COLLATE utf8_bin', ':searchKeywords'),
- $qb->expr()->like('LOWER(country_name) COLLATE utf8_bin',':searchKeywords'),
- $qb->expr()->like('LOWER(country_keywords) COLLATE utf8_bin', ':searchKeywords'),
- $qb->expr()->like('LOWER(region_name) COLLATE utf8_bin', ':searchKeywords'),
- $qb->expr()->like('LOWER(region_keywords) COLLATE utf8_bin', ':searchKeywords'),
- $qb->expr()->like('LOWER(city_name) COLLATE utf8_bin', ':searchKeywords'),
- $qb->expr()->like('LOWER(city_keywords) COLLATE utf8_bin', ':searchKeywords')
+ $qb->expr()->like('product_name',':searchName'),
+ $qb->expr()->like('product_keywords', ':searchKeywords'),
+ $qb->expr()->like('country_name',':searchKeywords'),
+ $qb->expr()->like('country_keywords', ':searchKeywords'),
+ $qb->expr()->like('region_name', ':searchKeywords'),
+ $qb->expr()->like('region_keywords', ':searchKeywords'),
+ $qb->expr()->like('city_name', ':searchKeywords'),
+ $qb->expr()->like('city_keywords', ':searchKeywords')
))
->orderBy('product_name')
->groupBy('product_name')
@@ -218,8 +218,8 @@ class DateRepository extends AbstractRepository
->from('tx_epproducts_domain_model_date', 'date')
->where('product_searchable = 1')
->andWhere($qb->expr()->orX(
- $qb->expr()->like('LOWER(' . $type . '_name) COLLATE utf8_bin',':searchName'),
- $qb->expr()->like('LOWER(' . $type . '_keywords) COLLATE utf8_bin', ':searchKeywords')
+ $qb->expr()->like($type . '_name',':searchName'),
+ $qb->expr()->like($type . '_keywords', ':searchKeywords')
))
->orderBy($type . '_name')
->groupBy($type . '_name')
diff --git a/web/typo3conf/ext/ep_products/Classes/Traits/RequestArgumentTypeConversionTrait.php b/web/typo3conf/ext/ep_products/Classes/Traits/RequestArgumentTypeConversionTrait.php
index 0e020575..289eb0c1 100644
--- a/web/typo3conf/ext/ep_products/Classes/Traits/RequestArgumentTypeConversionTrait.php
+++ b/web/typo3conf/ext/ep_products/Classes/Traits/RequestArgumentTypeConversionTrait.php
@@ -136,13 +136,13 @@ trait RequestArgumentTypeConversionTrait
*/
static protected function convertType($value)
{
- if (is_string($value) && (strtolower($value) === 'true' || strtolower($value) === 'false')) {
+ if (\is_string($value) && (strtolower($value) === 'true' || strtolower($value) === 'false')) {
return strtolower($value) === 'true';
}
- if (is_numeric($value)) {
+ if (\is_numeric($value)) {
return (int) $value;
}
- if (is_array($value)) {
+ if (\is_array($value)) {
return array_map(function($item) {
return static::convertType($item);
}, $value);
diff --git a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/_app.js b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/_app.js
index ebc3e046..172604ab 100644
--- a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/_app.js
+++ b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/_app.js
@@ -30,6 +30,8 @@ import EventPricetable from './components/EventPriceTable.vue'
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'
// Define global constants
const $window = $(window);
@@ -59,7 +61,9 @@ new Vue({
EventPricetable,
ContactForm,
WatchlistToggle,
- Watchlist
+ Watchlist,
+ HotelList,
+ ReferrerLink
},
data () {
return {
diff --git a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/_filtersettings.js b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/_filtersettings.js
index a188e98d..b6098ffb 100644
--- a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/_filtersettings.js
+++ b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/_filtersettings.js
@@ -10,6 +10,7 @@ export default {
conceptUids: [],
dateFrom: null,
dateTo: null,
+ priceRange: 0,
nights: 0,
pax: 1,
hotelTypes: [],
diff --git a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/HotelList.vue b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/HotelList.vue
new file mode 100644
index 00000000..5a2ddc71
--- /dev/null
+++ b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/HotelList.vue
@@ -0,0 +1,35 @@
+
diff --git a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/PriceRangeSelect.vue b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/PriceRangeSelect.vue
index da7f4850..ceaa1460 100644
--- a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/PriceRangeSelect.vue
+++ b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/PriceRangeSelect.vue
@@ -31,6 +31,7 @@
required: true
},
range: {
+ type: Number,
default: 0
},
showLabel: {
@@ -40,7 +41,7 @@
},
computed: {
rangeLabel () {
- if (this.rangeSelected === 0) {
+ if (this.rangeSelected === 0 || $.isEmptyObject(this.rangeOptions)) {
return 'beliebig';
}
let range = this.rangeOptions[this.rangeSelected];
@@ -64,8 +65,8 @@
this.$emit('selected', 0);
},
optionSelect (value) {
- this.rangeSelected = value;
- this.$emit('selected', value);
+ this.rangeSelected = parseInt(value);
+ this.$emit('selected', parseInt(value));
}
},
watch: {
diff --git a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/ProductDetail.vue b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/ProductDetail.vue
index 162bd090..425fd944 100644
--- a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/ProductDetail.vue
+++ b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/ProductDetail.vue
@@ -49,7 +49,8 @@
loading: true,
activeSection: null,
singleDate: false,
- filterSettings: defaultFilterSettings
+ filterSettings: defaultFilterSettings,
+ referringPage: null
}
},
props: {
@@ -190,6 +191,10 @@
if (this.$session.has('filterSettings')) {
this.filterSettings = this.$session.get('filterSettings')
}
+ if (this.$session.has('referringPage')) {
+ this.referringPage = this.$session.get('referringPage');
+ this.$session.remove('referringPage');
+ }
EventBus.$on('loadDatesTable', () => {
this.loadDatesView();
});
diff --git a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/ReferrerLink.vue b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/ReferrerLink.vue
new file mode 100644
index 00000000..bb39305d
--- /dev/null
+++ b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/ReferrerLink.vue
@@ -0,0 +1,28 @@
+
+
+
-
Gruppenrabatt bis zu 100€ möglich
-Für Gruppen bis 15 Personen könnt ihr
Loading...