feat: toggle ski pass in teasers in favor of hardcoded string
closes #869bxcc9c
This commit is contained in:
@@ -148,7 +148,7 @@ class ContingentRepository extends AbstractRepository implements ProviderInterfa
|
||||
'c.additional_night_min_price as additionalNightPrice',
|
||||
'c.additional_night_min_nights as additionalNightMinNights', 'd.bus_pro_id as busProId',
|
||||
'd.services_included as servicesIncluded', 'd.services_general as servicesOptional',
|
||||
'd.skipass_included as skipassIncluded', 'd.season as season')
|
||||
'd.skipass_included as skiPassIncluded', 'd.season as season')
|
||||
->from('tx_epproducts_domain_model_contingent', 'c')
|
||||
->innerJoin('c', 'tx_epproducts_domain_model_date', 'd', 'c.date = d.date_start AND c.hotel_code = d.hotel_code')
|
||||
->where('c.hotel = :hotelUid')
|
||||
|
||||
@@ -26,8 +26,8 @@ class ProductRepository extends AbstractRepository
|
||||
'date.earlybird as earlybird', 'date.new as new', 'date.low_contingent as lowContingent',
|
||||
'date.board as board', 'date.product_fact as productFact', 'date.hotel_fact as hotelFact',
|
||||
'date.region_fact as regionFact', 'date.services_included as servicesIncluded',
|
||||
'date.min_price as minPrice', 'date.nights as nights', 'date.available as available',
|
||||
'date.pseudo_price as pseudoPrice'
|
||||
'date.skipass_included as skiPassIncluded', 'date.min_price as minPrice', 'date.nights as nights',
|
||||
'date.available as available', 'date.pseudo_price as pseudoPrice'
|
||||
)
|
||||
->from('tx_epproducts_domain_model_date', 'date')
|
||||
->where($qb->expr()->in(
|
||||
@@ -71,7 +71,7 @@ class ProductRepository extends AbstractRepository
|
||||
'date.earlybird as earlybird', 'date.new as new', 'date.low_contingent as lowContingent',
|
||||
'date.board as board', 'date.board_bus_pro_id as boardUid',
|
||||
'date.product_fact as productFact', 'date.hotel_fact as hotelFact', 'date.region_fact as regionFact',
|
||||
'date.services_included as servicesIncluded',
|
||||
'date.services_included as servicesIncluded', 'date.skipass_included as skiPassIncluded',
|
||||
'date.bus_available as busAvailable', 'date.new as new',
|
||||
'date.min_price as minPrice', 'date.nights as nights', 'date.available as available',
|
||||
'date.pseudo_price as pseudoPrice', 'date.hide_booking_button as hideBookingButton',
|
||||
@@ -134,7 +134,7 @@ class ProductRepository extends AbstractRepository
|
||||
'country_name as countryName', 'country_code as countryCode',
|
||||
'date_start as dateStart', 'date_end as dateEnd', 'uid as dateUid', 'min_price as minPrice',
|
||||
'pseudo_price as pseudoPrice', 'nights as nights', 'available as available', 'season as season',
|
||||
'skipass_included as skipassIncluded', 'bus_included as busIncluded',
|
||||
'skipass_included as skiPassIncluded', 'bus_included as busIncluded',
|
||||
'earlybird', 'new', 'daytrip', 'hide_booking_button as hideBookingButton',
|
||||
'low_contingent as lowContingent', 'concept as conceptUid', 'concept_code as conceptCode',
|
||||
'concept_name as conceptName', 'concept_popup_text as conceptPopupText', 'board', 'new'
|
||||
@@ -200,7 +200,7 @@ class ProductRepository extends AbstractRepository
|
||||
->select(
|
||||
'date.uid as dateUid', 'date.date_start as dateStart', 'date.date_end as dateEnd',
|
||||
'date.bus_pro_id as dateBusProId', 'date.hotel as hotelUid', 'date.hotel_bus_pro_id as hotelBusProId',
|
||||
'date.bus_included as dateBusIncluded', 'date.skipass_included as dateSkipassIncluded',
|
||||
'date.bus_included as dateBusIncluded', 'date.skipass_included as dateSkiPassIncluded',
|
||||
'date.season as season', 'date.product_detail_page as productDetailPage',
|
||||
'room.uid as roomUid', 'room.bus_pro_id as roomBusProId', 'room.name as roomName',
|
||||
'room.price as roomPrice', 'date.discount as roomDiscount', 'date.bus_price as busPrice',
|
||||
@@ -263,7 +263,7 @@ class ProductRepository extends AbstractRepository
|
||||
'date.season as season', 'date.min_price as dateMinPrice', 'date.pseudo_price as datePseudoPrice',
|
||||
'date.discount as dateDiscount', 'date.bus_price as busPrice', 'date.nights as dateNights',
|
||||
'date.bus_included as dateBusIncluded', 'date.services_included as dateServicesIncluded',
|
||||
'date.services_general as dateServicesGeneral', 'date.skipass_included as dateSkipassIncluded',
|
||||
'date.services_general as dateServicesGeneral', 'date.skipass_included as dateSkiPassIncluded',
|
||||
'date.bus_pro_id as dateBusProId', 'date.hotel_bus_pro_id as hotelBusProId',
|
||||
'date.available as available', 'date.product_detail_page as productDetailPage',
|
||||
)
|
||||
@@ -332,7 +332,7 @@ class ProductRepository extends AbstractRepository
|
||||
'date.min_price as dateMinPrice', 'date.discount as dateDiscount', 'date.bus_price as busPrice',
|
||||
'date.nights as dateNights', 'date.bus_included as dateBusIncluded', 'date.bus_price as busPrice',
|
||||
'date.services_included as dateServicesIncluded', 'date.services_general as dateServicesGeneral',
|
||||
'date.skipass_included as dateSkipassIncluded', 'date.bus_pro_id as dateBusProId',
|
||||
'date.skipass_included as dateSkiPassIncluded', 'date.bus_pro_id as dateBusProId',
|
||||
'date.discount as roomDiscount', 'date.hotel_bus_pro_id as hotelBusProId', 'date.pickups as pickups',
|
||||
'room.uid as roomUid', 'room.bus_pro_id as roomBusProId', 'room.code as roomCode',
|
||||
'room.name as roomName', 'room.price as roomPrice', 'room.pax as roomPax',
|
||||
|
||||
@@ -46,7 +46,7 @@ class Date
|
||||
$date['to'] = $array['dateEnd'];
|
||||
$date['minprice'] = $array['dateMinPrice'];
|
||||
$date['nights'] = $array['dateNights'];
|
||||
$date['skipassincluded'] = $array['dateSkipassIncluded'];
|
||||
$date['skipassincluded'] = $array['dateSkiPassIncluded'];
|
||||
$date['busincluded'] = $array['dateBusIncluded'];
|
||||
$date['servicesincluded']['service'] = unserialize($array['dateServicesIncluded']);
|
||||
$servicesGeneral = unserialize($array['dateServicesGeneral']);
|
||||
|
||||
@@ -229,7 +229,7 @@ class DateService implements SingletonInterface
|
||||
'season' => $row['season'],
|
||||
'summer' => $row['season'] === 's',
|
||||
'busIncluded' => (bool) $row['dateBusIncluded'],
|
||||
'skipassIncluded' => (bool) $row['dateSkipassIncluded'],
|
||||
'skiPassIncluded' => (bool) $row['dateSkiPassIncluded'],
|
||||
'roomUid' => $row['roomUid'],
|
||||
'roomName' => $row['roomName'],
|
||||
'available' => $row['roomAvailable'] && $row['roomPrice'],
|
||||
@@ -319,7 +319,7 @@ class DateService implements SingletonInterface
|
||||
'discount' => $row['dateDiscount'] ?? 0,
|
||||
'nights' => $row['dateNights'],
|
||||
'busIncluded' => (bool) $row['dateBusIncluded'],
|
||||
'skipassIncluded' => (bool) $row['dateSkipassIncluded'],
|
||||
'skiPassIncluded' => (bool) $row['dateSkiPassIncluded'],
|
||||
'servicesIncluded' => unserialize($row['dateServicesIncluded'], ['allowed_classes' => false]),
|
||||
'servicesGeneral' => unserialize($row['dateServicesGeneral'], ['allowed_classes' => false]),
|
||||
'season' => $row['season'],
|
||||
@@ -434,7 +434,7 @@ class DateService implements SingletonInterface
|
||||
public function hasIncludedServices(array $tableData): bool
|
||||
{
|
||||
foreach ($tableData as $row) {
|
||||
if ($row['busIncluded'] || $row['skipassIncluded']) {
|
||||
if ($row['busIncluded'] || $row['skiPassIncluded']) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,8 +131,8 @@ class ProductDataService implements SingletonInterface
|
||||
$teaser['dates'][] = $row['dateStart'];
|
||||
}
|
||||
|
||||
if (!$teaser['skipassIncluded'] && $row['skipassIncluded']) {
|
||||
$teaser['skipassIncluded'] = true;
|
||||
if (!$teaser['skiPassIncluded'] && $row['skiPassIncluded']) {
|
||||
$teaser['skiPassIncluded'] = true;
|
||||
}
|
||||
|
||||
if (!$teaser['busIncluded'] && $row['busIncluded']) {
|
||||
|
||||
@@ -158,6 +158,7 @@ class SearchResultService implements SingletonInterface
|
||||
'nights' => [],
|
||||
'rooms' => [],
|
||||
'new' => $row['new'],
|
||||
'skiPassIncluded' => $row['skiPassIncluded'],
|
||||
];
|
||||
$total++;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
{ep:icon(icon: 'bus', class: 'w-4 h-4 md:w-5 md:h-5')}
|
||||
</span>
|
||||
</f:if>
|
||||
<f:if condition="{row.skipassIncluded}">
|
||||
<f:if condition="{row.skiPassIncluded}">
|
||||
<span data-cooltipz-dir="top"
|
||||
aria-label="Skipass"
|
||||
role="tooltip">
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
</div>
|
||||
<f:render partial="Badge" arguments="{badge: product.badge}"/>
|
||||
</div>
|
||||
<f:if condition="{settings.showSkipassBadge} && {product.skipassIncluded}">
|
||||
<f:if condition="{settings.showSkipassBadge} && {product.skiPassIncluded}">
|
||||
<div class="herounit__badge-wrapper">
|
||||
<f:link.typolink parameter="{settings.skipassPageUid}"
|
||||
class="herounit__badge herounit__badge--skipass">
|
||||
|
||||
@@ -96,14 +96,14 @@
|
||||
ab <span class="product-teaser__price mx-1">{minPrice} €</span>
|
||||
</div>
|
||||
<div class="product-teaser__label-price">
|
||||
p. P.{f:if(condition: '{season} == "w"', then: ' / inkl. Skipass')}
|
||||
p. P.{f:if(condition: '{season} == "w" && {skiPassIncluded}', then: ' / inkl. Skipass')}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</f:section>
|
||||
|
||||
<f:section name="Including">
|
||||
<f:if condition="{season} == 'w'">
|
||||
<f:if condition="{season} == 'w' && {skiPassIncluded}">
|
||||
<li class="flex items-center space-x-1 py-1">
|
||||
{ep:icon(class: 'w-6 h-6 text-ep-primary-light', icon: 'check')}
|
||||
<span class="block flex-1 leading-none">Skipass</span>
|
||||
|
||||
@@ -91,7 +91,8 @@
|
||||
forceHotelUid: teaser.forceHotelUid,
|
||||
dateFrom: teaser.minDateStart,
|
||||
dateTo: teaser.maxDateEnd,
|
||||
index: iteration.index
|
||||
index: iteration.index,
|
||||
skiPassIncluded: teaser.skiPassIncluded
|
||||
}"/>
|
||||
</f:for>
|
||||
</div>
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
forceHotelUid: 1,
|
||||
showHotelDetails: 1,
|
||||
new: item.new,
|
||||
skiPassIncluded: item.skiPassIncluded,
|
||||
referringPageUri: referringPageUri
|
||||
}"/>
|
||||
</f:for>
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
<span class="block"></span>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:if condition="{row.skipassIncluded}">
|
||||
<f:if condition="{row.skiPassIncluded}">
|
||||
<f:then>
|
||||
<span class="block p-1"
|
||||
data-cooltipz-dir="top"
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@
|
||||
ab {row.priceForSelection} €
|
||||
</td>
|
||||
<td class="border-r border-zinc-200 px-2 py-1 md:p-2">
|
||||
<f:if condition="{row.skipassIncluded}">
|
||||
<f:if condition="{row.skiPassIncluded}">
|
||||
<span data-cooltipz-dir="top"
|
||||
aria-label="{f:if(condition: row.summer, then: 'Bergbahnticket inklusive', else: 'Skipass inklusive')}"
|
||||
role="tooltip">
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
<span class="block"></span>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:if condition="{row.skipassIncluded}">
|
||||
<f:if condition="{row.skiPassIncluded}">
|
||||
<f:then>
|
||||
<span class="block p-1"
|
||||
data-cooltipz-dir="top"
|
||||
|
||||
@@ -61,7 +61,8 @@
|
||||
forceHotelUid: teaser.forceHotelUid,
|
||||
dateFrom: dateFrom,
|
||||
dateTo: dateTo,
|
||||
index: iteration.index
|
||||
index: iteration.index,
|
||||
skiPassIncluded: teaser.skiPassIncluded
|
||||
}"/>
|
||||
</f:for>
|
||||
</div>
|
||||
|
||||
@@ -72,7 +72,8 @@
|
||||
dateFrom: dateFrom,
|
||||
dateTo: dateTo,
|
||||
index: iteration.index,
|
||||
globalConceptCode: settings.globalConceptCode
|
||||
globalConceptCode: settings.globalConceptCode,
|
||||
skiPassIncluded: teaser.skiPassIncluded
|
||||
}"/>
|
||||
</f:for>
|
||||
</div>
|
||||
|
||||
+1
@@ -24,6 +24,7 @@
|
||||
dateFrom: dateFrom,
|
||||
dateTo: dateTo,
|
||||
new: teaser.new,
|
||||
skiPassIncluded: teaser.skiPassIncluded,
|
||||
landscape: '{f:if(condition: \'{data.layout} == 2 || {data.layout} == 3\', then: 1, else: 0)}'
|
||||
}"/>
|
||||
</f:if>
|
||||
|
||||
@@ -53,7 +53,8 @@
|
||||
dateTo: dateTo,
|
||||
new: teaser.new,
|
||||
index: iteration.index,
|
||||
globalConceptCode: settings.globalConceptCode
|
||||
globalConceptCode: settings.globalConceptCode,
|
||||
skiPassIncluded: teaser.skiPassIncluded
|
||||
}"/>
|
||||
</f:for>
|
||||
</div>
|
||||
|
||||
@@ -131,11 +131,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Bus inkl.</th>
|
||||
<td>{f:if(condition: date.busincluded, then: 'ja', else: 'nein')}</td>
|
||||
<td>{f:if(condition: date.busIncluded, then: 'ja', else: 'nein')}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Skipass inkl.</th>
|
||||
<td>{f:if(condition: date.skipassincluded, then: 'ja', else: 'nein')}</td>
|
||||
<td>{f:if(condition: date.skiPassIncluded, then: 'ja', else: 'nein')}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Zimmer</th>
|
||||
|
||||
Reference in New Issue
Block a user