ssSudan Nil Frontend + extra Days + price in booking form - export + mail

git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3483 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
adametz 2019-01-03 11:28:54 +00:00
parent b28c7db598
commit 98bd71c760
22 changed files with 2186 additions and 32 deletions

View file

@ -3,7 +3,9 @@
{% for summary_entry in summary %}
<tr>
<td class="st-position-price-col" style="min-width: 120px;">
{% if(summary_entry.value != "!") %}
{{ summary_entry.value|number_format(2) }}
{% endif %}
</td>
<td class="st-position-name-col">
{{ summary_entry.label|raw }}

View file

@ -8,12 +8,6 @@
<li>
<a href="/kontakt" title="Kontakt"><i class="fa fa-envelope"></i> <span class="hidden-xs">Kontakt</span></a>
</li>
<li>
<a href="javascript:void(window.open('/server/chat.php','','width=590,height=610,left=0,top=0,resizable=yes,menubar=no,location=no,status=yes,scrollbars=yes'))"
title="Chat-Fenster öffnen">
<i class="fa fa-comments"></i> <span class="hidden-xs">Chat</span>
</a>
</li>
<li>
<a href="/ueber-uns" title="Über uns">
<i class="fa fa-users"></i> <span class="hidden-xs">Über uns</span>

View file

@ -10,7 +10,11 @@ Abfahrts-/Abflugort: {{ booking_request.departure.name }}
------------------------------------------------------------
{% for summary_entry in summary %}
{% if(summary_entry.value != "!") %}
{{ summary_entry.value|number_format(2) }} € : {{ summary_entry.label|striptags }}
{% else %}
{{ summary_entry.label|striptags }}
{% endif %}
{% endfor %}
------------------------------------------------------------

View file

