Show inquiry form button only for selected concepts
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -50,6 +50,8 @@ plugin.tx_epproducts {
|
||||
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=epproducts/100/100; type=string; label=Default storage PID
|
||||
|
||||
@@ -49,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 {
|
||||
|
||||
@@ -15,12 +15,14 @@
|
||||
</f:else>
|
||||
</f:if>
|
||||
{hotel.description -> f:format.html()}
|
||||
<f:if condition="{hotel.groupsPriceConfigs}">
|
||||
<f:else>
|
||||
<f:link.typolink class="button bg-button" parameter="{settings.groupsContactFormPageUid}" additionalParams="&ref={currentPageUid}">
|
||||
<f:translate key="tx_eptheme.label.to_inquiry_form" extensionName="ep_theme"/>
|
||||
</f:link.typolink>
|
||||
</f:else>
|
||||
<f:if condition="{showInquiryForm}">
|
||||
<f:if condition="{hotel.groupsPriceConfigs}">
|
||||
<f:else>
|
||||
<f:link.typolink class="button bg-button" parameter="{settings.groupsContactFormPageUid}" additionalParams="&ref={currentPageUid}">
|
||||
<f:translate key="tx_eptheme.label.to_inquiry_form" extensionName="ep_theme"/>
|
||||
</f:link.typolink>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:if>
|
||||
</div>
|
||||
<f:if condition="{teasers}">
|
||||
|
||||
@@ -170,10 +170,11 @@
|
||||
</f:section>
|
||||
|
||||
<f:section name="Hotel">
|
||||
|
||||
<div class="mb-4{f:if(condition: settings.hotelOnTop, else: ' hidden')}"
|
||||
data-tabs-target="tab"
|
||||
data-tab="hotel">
|
||||
<f:render partial="Hotel/Details" arguments="{hotel: hotel, bars: 1, showNonBookableHint: 0, currentPageUid: currentPageUid}"/>
|
||||
<f:render partial="Hotel/Details" arguments="{hotel: hotel, bars: 1, showNonBookableHint: 0, currentPageUid: currentPageUid, showInquiryForm: isProductWithGroupInquiryForm}"/>
|
||||
</div>
|
||||
</f:section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user