diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/CityController.php b/public/typo3conf/ext/ep_products/Classes/Controller/CityController.php index 79087863..2e3c8696 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/CityController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/CityController.php @@ -58,7 +58,7 @@ class CityController extends ActionController /** * @param City $city */ - public function detailAction(City $city = null) + public function detailAction(City $city = null): void { if (null === $city) { $cityUid = $this->settings['cityUid']; @@ -81,11 +81,14 @@ class CityController extends ActionController ]); } - public function teasergroupAction() + public function teasergroupAction(): void { - $regionUid = $this->settings['regionUid']; + $regionUid = (int)$this->settings['regionUid']; + $countryUid = (int)$this->settings['countryUid']; $season = $this->settings['season']; - $cities = $this->cityRepository->getTeasersByRegionAndSeason($regionUid, $season); + $citiesPid = (int)$this->settings['citiesStoragePid']; + + $cities = $this->cityRepository->getTeasersByCountryOrRegionAndSeason($regionUid, $countryUid, $season, $citiesPid); $data = $this->configurationManager->getContentObject()->data; $this->view->assign('data', $data); $this->view->assign('teasers', $cities); diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/ProductController.php b/public/typo3conf/ext/ep_products/Classes/Controller/ProductController.php index bc7f055a..3722539f 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/ProductController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/ProductController.php @@ -161,12 +161,13 @@ class ProductController extends ActionController $enabledDates = array_keys($availableContingents); } - $excludedConceptUids = GeneralUtility::trimExplode(',', $this->settings['excludedConceptUids']); - $isProductWithExcludedConcept = ($product->getConcept() !== null) && \in_array($product->getConcept()->getUid(), - $excludedConceptUids, false); - $noInfoConceptUids = GeneralUtility::trimExplode(',', $this->settings['noInfoConceptUids']); - $isProductWithNoInfoConcept = ($product->getConcept() !== null) && \in_array($product->getConcept()->getUid(), - $noInfoConceptUids, false); + $concept = $product->getConcept(); + $excludedConceptUids = GeneralUtility::trimExplode(',', $this->settings['excludedConceptUids'], true); + $isProductWithExcludedConcept = ($concept !== null) && \in_array($concept->getUid(), $excludedConceptUids); + $noInfoConceptUids = GeneralUtility::trimExplode(',', $this->settings['noInfoConceptUids'], true); + $isProductWithNoInfoConcept = ($concept !== null) && \in_array($concept->getUid(), $noInfoConceptUids); + $groupInquiryFormConceptUids = GeneralUtility::trimExplode(',', $this->settings['groupInquiryFormConceptUids'], true); + $isProductWithGroupInquiryForm = ($concept !== null) && \in_array($concept->getUid(), $groupInquiryFormConceptUids); // Assemble backlink $backlinkUrl = GeneralUtility::_GET('ref'); @@ -178,6 +179,7 @@ class ProductController extends ActionController 'enabledDates' => $enabledDates ?? [], 'isProductWithExcludedConcept' => $isProductWithExcludedConcept, 'isProductWithNoInfoConcept' => $isProductWithNoInfoConcept, + 'isProductWithGroupInquiryForm' => $isProductWithGroupInquiryForm, 'currentPageUid' => $GLOBALS['TSFE']->id, 'dateFrom' => $dateFrom, 'dateTo' => $dateTo, diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/RegionController.php b/public/typo3conf/ext/ep_products/Classes/Controller/RegionController.php index 434767dc..453737bf 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/RegionController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/RegionController.php @@ -83,9 +83,10 @@ class RegionController extends ActionController public function teasergroupAction() { - $countryUid = $this->settings['countryUid']; + $countryUid = (int)$this->settings['countryUid']; $season = $this->settings['season']; - $regions = $this->regionRepository->getTeasersByCountryAndSeason($countryUid, $season); + $regionsPid = (int)$this->settings['regionsStoragePid']; + $regions = $this->regionRepository->getTeasersByCountryAndSeason($countryUid, $season, $regionsPid); $data = $this->configurationManager->getContentObject()->data; $this->view->assign('data', $data); $this->view->assign('teasers', $regions); diff --git a/public/typo3conf/ext/ep_products/Classes/Domain/Model/AbstractDestination.php b/public/typo3conf/ext/ep_products/Classes/Domain/Model/AbstractDestination.php index 54b8dc6f..35413e05 100644 --- a/public/typo3conf/ext/ep_products/Classes/Domain/Model/AbstractDestination.php +++ b/public/typo3conf/ext/ep_products/Classes/Domain/Model/AbstractDestination.php @@ -93,6 +93,11 @@ class AbstractDestination extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity */ protected $description = ''; + /** + * @var string + */ + protected $descriptionExtended = ''; + /** * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> */ @@ -322,6 +327,22 @@ class AbstractDestination extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity $this->description = $description; } + /** + * @return string + */ + public function getDescriptionExtended() + { + return $this->descriptionExtended; + } + + /** + * @param string $descriptionExtended + */ + public function setDescriptionExtended($descriptionExtended) + { + $this->descriptionExtended = $descriptionExtended; + } + /** * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $images */ diff --git a/public/typo3conf/ext/ep_products/Classes/Domain/Repository/CityRepository.php b/public/typo3conf/ext/ep_products/Classes/Domain/Repository/CityRepository.php index b285bce6..ba268ecb 100644 --- a/public/typo3conf/ext/ep_products/Classes/Domain/Repository/CityRepository.php +++ b/public/typo3conf/ext/ep_products/Classes/Domain/Repository/CityRepository.php @@ -31,24 +31,25 @@ use EP\EpProducts\Domain\Model\AbstractDestination; class CityRepository extends AbstractRepository { - - /** - * @param int $regionUid - * @param string $season - * - * @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface - */ - public function getTeasersByRegionAndSeason($regionUid, $season = 'w') + public function getTeasersByCountryOrRegionAndSeason(int $regionUid = 0, int $countryUid = 0, string $season = 'w', int $storagePid = 0) { if ($season === null) { $season = AbstractDestination::SEASON_WINTER; } $query = $this->createQuery(); $constraints = [ - $query->equals('region', $regionUid), $query->equals('season', $season), $query->equals('excludeFromTeasergroups', 0) ]; + if (0 < $regionUid) { + $constraints[] = $query->equals('region', $regionUid); + } elseif (0 < $countryUid) { + $constraints[] = $query->equals('country', $countryUid); + } + if (0 < $storagePid) { + $constraints[] = $query->equals('pid', $storagePid); + } + return $query ->matching($query->logicalAnd($constraints)) ->execute() diff --git a/public/typo3conf/ext/ep_products/Classes/Domain/Repository/RegionRepository.php b/public/typo3conf/ext/ep_products/Classes/Domain/Repository/RegionRepository.php index a29d8456..5f3baa6c 100644 --- a/public/typo3conf/ext/ep_products/Classes/Domain/Repository/RegionRepository.php +++ b/public/typo3conf/ext/ep_products/Classes/Domain/Repository/RegionRepository.php @@ -31,13 +31,7 @@ use EP\EpProducts\Domain\Model\AbstractDestination; class RegionRepository extends AbstractRepository { - - /** - * @param int $countryUid - * @param string $season - * @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface - */ - public function getTeasersByCountryAndSeason($countryUid, $season = 'w') + public function getTeasersByCountryAndSeason(int $countryUid, string $season = 'w', int $storagePid = 0) { if ($season === null) { $season = AbstractDestination::SEASON_WINTER; @@ -48,6 +42,11 @@ class RegionRepository extends AbstractRepository $query->equals('season', $season), $query->equals('excludeFromTeasergroups', 0) ]; + + if (0 < $storagePid) { + $constraints[] = $query->equals('pid', $storagePid); + } + return $query ->matching($query->logicalAnd($constraints)) ->execute() diff --git a/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_city.php b/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_city.php index beaa2927..17a95702 100644 --- a/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_city.php +++ b/public/typo3conf/ext/ep_products/Configuration/TCA/tx_epproducts_domain_model_city.php @@ -23,7 +23,9 @@ return [ ], 'types' => [ '1' => [ - 'showitem' => '--palette--;;top, name_internal, --palette--;;name, --palette--;;destinations, teaser, keywords, description, party, leisure, facts, officetip, --div--;Bilder/Dateien, teaser_images, header_images, images', + 'showitem' => '--palette--;;top, name_internal, --palette--;;name, --palette--;;destinations, teaser, + keywords, description, description_extended, party, leisure, facts, officetip, + --div--;Bilder/Dateien, teaser_images, header_images, images', ], ], 'palettes' => [ @@ -209,7 +211,18 @@ return [ ], 'description' => [ 'exclude' => 0, - 'label' => 'Der Ort', + 'label' => 'Der Ort (oben)', + 'config' => [ + 'type' => 'text', + 'cols' => 40, + 'rows' => 15, + 'eval' => 'trim', + 'enableRichtext' => true, + ], + ], + 'description_extended' => [ + 'exclude' => 0, + 'label' => 'Der Ort (unten)', 'config' => [ 'type' => 'text', 'cols' => 40, diff --git a/public/typo3conf/ext/ep_products/Configuration/TypoScript/constants.typoscript b/public/typo3conf/ext/ep_products/Configuration/TypoScript/constants.typoscript index 0840078d..f62dc5c0 100644 --- a/public/typo3conf/ext/ep_products/Configuration/TypoScript/constants.typoscript +++ b/public/typo3conf/ext/ep_products/Configuration/TypoScript/constants.typoscript @@ -1,48 +1,60 @@ +# customsubcategory=100=Storage +# customsubcategory=110=Pages +# customsubcategory=120=Search/Filtering +# customsubcategory=130=Email +# customsubcategory=140=Misc + plugin.tx_epproducts { settings { - # cat=plugin.tx_epproducts//a; type=string; label=Products storage PID + # cat=epproducts/100/100; type=string; label=Products storage PID productsStoragePid = - # cat=plugin.tx_epproducts//a; type=string; label=Hotels storage PID + # cat=epproducts/100/110; type=string; label=Hotels storage PID hotelsStoragePid = - # cat=plugin.tx_epproducts//a; type=string; label=Concepts storage PID + # cat=epproducts/100/120; type=string; label=Concepts storage PID conceptsStoragePid = - # cat=plugin.tx_epproducts//a; type=string; label=Facts storage PID + # cat=epproducts/100/130; type=string; label=Facts storage PID factsStoragePid = - # cat=plugin.tx_epproducts//a; type=string; label=Faqs storage PID + # cat=epproducts/100/140; type=string; label=Faqs storage PID faqsStoragePid = - # cat=plugin.tx_epproducts//a; type=string; label=Destinations storage PID + # cat=epproducts/100/150; type=string; label=Destinations storage PID destinationsStoragePid = - # cat=plugin.tx_epproducts//a; type=string; label=Teammember storage PID + # cat=epproducts/100/160; type=string; label=Regions storage PID + regionsStoragePid = + # cat=epproducts/100/160; type=string; label=Cities storage PID + citiesStoragePid = + # cat=epproducts/100/170; type=string; label=Teammember storage PID teammemberStoragePid = - # cat=plugin.tx_epproducts//a; type=string; label=Officetip storage PID + # cat=epproducts/100/180; type=string; label=Officetip storage PID officetipStoragePid = - # cat=plugin.tx_epproducts//a; type=string; label=Snow report storage PID + # cat=epproducts/100/190; type=string; label=Snow report storage PID snowReportStoragePid = - # cat=plugin.tx_epproducts//a; type=string; label=Default search page UID + # cat=epproducts/110/100; type=string; label=Default search page UID defaultSearchPageUid = - # cat=plugin.tx_epproducts//a; type=string; label=Default product detail page UID + # cat=epproducts/110/110; 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) - excludedConceptUids = - # cat=plugin.tx_epproducts//a; type=string; label=Exclude regions with these UIDs from filter options (CSV) - excludedRegionUids = - # cat=plugin.tx_epproducts//a; type=string; label=Force concept UID in all search related parts (CSV) - forcedConceptUids = - # cat=plugin.tx_epproducts//a; type=string; label=Don't show availability info for products with these concept UIDs - noInfoConceptUids = - # cat=plugin.tx_epproducts//a; type=string; label=Room types for pricetables (CSV) - 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 + # cat=epproducts/110/120; type=string; label=Page UID with reseller export plugin resellerExportPageUid = - # cat=plugin.tx_epproducts//a; type=string; label=Email recipient for groups price inquiries + # cat=epproducts/120/100; type=string; label=Exclude products with concept UIDs from search result (CSV) + excludedConceptUids = + # cat=epproducts/120/110; type=string; label=Exclude regions with these UIDs from filter options (CSV) + excludedRegionUids = + # cat=epproducts/120/120; type=string; label=Force concept UID in all search related parts (CSV) + forcedConceptUids = + # cat=epproducts/120/130; type=string; label=Don't show availability info for products with these concept UIDs + noInfoConceptUids = + # cat=epproducts/130/110; type=string; label=Email recipient for groups price inquiries groupsPriceToEmail = gruppen@ep-reisen.de - # cat=plugin.tx_epproducts//a; type=string; label=Email recipient for groups price inquiries + # cat=epproducts/130/120; type=string; label=Email recipient for groups price inquiries groupsPriceToName = EP Reisen + # cat=epproducts/140/100; type=string; label=Room types for pricetables (CSV) + priceTableRoomTypes = 1,2,3,4,5,6,7,8,9,10 + # cat=epproducts/140/110; type=string; label=Ignore following IPs in searchlog + searchLogIgnoreIps = + # cat=epproducts/140/120; type=string; label=Concept UIDs to trigger inquiry form on product detail page (CSV) + groupInquiryFormConceptUids = } persistence { - # cat=plugin.tx_epproducts//a; type=string; label=Default storage PID + # cat=epproducts/100/100; type=string; label=Default storage PID storagePid = } } diff --git a/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript b/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript index 9c4e4db5..cc1bf015 100644 --- a/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript +++ b/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript @@ -26,6 +26,8 @@ plugin.tx_epproducts { settings { productsPid = {$plugin.tx_epproducts.settings.productsStoragePid} destinationsStoragePid = {$plugin.tx_epproducts.settings.destinationsStoragePid} + regionsStoragePid = {$plugin.tx_epproducts.settings.regionsStoragePid} + citiesStoragePid = {$plugin.tx_epproducts.settings.citiesStoragePid} snowReportStoragePid = {$plugin.tx_epproducts.settings.snowReportStoragePid} defaultSearchPageUid = {$plugin.tx_epproducts.settings.defaultSearchPageUid} defaultDetailPageUid = {$plugin.tx_epproducts.settings.defaultDetailPageUid} @@ -47,6 +49,7 @@ plugin.tx_epproducts { groupsPricePopupPageUid = {$plugin.tx_eptheme.settings.groupsPricePopupPageUid} groupsPriceToEmail = {$plugin.tx_epproducts.settings.groupsPriceToEmail} groupsPriceToName = {$plugin.tx_epproducts.settings.groupsPriceToName} + groupInquiryFormConceptUids = {$plugin.tx_epproducts.settings.groupInquiryFormConceptUids} logoImage = {$plugin.tx_eptheme.settings.logoImage} themekey = {$plugin.tx_eptheme.settings.themekey} datePickerPresets { diff --git a/public/typo3conf/ext/ep_products/ext_tables.sql b/public/typo3conf/ext/ep_products/ext_tables.sql index 98f46684..5f6035df 100644 --- a/public/typo3conf/ext/ep_products/ext_tables.sql +++ b/public/typo3conf/ext/ep_products/ext_tables.sql @@ -714,6 +714,7 @@ CREATE TABLE tx_epproducts_domain_model_city header_subtitle varchar(255) DEFAULT '' NOT NULL, keywords text NOT NULL, description text NOT NULL, + description_extended text NOT NULL, party text NOT NULL, leisure text NOT NULL, teaser_images int(11) unsigned NOT NULL default '0', diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/osm_controller.js b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/osm_controller.js index fd36532d..47f6f49d 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/osm_controller.js +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/controllers/osm_controller.js @@ -36,15 +36,9 @@ export default class extends Controller { for (let item of this.markersValue) { const position = L.latLng(item.lat, item.lng) const marker = L.marker(position) - if (item.externalLink) { - marker.on('click', () => { - window.open(item.externalLink, '_blank') - }) - } else { - const popupContent = '
' + item.name + '
' + item.teaser + - '
zu den Details
' - marker.bindPopup(popupContent) - } + const popupContent = '
' + item.name + '
' + item.teaser + + '
zu den Details
' + marker.bindPopup(popupContent) marker.addTo(this.map) bounds.extend(position) } diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/BookingEdit.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/BookingEdit.vue index 30eb77c1..ec52600c 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/BookingEdit.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/BookingEdit.vue @@ -470,7 +470,7 @@ } }, computed: { - ...mapState(['config', 'loading']), + ...mapState(['config', 'loading', 'countries']), ...mapGetters(['isGroupManager']), availableContingents () { let filteredContingents = {}; diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/AccommodationSelect.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/AccommodationSelect.vue index 086dd0de..7b18e423 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/AccommodationSelect.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/myep/components/AccommodationSelect.vue @@ -6,9 +6,7 @@ Zimmer - - - +