@ -54,10 +54,6 @@
{% endif %}
{% endspaceless %}
{{ form_errors(form.email) }}
<div id="message"></div>
@ -94,12 +90,26 @@
{# TODO folgendes evtl noch weiter verallgemeinern #}
{% set priceTypeIds = [] %}
{% set priceTypeChildIds = [] %}
{% set extraDays = 0 %}
{% for price in travel_date.prices %}
{% if(price.available == "1") %}
{% set priceTypeIds = priceTypeIds|merge([price.priceTypeId]) %}
{% if(price.priceChildren > 0) %}
{% set priceTypeChildIds = priceTypeChildIds|merge([price.priceTypeId]) %}
{% endif %}
{% if(price.extraPrice > 0) %}
{% set extraDays = 1 %}
{% endif %}
{% if(price.extraPriceComfort > 0) %}
{% set extraDays = 1 %}
{% endif %}
{% if(price.extraPriceChildren > 0) %}
{% set extraDays = 1 %}
{% endif %}
{% endif %}
{% endfor %}
@ -115,6 +125,7 @@
</td>
</tr>
{% if "1" in priceTypeChildIds %}
<tr>
{% else %}
@ -215,7 +226,28 @@
{% endif %}
</td>
</tr>
<tr style="display:">
{% if extraDays == 1 and travel_program.drafts.count() > 0 %}
<tr>
{% else %}
<tr style="display:none">
{% endif %}
<td>Verlängerung buchen</td>
<td>
Vor der Reise
{{ form_widget(form.extraBookingDaysBefore) }}
{{ form_errors(form.extraBookingDaysBefore) }}
<br>
Nach der Reise
{{ form_widget(form.extraBookingDaysAfter) }}
{{ form_errors(form.extraBookingDaysAfter) }}
</td>
</tr>
<tr style="">
<td>Reiseversicherung</td>
<td>
<div class="radio">

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,90 @@
{% extends get_base_template() %}
{% block body %}
<h1>{{ page.pagetitle|default(page.title) }}</h1>
<section class="clearfix">
{#{% for i in 0..page.children|length//3 %}#}
<div class="row">
{% for child_page in page.children if child_page.slug == "nilschiff-ss-sudan" %}
<div class="col-md-12 col-sm-12">
<div class="travel-wrapper get-box-link">
<div class="item text-left">
<div class="item-img" style="height: 220px;">
<div class="lb">
{% if child_page.boxStar is not empty %}
<div class="cstar_left">{{ child_page.boxStar|raw }}</div>
{% endif %}
{% if child_page.travelProgram is not empty and child_page.travelProgram.lowestPrice > 0 %}
<div class="cprice">ab {{ child_page.travelProgram.lowestPrice|number_format }} € p.P.</div>
{% endif %}
{% if child_page.boxDiscount is not empty %}
<div class="cdiscount">{{ child_page.boxDiscount|raw }}</div>
{% endif %}
{% if child_page.model == 'feedback'%}
<div class="cdiscount">{{ child_page.date|date }}</div>
{% endif %}
</div>
{% if child_page.boxImageUrl is not empty %}
{% set image_url = child_page.boxImageUrl %}
{% set image_alt = child_page.travelProgram.title|default(page.title) %}
{% else %}
{% set image_url = asset('/bundles/app/images/no-picture.png')%}
{% set image_alt = 'Kein Vorschaubild vorhanden' %}
{% endif %}
<div class="img-background lozad" data-background-image="{{ image(image_url|trim('/')).cropResize(960).guess(90) }}" style="background-image:url({{ asset('images/placeholder-image.png') }}); height: 220px;"></div>
<noscript>
<div class="img-background" style="background-image:url({{ image(image_url|trim('/')).cropResize(960).guess(90) }})"></div>
</noscript>
</div>
<div class="box_mid">
<div class="hl5">{{ child_page.title }}</div>
<p>{{ child_page.boxBody ?? child_page.description }}</p>
</div>
<a class="item-button is-box-link dobble_line" href="{{ child_page.urlPath }}" title="{{ child_page.title }}">
<span>{{ child_page.title }}</span>
</a>
</div>
</div>
</div>
{% endfor %}
</div>
</section>
<section class="clearfix content-pane">
<h2 class="h3 h3l">Unsere beliebtesten Kulturreisen</h2>
{#{% for i in 0..page.children|length//3 %}#}
<div class="row">
{% for child_page in child_pages if child_page.status == 1 and child_page.travelProgram is not empty %}
{% include 'default/components/pageBox.html.twig' %}
{% endfor %}
</div>
{% if mediated_child_pages is not empty %}
<h2 class="h3 h3l">
Vermittelte Rundreisen vom {{ page.country is not empty ? (page.country.name ~ '-') }}Spezialisten
STERN TOURS aus Berlin
</h2>
<div class="row">
{% for child_page in mediated_child_pages %}
{% include 'default/components/pageBox.html.twig' %}
{% endfor %}
</div>
{% endif %}
</section>
<section class="clearfix">
<hr class="primary">
{{ page.content|raw|keywords|lozad }}
</section>
{% endblock %}

View file

@ -39,8 +39,6 @@
{% endfor %}
</div>
{% endif %}

View file

@ -0,0 +1,169 @@
{% extends get_base_template() %}
{% block body %}
<section class="clearfix">
{{ page.content|raw|keywords|lozad }}
</section>
<section class="clearfix content-pane">
<h2 class="h3 h3l" style="padding-top:0px;margin-top:0;">Programm Nilkreuzfahrt SS Sudan</h2>
<div class="row">
{% for child_page in box_childs if child_page.status == 1 and child_page.travelProgram is not empty %}
{# @var child_page \AppBundle\Entity\Page #}
<div class="col-md-6 col-sm-6">
<div class="travel-wrapper get-box-link">
<div class="item text-left">
<div class="item-img">
<div class="lb">
{% if child_page.boxStar is not empty %}
<div class="cstar_left">{{ child_page.boxStar|raw }}</div>
{% endif %}
{% if child_page.travelProgram is not empty and child_page.travelProgram.lowestPrice > 0 %}
<div class="cprice">ab {{ child_page.travelProgram.lowestPrice|number_format }}
€ p.P.
</div>
{% endif %}
{% if child_page.boxDiscount is not empty %}
<div class="cdiscount">{{ child_page.boxDiscount|raw }}</div>
{% endif %}
{% if child_page.model == 'feedback' %}
<div class="cdiscount">{{ child_page.date|date }}</div>
{% endif %}
</div>
{% include 'default/components/pageBoxImage.html.twig' with {page: child_page} %}
</div>
<div class="box_mid">
<div class="hl5">{{ child_page.title }}</div>
<p>{{ child_page.boxBody ?? child_page.description }}</p>
</div>
<a class="item-button is-box-link dobble_line" href="{{ child_page.urlPath }}"
title="{{ child_page.title }}">
<span>{{ child_page.title }}</span>
</a>
</div>
</div>
</div>
{% endfor %}
</div>
</section>
{% include 'default/pages/cms/components/ssSudan.html.twig' %}
<div class="content-pane">
{{ page.contentNew|raw|keywords|lozad }}
<h1>Die SS Sudan</h1>
<p class="ft">
Der sehr elegante Restaurantsaal besteht ebenfalls aus Mobiliar des 19. Jahrhunderts und ist mit
Originalparkettboden ausgestattet. Lassen Sie sich im Restaurant von einer sehr abwechslungsreichen und
raffinierten Kochkunst verwöhnen. Einen Panoramablick bietet Ihnen die Lounge/Bar. Eine große Terrasse auf
dem Oberdeck, mit Liegestühlen und Sesseln bietet Ihnen die Möglichkeit, während die wunderbare Landschaft
an Ihnen vorbeizieht, den Tag Tag sein zu lassen und sich ausgiebig zu erholen.
</p>
<p class="ft"><strong>Hier finden Sie Links zu Informationen zum Preis der SS Sudan, zum Reiseveranstalter STERN
TOURS und zu den letzten Kundenfeedbacks mit der Fahrt auf der SS Sudan:</strong></p>
<ul class="">
<li>Zu <a href="/aegypten_reisen_catalog/ss-sudan-3-naechte-preise.html"
title="Preise 3 Nächte Schiff Sudan">Preise 3 N&auml;chte SS Sudan</a></li>
<li>Zu <a href="/aegypten_reisen_catalog/ss-sudan-4-naechte-preise.html"
title="Preise Nilschiff Sudan 4 Nächte">Preise 4 N&auml;chte SS Sudan</a><br/></li>
<li>Zum <a href="/aegypten_reisen_catalog/ss-sudan-programm-3-nights.html"
title="Besichtigunsprogramm 3 Nächte SS Sudan">Besichtigunsprogramm 3 N&auml;chte SS
Sudan</a><br/></li>
<li>Zum <a href="/aegypten_reisen_catalog/ss-sudan-programm-4-nights.html"
title="Besichtigungsprogramm 4 Nächte Sudan">Besichtigunsprogramm 4 N&auml;chte SS Sudan</a>
<br/></li>
<li>Zum <a href="/aegypten_reisen_catalog/ss-sudan-nilkreuzfahrt.html" title="Nilkreuzfahrt SS Sudan">14 t&auml;gigen
Beispielprogramm SS Sudan - Nilkreuzfahrt mit Kairo und Baden</a><br/></li>
<li>Zum <a href="/docs/169/aegypten-reise-felbinger.html" title="Kundenfeedbakcs">Kundenfeedback - SS Sudan
- Familie Felbinger</a><br/></li>
<li>Zum <a href="/docs/169/aegypten-ss-sudan-old-mena-house.html" title="Kundenfeedbakcs">Kundenfeedback -
SS Sudan - Familie Kreuser</a> <br/></li>
<li>Informationen zu <a href="/aegypten_reisen_catalog/info-aegypten-spezialist.html"
title="Kontakt Ägyptenreisen">STERN TOURS</a><br/></li>
<li>Zu unseren <a href="/aegypten_reisen_catalog/offene-worte.html" title="offenen Worten">Offenen
Worten</a></li>
</ul>
<h2>Das Dampfschiff Sudan & Verantwortungsvoller Tourismus</h2>
<p class="ft">
Das Dampfschiff Sudan wurde in Bezug auf die Umwelt und den Tourismus deutlich verändert. Zunächst wurde der
Verbrauch von Energie gesenkt. Durch die Verbesserung der Triebwerke, durch minimierte Belastung des
Schiffes und durch die Installation von Solarenergie für Wärme, Sanitärwasser, und die Schaufelräder ist es
gelungen, den Kraftstoffverbrauch um 30% zu verringern und damit auch Treibhausgasemissionen. Der Konsum von
CO2 wurde auf eine halbe Tonne pro Passagier pro Fahrt reduziert, was der hohen Achtsamkeit anzurechnen ist.
</p>
<p class="ft">
Das Wasser, welches für die Duschen verwendet wird, stammt vom Nil und wird durch mehrere Filter geführt,
die jeden Monat streng kontrolliert werden. Der erste Filter entfernt den Sand, der zweite Filter bereitet
das Wasser durch eine Kohlenzusammensetzung auf und der Letzte filtert Bakterien durch ultraviolettes Licht
aus.
</p>
<p class="ft">
Tägliche strikte Maßnahmen stellen eine umweltverträgliche und nachhaltige Entwicklung sicher. Das Schiff
nutzt ausschließlich Energiesparlampen und biologisch abbaubares, ökofreundliches Waschmittel (made in
Egypt). Es werden so viele biologische Produkte wie möglich genutzt (mit Ausnahme der antibakteriellen Bade
Waschprodukte, die auf Bleichmittel basieren) und das Papier wird wiederverwendet.
</p>
<p class="ft">
Die Kosmetikprodukte in den Badezimmern sind alle natürlich und basieren auf Olivenöl, welches aus Ägypten
kommt. Um den Verbrauch von Verpackungen zu beschränken, sind alle Produkte in Behälter gefüllt.
</p>
<p class="ft">
Die gesamte Ausstattung auf dem Dampfschiff Sudan ist von ägyptischen Tischlern und Schreinern angefertigt
worden.
</p>
<p class="ft">
Mineralwasser an Bord ist frei.
</p>
<p class="ft">
Seit dem Altertum bezaubert Ägypten jeden, der mit diesem Land in Berührung kommt. Dem Mythos und dieser
Magie der vergangenen Zivilisation dieses atemberaubenden Landes ist bisher jeder erlegen. Die Reise nach
Ägypten wurde mit der Zeit, sei es in kulturellen oder in Kunstkreisen, zu einem absoluten Muss. Mit dem 20.
Jahrhundert wurde Ägypten unausweichlich zu einem Ziel der modernen Reisekultur. Der Nil, der sowohl weite
Teile des Landes bewässert und nährt, als auch als Handels- und Verbindungsroute zwischen Europa und Afrika
dient, ist ohne Zweifel die Lebensader Ägyptens. Den Nil zu bereisen, bedeutet die Geschichte und die
Entwicklung Ägyptens zu verstehen. So trifft man auf den Gewässern des Nils, nebst den traditionellen
Feluken (Küstenfahrzeugen), auch zahlreiche Boote voller interessierter Besucher.
</p>
<p class="ft">
Eine Kreuzfahrt auf dem Nil ist auf den unterschiedlichsten Schiffen zu erkunden. Jedoch haben wir uns
speziell für die SS Sudan entschieden. Die Nillandschaft, auf einem unverwechselbarem antiken
Kreuzfahrtschiff, erbaut 1885, wie zu Zeiten der Könige, zu erkunden, ist und bleibt einzigartig. Es ist die
SS Sudan, auf der Agatha Christie ihre bekannte Romanfigur „Hercule Poirot“ weiterentwickelt hat. Es ist
ebenfalls die SS Sudan, auf der Agatha Christies berühmter Kriminalroman „Tod auf dem Nil“ gedreht wurde.
</p>
<h2>Video zum Rundgang auf dem Nilschiff SS Sudan</h2>
<div class="video-wrap">
<div class="g-absolute-centered">
<a data-type="youtube" data-src="https://www.youtube-nocookie.com/embed/hnjHNzdPJmc"
href="javascript:;">
<div class="u-icon-v3"> Video ansehen <i class="fa fa-play"></i></div>
</a>
</div>
<img src="/images/placeholder-image.png" data-src="https://img.youtube.com/vi/hnjHNzdPJmc/sddefault.jpg"
class="img-responsive lozad" alt="">
</div>
</div>
{% endblock %}

View file

@ -0,0 +1,16 @@
{% extends get_base_template() %}
{% block body %}
{% include 'default/pages/cms/components/ssSudan.html.twig' %}
<div class="content-pane">
<section class="clearfix">
{{ page.content|raw|keywords|lozad }}
</section>
</div>
{% endblock %}

View file

@ -79,6 +79,8 @@ swiftmailer:
host: "%mailer_host%"
username: "%mailer_user%"
password: "%mailer_password%"
port: "%mailer_port%"
auth_mode: "%mailer_auth_mode%"
spool: { type: memory }
assetic:

View file

@ -202,6 +202,7 @@ class BookingController extends Controller
)
);
$this->get('mailer')->send(\Swift_Message::newInstance()
->setSubject('BUCHUNG: '. $travelProgram->getTitle() .'('. $travelDate->getName() .')')
->setFrom('stern@stern-tours.de', 'STERN TOURS')
@ -332,6 +333,9 @@ class BookingController extends Controller
$outPriceInfo['final_payment_date'] = $travelDate->getFinalPaymentDate();
$outPriceInfo['final_payment_date_str'] = $travelDate->getFinalPaymentDateStr();
$outPriceInfo['discount'] = [];
$outPriceInfo['booking_before'] = [];
$outPriceInfo['booking_after'] = [];
}
$tempDepartureHTML = array();
@ -419,6 +423,7 @@ class BookingController extends Controller
//Komfort
$possibleRooms = $this->getRooms($travelDate->getPrices(), $persons);
$tempComfortHTML = array();
if ($bookingRequest->getComfort())
{
foreach ($possibleRooms as $room)
@ -474,10 +479,12 @@ class BookingController extends Controller
$roomPrice = ($singleFullPrice * $adultCount) + ($childPrice * $room['persons']['children']);
$singleDiscountPrice = $room['price']->getEffectiveDiscountPrice();
$singleChildDiscountPrice = $room['price']->getEffectiveChildDiscountPrice();
$discount = ($singleDiscountPrice === null) ? 0 : ($adultCount * ($singleDiscountPrice - $singleFullPrice));
$childDiscount = ($singleChildDiscountPrice === null) ? 0 : ($childrenCount * ($singleChildDiscountPrice - $childPrice));
$ret += $roomPrice + $discount + $childDiscount;
$singel_flight_price = $travelDate->getFlightCalcPrice();
@ -518,6 +525,7 @@ class BookingController extends Controller
'price_child' => Util::formatPrice($room['price']->getEffectiveChildPrice()),
);
}
//DISCOUNT
if ($singleDiscountPrice !== null)
{
@ -667,9 +675,126 @@ class BookingController extends Controller
}
}
$tempExtraDaysBeforeHTML = array();
$newExtraDaysTravelDate = [
'change' => 0,
'start' => $travelDate->getStart()->format('d.m.Y'),
'end' => $travelDate->getEnd()->format('d.m.Y'),
];
//days before
if($bookingRequest->getExtraBookingDaysBefore()){
$newDay = clone $travelDate->getStart();
$newDay->modify('-'.$bookingRequest->getExtraBookingDaysBefore().' day');
$newExtraDaysTravelDate['change'] = 1;
$newExtraDaysTravelDate['start'] = $newDay->format('d.m.Y');
foreach ($possibleRooms as $room) {
$key = $room['priceType']->getId();
$adultCount = $room['persons']['adults'];
$childrenCount = $room['persons']['children'];
if ($bookingRequest->getComfort()){
$singleExtraFullPrice = $room['price']->getEffectiveExtraComfortPrice();
}else{
$singleExtraFullPrice = $room['price']->getEffectiveExtraPrice();
}
$childExtraPrice = $room['price']->getEffectiveExtraChildPrice();
$roomPrice = (($singleExtraFullPrice * $adultCount) + ($childExtraPrice * $childrenCount)) * $bookingRequest->getExtraBookingDaysBefore();
$ret += $roomPrice;
$outPriceInfo['booking_before'][] = [
'name' => "Verlängerung vor der Reise " . $room['priceType']->getName() . "",
'adults' => $adultCount,
'children' => $childrenCount,
'price' => $singleExtraFullPrice,
'price_children' => $childExtraPrice,
'price_total' => $roomPrice,
'days' => $bookingRequest->getExtraBookingDaysBefore()
];
if (!empty($tempExtraDaysBeforeHTML[$key])) {
$tempExtraDaysBeforeHTML[$key]['count'] = $tempExtraDaysBeforeHTML[$key]['count'] + 1;
$tempExtraDaysBeforeHTML[$key]['value'] = $tempExtraDaysBeforeHTML[$key]['value'] + $roomPrice;
} else {
$tempExtraDaysBeforeHTML[$key] = array(
'value' => $roomPrice,
'label_first' => "Verlängerung vor der Reise " . $room['priceType']->getName() . "",
'label_last' => Util::formatPrice($singleExtraFullPrice) . ' pro Person/Tag',
'count' => 1,
'days' => $bookingRequest->getExtraBookingDaysBefore(),
'childCount' => $room['persons']['children'],
'price_child' => Util::formatPrice($room['price']->getEffectiveExtraChildPrice()),
);
}
}
}
$tempExtraDaysAfterHTML = array();
//days before
if($bookingRequest->getExtraBookingDaysAfter()){
$newDay = clone $travelDate->getEnd();
$newDay->modify('+'.$bookingRequest->getExtraBookingDaysAfter().' day');
$newExtraDaysTravelDate['change'] = 1;
$newExtraDaysTravelDate['end'] = $newDay->format('d.m.Y');
foreach ($possibleRooms as $room) {
$key = $room['priceType']->getId();
$adultCount = $room['persons']['adults'];
$childrenCount = $room['persons']['children'];
if ($bookingRequest->getComfort()){
$singleExtraFullPrice = $room['price']->getEffectiveExtraComfortPrice();
}else{
$singleExtraFullPrice = $room['price']->getEffectiveExtraPrice();
}
$childExtraPrice = $room['price']->getEffectiveExtraChildPrice();
$roomPrice = (($singleExtraFullPrice * $adultCount) + ($childExtraPrice * $childrenCount)) * $bookingRequest->getExtraBookingDaysAfter();
$ret += $roomPrice;
$outPriceInfo['booking_after'][] = [
'name' => "Verlängerung nach der Reise " . $room['priceType']->getName() . "",
'adults' => $adultCount,
'children' => $childrenCount,
'price' => $singleExtraFullPrice,
'price_children' => $childExtraPrice,
'price_total' => $roomPrice,
'days' => $bookingRequest->getExtraBookingDaysAfter()
];
if (!empty($tempExtraDaysAfterHTML[$key])) {
$tempExtraDaysAfterHTML[$key]['count'] = $tempExtraDaysAfterHTML[$key]['count'] + 1;
$tempExtraDaysAfterHTML[$key]['value'] = $tempExtraDaysAfterHTML[$key]['value'] + $roomPrice;
} else {
$tempExtraDaysAfterHTML[$key] = array(
'value' => $roomPrice,
'label_first' => "Verlängerung nach der Reise " . $room['priceType']->getName() . "",
'label_last' => Util::formatPrice($singleExtraFullPrice) . ' pro Person/Tag',
'count' => 1,
'days' => $bookingRequest->getExtraBookingDaysAfter(),
'childCount' => $room['persons']['children'],
'price_child' => Util::formatPrice($room['price']->getEffectiveExtraChildPrice()),
);
}
}
}
//ROOMS
if(count($tempRoomHTML) > 0){
foreach ($tempRoomHTML as $item) {
@ -728,6 +853,36 @@ class BookingController extends Controller
}
}
//extra days before
if(count($tempExtraDaysBeforeHTML) > 0){
foreach ($tempExtraDaysBeforeHTML as $item) {
$setDays = $item['days'] . ($item['days'] == 1 ? ' Tag' : ' Tage');
$label = '<strong>'.$item['count'].'</strong> x '.$setDays.' '.$item['label_first'].'<strong> ['.$item['label_last'].']</strong>';
if($item['childCount'] > 0){
$label .= ' <strong>[+ Kind: '.$item['price_child'].']</strong>';
}
$outHtmlSummary[] =[
'value' => $item['value'],
'label' => $label,
];
}
}
//extra days after
if(count($tempExtraDaysAfterHTML) > 0){
foreach ($tempExtraDaysAfterHTML as $item) {
$setDays = $item['days'] . ($item['days'] == 1 ? ' Tag' : ' Tage');
$label = '<strong>'.$item['count'].'</strong> x '.$setDays.' '.$item['label_first'].'<strong> ['.$item['label_last'].']</strong>';
if($item['childCount'] > 0){
$label .= ' <strong>[+ Kind: '.$item['price_child'].']</strong>';
}
$outHtmlSummary[] =[
'value' => $item['value'],
'label' => $label,
];
}
}
//Versicherungen
if(count($tempInsuranceHTML) > 0 ){
@ -746,6 +901,13 @@ class BookingController extends Controller
{
$outHtmlSummary = array_merge($outHtmlSummary, $insuranceHtmlSummary);
}
if($newExtraDaysTravelDate['change'] == 1){
$outHtmlSummary[] = [
'value' => '!',
'label' => "Geänderter Reisezeitraum: ".$newExtraDaysTravelDate['start']." - ".$newExtraDaysTravelDate['end'],
];
}
if (isset($outPriceInfo))
{
$outPriceInfo['total'] = $ret;

View file

@ -48,6 +48,119 @@ class CmsController extends Controller
]);
}
public function ssSudanTourAction(Page $page, $template = 'default')
{
$slugs = array(
'nilschiff-ss-sudan' => [0, 1],
'bruecke-nilschiff-ss-sudan' => [31, 1],
'sonnendeck-nilschiff-ss-sudan' => [32, 1],
'agatha-christie-suite-nilschiff-ss-sudan' => [1, 2],
'lady-duff-gordon-suite-nilschiff-ss-sudan' => [2, 2],
'hercule-poirot-kabine-nilschiff-ss-sudan' => [3, 2],
'gustave-flaubert-kabine-nilschiff-ss-sudan' => [4, 2],
'herodote-kabine-nilschiff-ss-sudan' => [5, 2],
'vivant-denon-kabine-nilschiff-ss-sudan' => [6, 2],
'yacoubian-kabine-nilschiff-ss-sudan' => [7, 2],
'le-roi-farouk-kabine-nilschiff-ss-sudan' => [8, 2],
'mariette-auguste-pacha-kabine-nilschiff-ss-sudan' => [9, 2],
'gerard-de-nerval-kabine-nilschiff-ss-sudan' => [10, 2],
'ferdinand-de-lesseps-kabine-nilschiff-ss-sudan' => [11, 2],
'david-roberts-kabine-nilschiff-ss-sudan' => [12, 2],
'alexandre-le-grand-kabine-nilschiff-ss-sudan' => [14, 2],
'john-mason-cook-kabine-nilschiff-ss-sudan' => [15, 2],
'howard-carter-kabine-nilschiff-ss-sudan' => [16, 2],
'le-venitien-inconnu-kabine-nilschiff-ss-sudan' => [17, 2],
'suite-18-nilschiff-ss-sudan' => [18, 2],
'reine-victoria-suite-nilschiff-ss-sudan' => [19, 3],
'oum-kalsoum-suite-nilschiff-ss-sudan' => [20, 3],
'naguib-mahfouz-kabine-nilschiff-ss-sudan' => [21, 3],
'geoffroy-st-hilaire-kabine-nilschiff-ss-sudan' => [22, 3],
'jean-francois-champollion-kabine-nilschiff-ss-sudan' => [23, 3],
'samuel-shepheard-kabine-nilschiff-ss-sudan' => [24, 3],
'bar-nilschiff-ss-sudan' => [33, 3],
'restaurant-nilschiff-ss-sudan' => [34, 3],
'maschinenraum-nilschiff-ss-sudan' => [35, 4],
'kueche-ss-sudan' => [36, 4],
);
$tour_id = 0;
$tour_tap = 1;
if(isset($slugs[$page->getSlug()])){
$tour_id = $slugs[$page->getSlug()][0];
$tour_tap = $slugs[$page->getSlug()][1];
}
return $this->render('default/pages/cms/'. $page->getTemplate() .'.html.twig', [
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
'page' => $page,
'tour_id' => $tour_id,
'tour_tap' => $tour_tap,
]);
}
public function ssSudanAction(Page $page, $template = 'default')
{
$repo = $this->getEntityManager()->getRepository('AppBundle:Page');
$box_childs = $repo->findParentsWithShowNav(437);
return $this->render('default/pages/cms/'. $page->getTemplate() .'.html.twig', [
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
'page' => $page,
'box_childs' => $box_childs,
'tour_id' => 0,
'tour_tap' => 1,
]);
}
public function nilecruiseAction(Page $page, $template = 'nilecruise')
{
//read stern 1 + 6
//read vermittelte
$repo = $this->getEntityManager()->getRepository('AppBundle:Page');
$slug_page = $repo->findOneBy(['slug' => 'aegypten-rundreisen']);
$childPages = $this->getEntityManager()->getRepository('AppBundle:Page')->getChildrenWithTravelProgramsAndDates($slug_page);
$nonMediated = [];
$mediated = [];
foreach ($childPages as $childPage)
{
if ($childPage->getStatus() == 1 && $childPage->getTravelProgram() &&
$childPage->getTravelProgram()->getIsMediated())
{
$mediated[] = $childPage;
}
else
{
if(in_array($childPage->getSlug(), ['stern1', 'stern2', 'stern3', 'stern4', 'stern5', 'stern6'])){
$nonMediated[] = $childPage;
}
}
}
// We only need a separation if there are mediated AND non mediated travel programs
if (empty($nonMediated) && !empty($mediated))
{
$childPages = $mediated;
$mediated = null;
}
else
{
$childPages = $nonMediated;
}
return $this->render('default/pages/cms/'. $page->getTemplate() .'.html.twig', [
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
'page' => $page,
'child_pages' => $childPages,
'mediated_child_pages' => $mediated,
]);
}
public function overviewAction(Page $page)
{

View file

@ -38,6 +38,11 @@ class BookingRequest
private $tripleRoomChildCount;
private $extraBookingDaysBefore;
private $extraBookingDaysAfter;
private $roomCount;
/**
@ -363,6 +368,38 @@ class BookingRequest
$this->tripleRoomChildCount = $tripleRoomChildCount;
}
/**
* @return mixed
*/
public function getExtraBookingDaysBefore()
{
return $this->extraBookingDaysBefore;
}
/**
* @param mixed $extraBookingDaysBefore
*/
public function setExtraBookingDaysBefore($extraBookingDaysBefore)
{
$this->extraBookingDaysBefore = $extraBookingDaysBefore;
}
/**
* @return mixed
*/
public function getExtraBookingDaysAfter()
{
return $this->extraBookingDaysAfter;
}
/**
* @param mixed $extraBookingDaysAfter
*/
public function setExtraBookingDaysAfter($extraBookingDaysAfter)
{
$this->extraBookingDaysAfter = $extraBookingDaysAfter;
}
/**
* @return TravelInsurance

View file

@ -125,6 +125,32 @@ class PageRepository extends NestedTreeRepository
;
}
public function findParentsWithShowNav($rootPageId)
{
$qb = $this->createQueryBuilder('node');
$pages = $qb->innerJoin('node.travelProgram', 'tp')
->addSelect('tp')
->where($qb->expr()->eq('node.parent', $rootPageId))
->andWhere('node.showInNavi = 1')
->andWhere('node.status = 1')
->andWhere('tp.status > 0')
->orderBy('node.order')
->getQuery()
->execute()
;
foreach ($pages as &$childPage)
{
if ($childPage->getTravelProgram())
{
// var_dump($childPage->getTravelProgram()->getId());
// $this->getEntityManager()->getRepository('AppBundle:TravelPeriod')->getTrueTravelPeriods($childPage->getTravelProgram());
}
}
return $pages;
}
/**
* @param Page $page
*

View file

@ -289,6 +289,10 @@ final class TravelDate
$price->setEffectivePrice(round(($flightPrice + $price->getPrice() * $currencyFactor) * $profitMargin));
$price->setEffectiveComfortPrice(round($price->getPriceComfort() * $currencyFactor * $profitMargin));
$price->setEffectiveChildPrice(round(($flightPrice + $price->getPriceChildren() * $currencyFactor) * $profitMargin));
$price->setEffectiveExtraPrice(round($price->getExtraPrice() * $currencyFactor * $profitMargin));
$price->setEffectiveExtraComfortPrice(round($price->getExtraPriceComfort() * $currencyFactor * $profitMargin));
$price->setEffectiveExtraChildPrice(round($price->getExtraPriceChildren() * $currencyFactor * $profitMargin));
}
}
return $this->prices;

View file

@ -34,6 +34,28 @@ class TravelPeriodPrice
*/
private $priceComfort = '0.00';
/**
* @var float
*
* @ORM\Column(name="extra_price_children", type="float", precision=10, scale=2, nullable=true)
*/
private $extraPriceChildren;
/**
* @var float
*
* @ORM\Column(name="extra_price_net", type="float", precision=10, scale=2, nullable=false)
*/
private $extraPrice = '0.00';
/**
* @var float
*
* @ORM\Column(name="extra_price_comfort_net", type="float", precision=10, scale=2, nullable=false)
*/
private $extraPriceComfort = '0.00';
/**
* @var integer
*
@ -70,6 +92,10 @@ class TravelPeriodPrice
private $effectiveChildPrice = null;
private $effectiveComfortPrice = null;
private $effectiveExtraPrice = null;
private $effectiveExtraChildPrice = null;
private $effectiveExtraComfortPrice = null;
/**
* @ORM\Column(name="available", type="integer", nullable=false)
*/
@ -195,6 +221,80 @@ class TravelPeriodPrice
return $this->priceComfort;
}
/**
* Set extraPriceChildren
*
* @param float $extraPriceChildren
*
* @return TravelPeriodPrice
*/
public function setExtraPriceChildren($extraPriceChildren)
{
$this->extraPriceChildren = $extraPriceChildren;
return $this;
}
/**
* Get extraPriceChildren
*
* @return float
*/
public function getExtraPriceChildren()
{
return $this->extraPriceChildren;
}
/**
* Set extraPrice
*
* @param float $extraPrice
*
* @return TravelPeriodPrice
*/
public function setExtraPrice($extraPrice)
{
$this->extraPrice = $extraPrice;
return $this;
}
/**
* Get extraPrice
*
* @return float
*/
public function getExtraPrice()
{
return $this->extraPrice;
}
/**
* Set extraPriceComfort
*
* @param float $extraPriceComfort
*
* @return TravelPeriodPrice
*/
public function setExtraPriceComfort($extraPriceComfort)
{
$this->extraPriceComfort = $extraPriceComfort;
return $this;
}
/**
* Get extraPriceComfort
*
* @return float
*/
public function getExtraPriceComfort()
{
return $this->extraPriceComfort;
}
/**
* Get id
*
@ -274,6 +374,29 @@ class TravelPeriodPrice
$this->effectivePrice = $effectivePrice;
}
/**
* @return float
* @throws \Exception
*/
public function getEffectiveExtraPrice()
{
if ($this->effectiveExtraPrice === null)
{
throw new \Exception('EffectiveExtra price must be set from outside before reading it.');
}
return $this->effectiveExtraPrice;
}
/**
* @param float $effectiveExtraPrice
*/
public function setEffectiveExtraPrice($effectiveExtraPrice)
{
$this->effectiveExtraPrice = $effectiveExtraPrice;
}
/**
* Probably getEffectiveDiscountPrice() is the method you are actually looking for.
* @return float|null
@ -342,6 +465,31 @@ class TravelPeriodPrice
$this->effectiveChildPrice = $effectiveChildPrice;
}
/**
* @return float
* @throws \Exception
*
* @todo The child price will not be set yet. This is just a preparation for later
*/
public function getEffectiveExtraChildPrice()
{
if ($this->effectiveExtraChildPrice === null)
{
throw new \Exception('Effective Extra child price must be set from outside before reading it.');
}
return $this->effectiveExtraChildPrice;
}
/**
* @param null $effectiveChildPrice
*/
public function setEffectiveExtraChildPrice($effectiveExtraChildPrice)
{
$this->effectiveExtraChildPrice = $effectiveExtraChildPrice;
}
/**
* @return float|null
* @throws \Exception
@ -363,6 +511,28 @@ class TravelPeriodPrice
$this->effectiveComfortPrice = $effectiveComfortPrice;
}
/**
* @return float|null
* @throws \Exception
*/
public function getEffectiveExtraComfortPrice()
{
if ($this->effectiveExtraComfortPrice === null)
{
throw new \Exception('Effective Extra comfort price must be set from outside before reading it.');
}
return $this->effectiveExtraComfortPrice;
}
/**
* @param float|null $effectiveExtraComfortPrice
*/
public function setEffectiveExtraComfortPrice($effectiveExtraComfortPrice)
{
$this->effectiveExtraComfortPrice = $effectiveExtraComfortPrice;
}
private function calculateDiscountPrice($price)
{
if ($this->getPeriod() == null)

View file

@ -175,9 +175,12 @@ class BookingSternToursCrmExporter extends SternToursCrmExporter
}
$i++;
}
$resp = $this->httpPostAPIv3('create_drafts', [
'travel_program_id' => $tp->getId(),
'comfort' => $bookingRequest->getComfort(),
'booking_before' => $bookingPriceInfo['booking_before'],
'booking_after' => $bookingPriceInfo['booking_after'],
'booking_id' => array_values(array_slice(explode("/", $bookingUrl), -1))[0],
'request_date' => (new \DateTime())->format('Y-m-d'),
'startDateStr' => $startDateStr,

View file

@ -41,6 +41,18 @@ class BookingRequestType extends AbstractType
'4 Einzelzimmer' => 4,
];
public static $EXTRA_BOOKING_DAYS = [
'Keine Reiseverlängerung' => 0,
'1 Tag' => 1,
'2 Tage' => 2,
'3 Tage' => 3,
'4 Tage' => 4,
'5 Tage' => 5,
'6 Tage' => 6,
'7 Tage' => 7,
];
public static $SINGLE_ROOM_CHILD_COUNT_CHOICES = [
'0 Einzelzimmer [1 Erwachsener + 1 Kind (bis einschl. 11 Jahren)]' => 0,
'1 Einzelzimmer [1 Erwachsener + 1 Kind (bis einschl. 11 Jahren)]' => 1,
@ -229,6 +241,22 @@ class BookingRequestType extends AbstractType
]);
$builder->add('extraBookingDaysBefore', ChoiceType::class, [
'choices' => self::$EXTRA_BOOKING_DAYS,
'constraints' => [
new Choice(['choices' => self::$EXTRA_BOOKING_DAYS]
)]
]);
$builder->add('extraBookingDaysAfter', ChoiceType::class, [
'choices' => self::$EXTRA_BOOKING_DAYS,
'constraints' => [
new Choice(['choices' => self::$EXTRA_BOOKING_DAYS]
)]
]);
$insuranceChoices = [];
if ($travelProgram->getInsurance1())
{

View file

@ -176,8 +176,8 @@ body {
font-size: 15px;
font-family: 'Raleway', sans-serif;
font-style: normal;
font-weight: 400;
line-height: 26px;
font-weight: 500;
line-height: 1.5em;
background: #ffffff;
padding: 0;
margin: 0;
@ -1842,6 +1842,26 @@ a[id^="video_"]:before,
top: 5px;
color: #ffc926;
}
.content-pane ul {
margin-bottom: 20px;
}
.content-pane ul li {
margin: 5px 22px;
list-style: none;
}
.content-pane ul li:before {
font: normal normal normal 14px/1 FontAwesome;
content: '\f005';
display: block;
position: relative;
max-width: 0px;
max-height: 0px;
left: -20px;
top: 5px;
color: #ffc926;
}
.c3 li span {
padding-right: 10px;
}
@ -2350,7 +2370,7 @@ i {
}
/*** CONTENT ***/
#content section {
margin-bottom: 40px;
margin-bottom: 20px;
/* @media (max-width: 991px) {
.nav-tabs > li {
display: inline-block;
@ -5929,6 +5949,19 @@ input[type="radio"] .styled:checked + label::after {
box-shadow: 0px 0px 6px 0px rgba(0,0,0,0.5);
}
.content-pane .h3l {
padding-bottom: 10px;
margin-bottom: 15px;
border-bottom: 1px solid #ffc926;
color: #616161;
display: block;
clear: both;
padding-top: 20px;
}
hr.primary {
border-top: 1px solid #ffc926;
}
.tab-pane .h3l {
padding-bottom: 10px;
margin-bottom: 15px;

View file

@ -11,6 +11,13 @@ $(document).ready(function() {
var roomChildCountDR$ = $('#booking_request_doubleRoomChildCount');
var roomChildCountTR$ = $('#booking_request_tripleRoomChildCount');
var extraBookingDaysBefore$ = $('#booking_request_extraBookingDaysBefore');
var extraBookingDaysAfter$ = $('#booking_request_extraBookingDaysAfter');
/*
extraBookingDaysBefore
extraBookingDaysAfter
*/
//var travelersIndices = $('.st-traveller-index');
@ -26,7 +33,6 @@ $(document).ready(function() {
{
url += '?'+ tmp[1];
}
$.ajax({
url: url,
type: 'post',

File diff suppressed because one or more lines are too long