Fix services not being listed in full
This commit is contained in:
@@ -67,7 +67,7 @@ class Date
|
|||||||
/**
|
/**
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
public $services = [];
|
public $servicesoptional = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array
|
* @var array
|
||||||
@@ -99,10 +99,13 @@ class Date
|
|||||||
$date->skipassincluded = $array['dateSkipassIncluded'];
|
$date->skipassincluded = $array['dateSkipassIncluded'];
|
||||||
$date->busincluded = $array['dateBusIncluded'];
|
$date->busincluded = $array['dateBusIncluded'];
|
||||||
$date->servicesincluded['service'] = unserialize($array['dateServicesIncluded']);
|
$date->servicesincluded['service'] = unserialize($array['dateServicesIncluded']);
|
||||||
|
$servicesGeneral = unserialize($array['dateServicesGeneral']);
|
||||||
foreach (unserialize($array['dateServicesGeneral']) as $row)
|
foreach ($servicesGeneral as $category)
|
||||||
{
|
{
|
||||||
$date->services['service'][] = Service::fromArray($row);
|
foreach ($category as $row)
|
||||||
|
{
|
||||||
|
$date->servicesoptional['service'][] = Service::fromArray($row);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (unserialize($array['pickups']) as $row)
|
foreach (unserialize($array['pickups']) as $row)
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class Room
|
|||||||
/**
|
/**
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
public $services;
|
public $servicesoptional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
@@ -73,9 +73,13 @@ class Room
|
|||||||
$room->nights = $array['roomNights'];
|
$room->nights = $array['roomNights'];
|
||||||
$room->available = $array['roomAvailable'];
|
$room->available = $array['roomAvailable'];
|
||||||
|
|
||||||
foreach (unserialize($array['roomOptionalServices']) as $row)
|
$servicesOptional = unserialize($array['roomOptionalServices']);
|
||||||
|
foreach ($servicesOptional as $category)
|
||||||
{
|
{
|
||||||
$room->services['service'][] = Service::fromArray($row);
|
foreach ($category as $row)
|
||||||
|
{
|
||||||
|
$room->servicesoptional['service'][] = Service::fromArray($row);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $room;
|
return $room;
|
||||||
|
|||||||
@@ -47,9 +47,8 @@ class Service
|
|||||||
{
|
{
|
||||||
$service = new self;
|
$service = new self;
|
||||||
|
|
||||||
$data = reset($array);
|
$service->label = $array['label'];
|
||||||
$service->label = $data['label'];
|
$service->price = $array['price'];
|
||||||
$service->price = $data['price'];
|
|
||||||
|
|
||||||
return $service;
|
return $service;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<f:render section="CollapsibleSimple" arguments="{id: 8, label: 'Verpflegung', description: productData.board}"/>
|
<f:render section="CollapsibleSimple" arguments="{id: 8, label: 'Verpflegung', description: productData.board}"/>
|
||||||
<f:render section="CollapsibleSimple" arguments="{id: 9, label: 'Programm', description: productData.programme}"/>
|
<f:render section="CollapsibleSimple" arguments="{id: 9, label: 'Programm', description: productData.programme}"/>
|
||||||
<f:for each="{productData.hotels.hotel}" as="hotel" iteration="iteration">
|
<f:for each="{productData.hotels.hotel}" as="hotel" iteration="iteration">
|
||||||
<f:render section="CollapsibleHotel" arguments="{id: '10-{iteration.cycle}', label: 'Unterkunft{f:if(condition: \'{productData.hotels.hotel -> f:count()} > 1\', then: \' {iteration.cycle}\')} (Termine, Zimmer, Leistungen, Bilder)', hotel: hotel}"/>
|
<f:render section="CollapsibleHotel" arguments="{id: '10-{iteration.cycle}', label: 'Unterkunft{f:if(condition: \'{productData.hotels.hotel -> f:count()} > 1\', then: \' {iteration.cycle}\')} (Termine, Zimmer, Leistungen, Anreise, Bilder)', hotel: hotel}"/>
|
||||||
</f:for>
|
</f:for>
|
||||||
<f:render section="CollapsibleImages" arguments="{id: 11, label: 'Allgemeine Bilder/Video', images: productData.images.image, video: productData.video}"/>
|
<f:render section="CollapsibleImages" arguments="{id: 11, label: 'Allgemeine Bilder/Video', images: productData.images.image, video: productData.video}"/>
|
||||||
</div>
|
</div>
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
<th>Zusatzleistungen</th>
|
<th>Zusatzleistungen</th>
|
||||||
<td>
|
<td>
|
||||||
<table class="table table-condesed">
|
<table class="table table-condesed">
|
||||||
<f:for each="{date.services.service}" as="service">
|
<f:for each="{date.servicesoptional.service}" as="service">
|
||||||
<tr>
|
<tr>
|
||||||
<td>{service.label}</td>
|
<td>{service.label}</td>
|
||||||
<td>{service.price} €</td>
|
<td>{service.price} €</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user