{# @var \Pimcore\Templating\GlobalVariables app #}
{# @var accommodation \Elements\Demi\Model\AccommodationServiceProvider #}
{# @var productResultSet \Elements\Demi\Accommodation\Search\ResultSet\Accommodation #}
{# @var housePackageResultSet \Elements\Demi\Accommodation\Search\ResultSet\HousePackageMaster #}
{# @var searchParam = \Elements\Demi\Accommodation\Search\Parameter #}
{# @var housePackageMaster \Elements\Demi\Model\HousePackageMaster #}
{# @var sortedMarketingGroups #}
{# @var sortedFacilities #}
{# @var impressionLinks #}
{# @var \Elements\Bundle\DemiFrontendBundle\Templating\Helper\Seo seoHelper #}
{# @var string countingClicksUriJs #}
{% if not availabilityIsChecked %}
{% set fromDate = null %}
{% else %}
{% set fromDate = demi_getSearchFrom() %}
{% endif %}
{% if not editmode %}
{% do elements_head_title().setTitle( demi_seoTitleForHousePackage(accommodation,housePackageMaster,null), true ) %}
{% do elements_head_meta().setDescription( demi_seoDescriptionForHousePackage(accommodation,housePackageMaster,null,fromDate),true ) %}
{% endif %}
{% set canonicalUrl = demi_demiUrl({
'accommodation': accommodation,
'package': housePackageMaster
},'demi_acco_detail_package_page',true) %}
{% do elements_canonical().checkAllParams(false).setDomain(canonicalUrl)|raw %}
{% do demi_paymentGetDefaultCurrency(accommodation) %}
{% set maxRatingValue = demi_core_configuration('getMaxRatingValue',[]) ?: 5 %}
{% set maxRatingNormalized = demi_core_configuration('getMaxRatingNormalized',[]) ?: 5 %}
{% set hasRatingWidget = demi_ratingGetHasRatingWidgetTrustYou(accommodation) %}
{% set accoUrlPlain = demi_demiUrl({
'accommodation': accommodation
},'demi_acco_detail_page',true) %}
{% set accoUrl = accoUrlPlain %}
{% if "?" in accoUrl %}
{% set accoUrl = accoUrl ~ "&activeTab=%23packages" %}
{% else %}
{% set accoUrl = accoUrl ~ "?activeTab=%23packages" %}
{% endif %}
{% set ajaxUrl = demi_demiUrl({
'accommodation': accommodation,
'package': housePackageMaster
},'demi_acco_package_ajax') %}
{% if '?' in ajaxUrl %}
{% set parts = ajaxUrl|split('?') %}
{% set ajaxUrl = parts[0] %}
{% endif %}
{% set liveDetailProductsUrl = ajaxUrl ~ "?ajaxRequestType=getLiveDetailProducts" %}
{% set corridorMatrixUrl = ajaxUrl ~ "?ajaxRequestType=getCorridorMatrix" %}
{% set productUrl = ajaxUrl ~ "?ajaxRequestType=getProductByIdAndMealcode" %}
{% set paymentInformationUrl = ajaxUrl ~ "?ajaxRequestType=getProductByIdAndMealcode" %}
{% set address = accommodation.getAddress() %}
{% set anchors = {
'details': '#details',
'booking': '#booking',
'accommodation': '#accommodation'
} %}
{% if activeTab is not defined or activeTab not in anchors %}
{% set activeTab = '#details' %}
{% else %}
{% do jsConfig('_initialState').add({'activeTab': activeTab}) %}
{% endif %}
{% set step1Url = demi_demiUrl({
'path': demi_core_configuration('getCheckoutPath',[]).getFullPath(),
'controller': 'cart',
'action': 'step1'
},'demi_checkout',true) %}
{% set imagesTypes = demi_getAccoImagesTypesAsArray(housePackageMaster) %}
{% set imageList = housePackageMaster.getImages(null, fromDate, true) %}
{% set imageList = imageList|merge(accommodation.getImages(imagesTypes, fromDate, true)) %}
{% set photoCount = imageList|length %}
{% set videoCount = impressionLinks["video"]|length %}
{% set panoCount = impressionLinks["pano"]|length %}
{% if imageList is defined and imageList|length > 0 and imageList[0] is not empty %}
{% do elements_opengraph().addImage(imageList[0].getFullPath()) %}
{% endif %}
{% if showJsonLd %}
{% set jsonLdData = demi_getProductJsonLdData(accommodation, housePackageResultSet, housePackageMaster, fromDate, []) %}
{% do jsonLd().add("accommodation", jsonLdData) %}
{# TODO @msteyrer breadcrumb helper bundle not in use atm
{% do breadcrumbHelper().set({
'parentId': document.getId(),
'url': accoUrlPlain,
'label': accommodation.getName()
}) %}
{% do breadcrumbHelper().append({
'parentId': document.getId(),
'url': canonicalUrl,
'label': housePackageMaster.getName()
}) %}
{{ include('@ElementsDemiFrontend/Navigation/breadcrumb.html.twig') }} #}
{% endif %}
{% extends '@ElementsDemiFrontend/Layout/layout.html.twig' %}
{% block content %}
{{ include("@ElementsDemiFrontend/Includes/canonicalOverride.html.twig", {
"object": accommodation,
"package": housePackageMaster
}) }}
<script type="text/javascript" data-cookieconsent="ignore">
_config.viewType = "package";
_config.historyController = true;
_config.roomSelection = true;
_config.searchData = true;
_config.detailResultUrl = '{{ liveDetailProductsUrl|raw }}';
_config.corridorSearchUrl = '{{ corridorMatrixUrl|raw }}';
_config.detailPaymentInfoUrl = '{{ paymentInformationUrl|raw }}';
_config.detailProductUrl = '{{ productUrl|raw }}';
_config.addToCartUrl = '{{ step1Url|raw }}';
_config.cartWarningOnMultipleAccoProducts = {{ demi_core_configuration('getWarningOnMultipleAccoProducts',[]) ? 'true': 'false' }};
_config.cartInfoUrl = '{{ demi_checkoutUrl('cart','hasAccoInCart')|raw }}';
_config.roomList = true;
_config.hpmId = "{{ housePackageMaster.getId() }}";
_config.trackingCountingClicksUrl='{{ countingClicksUriJs|raw }}';
_config.productData = {
id: {{ accommodation.getId() }},
name: "{{ demi_impressionName(accommodation) }}",
category: "{{ demi_impressionCategory(accommodation, housePackageMaster, searchParam) }}",
brand: "{{ demi_impressionBrand(accommodation) }}"
};
_config.acommodationMapHideBusinesses = {{ demi_core_configuration('getMapHideBusinesses',[]) ? 'true' : 'false' }};
{% set mealtypeId = searchParam.getMealTypeId() %}
{% if mealtypeId is not empty and mealtypeId[0] is not empty %}
_config.urlParams = _config.urlParams || [];
_config.urlParams.push( { name : "mealtype", value : "{{ mealtypeId[0] }}"} );
{% endif %}
{% if searchParam.getBookOnly() %}
_config.urlParams = _config.urlParams || [];
_config.urlParams.push( { name : "bookonly", value : "on"} );
{% endif %}
</script>
{{ include('@ElementsDemiFrontend/Includes/tags/detail-package.html.twig',
{
'isMobile': false,
'object': accommodation,
'searchParam': searchParam,
'accoResultSet': accommodationResultSet is defined ? accommodationResultSet : null ,
'productResultSet': productResultSet is defined ? productResultSet : null,
'packages': packages is defined ? packages : null,
'sortedMarketingGroups': sortedMarketingGroups,
'sortedFacilities': sortedFacilities,
'sortedHealthMeasures':sortedHealthMeasures,
'photoCount': photoCount,
'videoCount': videoCount,
'panoCount': panoCount,
'housePackageResultSet': housePackageResultSet,
'housePackageMaster': housePackageMaster
}
) }}
<main id="main" role="main">
<div>
<div class="js-search-data__show-if-submitted" {{ availabilityIsChecked ? '' : 'hidden' }}>
{{ include('@ElementsDemiFrontend/Includes/ribbon.html.twig',{'searchParam': searchParam,'showBackButton': true, 'withFlag': false}) }}
</div>
<div class="js-search-data__hide-if-submitted" {{ availabilityIsChecked ? 'hidden' : '' }}>
{{ include('@ElementsDemiFrontend/Includes/ribbon-price.html.twig',{'resultSet': housePackageResultSet , 'accommodation': accommodation}) }}
</div>
</div>
<div class="container">
{% if accommodation.getIsTesthotel() %}<div class="demi-test-object-notice mb-3 text-danger"><strong>Testbetrieb</strong> nur für Debug/aktive Pimcore User sichtbar</div>{% endif %}
<h1 class="h2 text-primary">{{ housePackageMaster.getName() }}</h1>
<h2 class="h4">
<a href="{{ accoUrlPlain }}"
class="js-tracking--click-piwik"
data-tracking-category="Package detail"
data-tracking-action="accomoation click">
{{ demi_getAccoNameWithStars(accommodation) }}
</a>
</h2>
<div class="row row--gutter-width-20 mb-2">
<div class="col col-auto">
{{ accommodation.getCategoryNames(2) }}
</div>
<div class="col">
<div class="media text-muted">
{% if address is not empty and address.getTown() is not empty %}
<div class="demi-icon demi-icon-marker mr-1 icon-in-text" title="{{ 'demi.detail.town'|trans }}" aria-label="{{ 'demi.detail.town'|trans }}"></div>
<div class="media-body">
{{ address.getTown() }}
</div>
{% endif %}
</div>
</div>
</div>
<div class="row row--gutter-width-20 mb-2">
<div class="col">
{% if accommodation.getRatingSystem()=="TrustYou" %}
{% set normalizedRating = demi_ratingGetNormalized(accommodation, maxRatingValue, maxRatingNormalized) %}
{% if normalizedRating is not empty %}
{{ include('@ElementsDemiFrontend/Accommodation/includes/rating-md.html.twig', {
"score": normalizedRating,
"text": accommodation.getRatingScoreDescription(),
"styleModifier": "mb-1",
"showReviewCount": true,
"ratingCount": accommodation.getRatingCountDirect()
}) }}
{% endif %}
{% endif %}
</div>
<div class="col col-auto">
{{ include('@ElementsDemiFrontend/Accommodation/includes/serviceprovider-logo.html.twig', {
"logo": accommodation.getImages([constant('Elements\\Demi\\Deskline\\Constant\\DocumentInterface::DOCUMENT_TYPE_SERVICE_PROVIDER_LOGO')])|first
}) }}
</div>
</div>
</div>
<figure class="figure my-3">
{% set imgSrc = housePackageMaster.getFirstImage(imagesTypes,fromDate) %}
{% set imgSrc = imgSrc is not null ? imgSrc : accommodation.getFirstImage(imagesTypes,fromDate) %}
{% if imgSrc is not null %}
{{ imgSrc.getThumbnail('demi-mobile-header-img').getHTML({'imgAttributes': {'class': 'img-full-width' }})|raw}}
{% endif %}
{% if photoCount > 1 %}
<div class="figure__item figure__item--right figure__item--bottom m-3">
<button class="btn btn-primary js-overlay__toggle js-tracking--click-piwik"
data-target="#{{ accommodation.getId() }}-imgs-overlay"
data-tracking-category="Gallery"
data-tracking-action="open">
{% set galleryString = photoCount > 1 ? 'demi.detail.images-gallery-button'|trans : 'demi.detail.image-gallery-button'|trans %}
{% set galleryString = galleryString|replace({'[AMOUNT_IMAGES]': photoCount}) %}
{% do elements_opengraph().setImages(elements_opengraph().getImages|merge( [app.request.getHost() ~ (imageList|first)])) %}
{{ galleryString }}
</button>
</div>
{% endif %}
</figure>
<div class="container" aria-live="polite">
<div class="js-room-list__loading js-corridor__search-info-loading" hidden>
<div class="text-center py-3">
{{ include('@ElementsDemiFrontend/Includes/elements/spinner/loading-spinner.html.twig') }}
</div>
</div>
<div class="js-room-list__content js-corridor__search-info-content" id="searchInfo" data-list="searchInfo">
{{ include('@ElementsDemiFrontend/Accommodation/searchInfoBox.mobile.html.twig', {
"accommodationResultSet": housePackageResultSet,
"isPackage": true
}) }}
</div>
</div>
<script type="text/javascript" data-cookieconsent="ignore">
_config.paramTabs = true;
</script>
<div class="mt-3">
<ul class="nav nav-border-tabs justify-content-center" role="tablist">
<li class="nav-item">
<a class="nav-link js-param-tab{{ activeTab == anchors['details'] ? ' active' : '' }} js-tracking js-tracking--click"
href="{{ anchors['details'] }}"
data-toggle="tab"
role="tab"
aria-expanded="{{ activeTab == anchors['details'] ? 'true' : 'false' }}"
data-tracking-category="button"
data-tracking-action="detail"
data-tracking-label="{{ accommodation.getName()|escape }}">
{{ 'demi.detail.package.tab.package'|trans }}
</a>
</li>
<li class="nav-item">
<a class="nav-link js-param-tab{{ activeTab == anchors['booking'] ? ' active' : '' }} js-tracking js-tracking--click"
href="{{ anchors['booking'] }}"
data-toggle="tab"
role="tab"
aria-expanded="{{ activeTab == anchors['booking'] ? 'true' : 'false' }}"
data-tracking-category="button"
data-tracking-action="package-booking"
data-tracking-label="{{ accommodation.getName()|escape }}">
{{ 'demi.detail.package.tab.availability'|trans }}
</a>
</li>
<li class="nav-item">
<a class="nav-link js-param-tab{{ activeTab == anchors['accommodation'] ? ' active' : '' }} js-tracking js-tracking--click"
href="{{ anchors['accommodation'] }}"
data-toggle="tab"
role="tab"
aria-expanded="{{ activeTab == anchors['accommodation'] ? 'true' : 'false' }}"
data-tracking-category="button"
data-tracking-action="package-accommodation"
data-tracking-label="{{ accommodation.getName()|escape }}">
{{ 'demi.detail.package.tab.acco'|trans }}
</a>
</li>
</ul>
</div>
<div class="bg-light-gray pb-4 pt-2">
<div class="tab-content">
<div class="tab-pane pt-2{{ activeTab == anchors['details'] ? ' active' : '' }} " id="details" role="tabpanel">
{{ include("@ElementsDemiFrontend/Accommodation/includes/package-details.mobile.html.twig" , {
'housePackageMaster': housePackageMaster,
'accommodation': accommodation
}) }}
</div>
<div class="tab-pane pt-2{{ activeTab == anchors['booking'] ? ' active' : '' }} " id="booking" role="tabpanel">
{{ include("@ElementsDemiFrontend/Accommodation/includes/acco-rooms.html.twig" , {
'package': true,
'availabilityChecked': availabilityIsChecked,
'housePackageMaster': housePackageMaster,
'productResultSet': housePackageResultSet|first,
'tvbPackage': null
}) }}
</div>
<div class="tab-pane pt-2{{ activeTab == anchors['accommodation'] ? ' active' : '' }} " id="accommodation" role="tabpanel">
{{ include("@ElementsDemiFrontend/Accommodation/includes/acco-details.mobile.html.twig", {
'package': true,
'address': address,
'photoCount': photoCount,
'availabilityIsChecked': availabilityIsChecked,
'fromDate': fromDate
}) }}
</div>
<div class="mt-4 text-center">
{{ include("@ElementsDemiFrontend/Accommodation/includes/enquiry-button.html.twig", {
"text": "demi.detail.package.enquiry-button"|trans,
"trackingCategory": "Package detail",
"trackingAction": "click enquiry"
}) }}
</div>
<div class="container mt-4">
<a href="{{ accoUrl }}"
class="btn btn-default-dark btn-block btn-lg js-tracking--click-piwik"
data-tracking-category="Package detail"
data-tracking-action="all packages click">
{{ 'demi.detail.package.show-all-offers-of-acco'|trans }}
</a>
</div>
</div>
</div>
</main>
{% set contactSnippet = demi_core_configuration('getContactSnippet',[])%}
{% if(contactSnippet is not empty) %}
{{ pimcore_inc(contactSnippet) }}
{% endif %}
{{ include('@ElementsDemiFrontend/Includes/overlays/search.html.twig', {
'filterSnippet': pimcore_relation('filterSnippet').getData(),
'searchParam': searchParam,
'noDate': noDate is defined ? noDate : (searchParam.getDateFrom() is null ) ,
'isSearch': true,
'isPackageSearch': true
}) }}
{{ include('@ElementsDemiFrontend/Includes/overlays/img-gallery.html.twig', {
'accommodation': accommodation,
'housePackageMaster': housePackageMaster,
'imagesTypes': imagesTypes
}) }}
{% if demi_core_configuration("getDisableEnquiry",[])!=true and accommodation.getAddress() is not empty and accommodation.getAddress().getEmail() is not empty %}
{{ include('@ElementsDemiFrontend/Includes/overlays/inquiry-overlay.html.twig', {
'accommodation': accommodation,
'housePackageMaster': housePackageMaster,
'searchParams': searchParam,
'user': user
}) }}
{% endif %}
{% if demi_core_configuration('getWarningOnMultipleAccoProducts',[]) %}
{{ include('@ElementsDemiFrontend/Includes/modals/warningOnMultipleAccoProductsModal.html.twig', {'cartUrl': step1Url}) }}
{% endif %}
{% endblock %}