Fewo Booking
Booking via API in CRM v3
This commit is contained in:
parent
88360eabb7
commit
8c514bbd4d
38 changed files with 868 additions and 18044 deletions
|
|
@ -260,6 +260,8 @@
|
||||||
{{ form_row(form.zipCode, {'label': 'PLZ'}) }}
|
{{ form_row(form.zipCode, {'label': 'PLZ'}) }}
|
||||||
{{ form_row(form.city, {'label': 'Ort'}) }}
|
{{ form_row(form.city, {'label': 'Ort'}) }}
|
||||||
{{ form_row(form.maximumPersons, {'label': 'Maximale Personenanzahl'}) }}
|
{{ form_row(form.maximumPersons, {'label': 'Maximale Personenanzahl'}) }}
|
||||||
|
{{ form_row(form.maximumAdults, {'label': 'Maximale Erwachsene'}) }}
|
||||||
|
{{ form_row(form.maximumChilds, {'label': 'Maximale Kinder'}) }}
|
||||||
{{ form_row(form.deposit, {'label': 'Kaution'}) }}
|
{{ form_row(form.deposit, {'label': 'Kaution'}) }}
|
||||||
|
|
||||||
{#
|
{#
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@
|
||||||
<td class="st-position-price-col">
|
<td class="st-position-price-col">
|
||||||
<span class="st-total-price">= {{ priceResult.total_price|number_format(2) }} €</span>
|
<span class="st-total-price">= {{ priceResult.total_price|number_format(2) }} €</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="st-position-name-col">Gesamtpreis der Reise</td>
|
<td class="st-position-name-col">Miete inkl. Kaution</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<label for="{{ form.vars.id }}">
|
<label for="{{ form.vars.id }}">
|
||||||
{{ insurance.name }}
|
{{ insurance.name }}
|
||||||
(<a href="#" data-toggle="modal" data-target="#st-insurance-{{ insurance.id }}-modal">Details</a>)
|
(<a href="#" data-toggle="modal" data-target="#st-insurance-{{ insurance.id }}-modal">Preisdetails</a>)
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -49,16 +49,19 @@
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<h3>Leistungen & Preisliste</h3>
|
<h3>Leistungen & Preisliste</h3>
|
||||||
|
|
||||||
|
{#
|
||||||
<ul class="c1 c1b">
|
<ul class="c1 c1b">
|
||||||
{% for item in insurance.included|split('\n') %}
|
{% for item in insurance.included|split('\n') %}
|
||||||
<li>{{ item }}</li>
|
<li>{{ item }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
#}
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Reisepreis bis</td>
|
<td>Reisepreis bis</td>
|
||||||
<td>je Person</td>
|
<td>je Person (bis 65 Jahren)</td>
|
||||||
|
<td>je Person (ab 66 Jahren)</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
@ -68,10 +71,17 @@
|
||||||
<td>
|
<td>
|
||||||
{% if insurance_price.price > 0 %}
|
{% if insurance_price.price > 0 %}
|
||||||
{{ insurance_price.price|number_format(2) }} €
|
{{ insurance_price.price|number_format(2) }} €
|
||||||
{% else %}
|
{% elseif insurance_price.percent > 0 %}
|
||||||
{{ insurance_price.percent|number_format }} % vom Reisepreis
|
{{ insurance_price.percent|number_format }} % vom Reisepreis
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
{% if insurance_price.priceOld > 0 %}
|
||||||
|
{{ insurance_price.priceOld|number_format(2) }} €
|
||||||
|
{% elseif insurance_price.percentOld > 0 %}
|
||||||
|
{{ insurance_price.percentOld|number_format }} % vom Reisepreis
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
||||||
|
|
@ -27,13 +27,19 @@
|
||||||
</td>
|
</td>
|
||||||
<td class="st-position-name-col">Anzahlung (ist sofort fällig)</td>
|
<td class="st-position-name-col">Anzahlung (ist sofort fällig)</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
{% if( booking_price_info.totalInsurance > 0) %}
|
||||||
|
<tr class="">
|
||||||
|
<td class="st-position-price-col" style="min-width: 120px;">
|
||||||
|
<span class="st-deposit-price">{{ booking_price_info.totalInsurance|number_format(2) }} €</span>
|
||||||
|
</td>
|
||||||
|
<td class="st-position-name-col">Versicherung (ist sofort fällig)</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
<tr class="">
|
<tr class="">
|
||||||
<td class="st-position-price-col" style="min-width: 120px;">
|
<td class="st-position-price-col" style="min-width: 120px;">
|
||||||
<span class="st-final-price">{{ booking_price_info.final_payment|number_format(2) }} €</span>
|
<span class="st-final-price">{{ booking_price_info.final_payment|number_format(2) }} €</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="st-position-name-col">Restzahlung ({{ booking_price_info.final_payment_date_str}})</td>
|
<td class="st-position-name-col">Restzahlung ({{ booking_price_info.final_payment_date_str}})</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
<div class="info-text">
|
<div class="info-text">
|
||||||
<i class="fa fa-phone"></i>
|
<i class="fa fa-phone"></i>
|
||||||
<p class="text">
|
<p class="text">
|
||||||
030 - 700 94 100
|
{{ getContextBySlug('telefon-header') }}
|
||||||
<span class="small">Mo-Fr 09:00 - 22:00 Uhr • Sa 10:00 - 22:00 Uhr • So 11:00 - 22:00 Uhr</span>
|
<span class="small"> {{ getContextBySlug('uhrzeit-header')|replace({'|': " • "})|raw }} Uhr</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,9 @@
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<ul class="topbar-drops list-inline">
|
<ul class="topbar-drops list-inline">
|
||||||
<li class="nohover visible-xs visible-sm"> Mo-Fr: 09:00 - 22:00 | Sa: 10:00 - 22:00 | So: 11:00 - 22:00 Uhr</li>
|
<li class="nohover visible-xs visible-sm"> {{ getContextBySlug('uhrzeit-header') }} Uhr
|
||||||
<li class="nohover"><i class="fa fa-phone"></i> 030 - 700 94 100</li>
|
</li>
|
||||||
|
<li class="nohover"><i class="fa fa-phone"></i> {{ getContextBySlug('telefon-header') }}</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/kontakt" title="Kontakt"><i class="fa fa-envelope"></i> <span class="hidden-xs">Kontakt</span></a>
|
<a href="/kontakt" title="Kontakt"><i class="fa fa-envelope"></i> <span class="hidden-xs">Kontakt</span></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
@ -83,7 +84,7 @@
|
||||||
<span style="float:left; margin-top: 30pt; margin-right: 5pt; color: #e5aa30; font-size: 18px">E-Mail: <a
|
<span style="float:left; margin-top: 30pt; margin-right: 5pt; color: #e5aa30; font-size: 18px">E-Mail: <a
|
||||||
href="mailto:stern@sterntours.de" style="font-size: 18px; color: #777777">stern@sterntours.de</a></span>
|
href="mailto:stern@sterntours.de" style="font-size: 18px; color: #777777">stern@sterntours.de</a></span>
|
||||||
<i class="fa fa-phone "></i>
|
<i class="fa fa-phone "></i>
|
||||||
<span>Mo-Fr: 09:00 - 22:00 Uhr<br>Sa: 10:00 - 22:00 Uhr<br>So: 11:00 - 22:00 Uhr</span>
|
<span>{{ getContextBySlug('uhrzeit-header')|replace({'|': "Uhr<br>"})|raw }} Uhr</span>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- end navbar-callopse -->
|
</div><!-- end navbar-callopse -->
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<div id="show_sterntours_video_sidebar" class="widget clearfix">
|
<div id="show_sterntours_video_sidebar" class="widget clearfix">
|
||||||
<div class="widget-title">
|
<div class="widget-title">
|
||||||
<a class="collapse-widget {{ app.request.get('_open_side_about') }} {% if(app.request.get('_open_side_about') == 'closed') %} collapsed {% endif %}" href="#about-widget" data-toggle="collapse" aria-expanded="true">{{ widget.name }}</a>
|
<a class="collapse-widget {{ app.request.get('_open_side_about') }}" href="#about-widget" data-toggle="collapse" aria-expanded="true">{{ widget.name }}</a>
|
||||||
</div><!-- end title -->
|
</div><!-- end title -->
|
||||||
<div class="boxwidget collapse {{ app.request.get('_open_side_about') }} {% if(app.request.get('_open_side_about') == 'open') %} in open {% endif %}" id="about-widget" aria-expanded="true">
|
<div class="boxwidget collapse in {{ app.request.get('_open_side_about') }} " id="about-widget" aria-expanded="true">
|
||||||
{{ widget.html|raw }}
|
{{ widget.html|raw }}
|
||||||
</div><!-- end boxwidget -->
|
</div><!-- end boxwidget -->
|
||||||
</div><!-- end widget -->
|
</div><!-- end widget -->
|
||||||
|
|
@ -21,6 +21,10 @@ Abfahrts-/Abflugort: {{ booking_request.departure.name }}
|
||||||
Gesamtpreis: {{ booking_price_info['total']|number_format(2) }} €
|
Gesamtpreis: {{ booking_price_info['total']|number_format(2) }} €
|
||||||
|
|
||||||
Anzahlung: {{ booking_price_info.deposit_total|number_format(2) }} € (ist sofort fällig)
|
Anzahlung: {{ booking_price_info.deposit_total|number_format(2) }} € (ist sofort fällig)
|
||||||
|
{% if( booking_price_info.totalInsurance > 0) %}
|
||||||
|
|
||||||
|
Versicherung: {{ booking_price_info.totalInsurance|number_format(2) }} € (ist sofort fällig)
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
Restzahlung: {{ booking_price_info.final_payment|number_format(2) }} € (bis zum {{ booking_price_info.final_payment_date}})
|
Restzahlung: {{ booking_price_info.final_payment|number_format(2) }} € (bis zum {{ booking_price_info.final_payment_date}})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,10 @@ Reiseanmelder: {% if fewo_booking_request.salutation == 2 %}in{% endif %}
|
||||||
* E-Mail: {{ fewo_booking_request.email ?? 'keine Angabe' }}
|
* E-Mail: {{ fewo_booking_request.email ?? 'keine Angabe' }}
|
||||||
|
|
||||||
=======================================================
|
=======================================================
|
||||||
Reiseteilnehmer: {{ fewo_booking_request.travelerCount }}
|
Reiseteilnehmer
|
||||||
|
Erwachsene: {{ fewo_booking_request.travelerCountAdult }}
|
||||||
|
Kinder: {{ fewo_booking_request.travelerCountChild }}
|
||||||
|
Gesamt: {{ fewo_booking_request.travelerCount }}
|
||||||
=======================================================
|
=======================================================
|
||||||
Mitteilungen / Sonstiges:
|
Mitteilungen / Sonstiges:
|
||||||
{{ fewo_booking_request.notes ?? '-' }}
|
{{ fewo_booking_request.notes ?? '-' }}
|
||||||
|
|
|
||||||
|
|
@ -223,12 +223,11 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td>Verlängerung buchen</td>
|
<td>Verlängerung buchen</td>
|
||||||
<td>
|
<td>
|
||||||
Vor der Reise im Rundreisehotel oder auf Wunsch in einem anderen Hotel der gebuchten Preiskategorie in Tel Aviv oder Jerusalem
|
<p>{{ getContextBySlug('verlaengerung-vor') }}</p>
|
||||||
{{ form_widget(form.extraBookingDaysBefore) }}
|
{{ form_widget(form.extraBookingDaysBefore) }}
|
||||||
{{ form_errors(form.extraBookingDaysBefore) }}
|
{{ form_errors(form.extraBookingDaysBefore) }}
|
||||||
<br>
|
<br>
|
||||||
|
<p>{{ getContextBySlug('verlaengerung-nach') }}</p>
|
||||||
Nach der Reise im Rundreisehotel oder auf Wunsch in einem anderen Hotel der gebuchten Preiskategorie in Tel Aviv oder Jerusalem
|
|
||||||
{{ form_widget(form.extraBookingDaysAfter) }}
|
{{ form_widget(form.extraBookingDaysAfter) }}
|
||||||
{{ form_errors(form.extraBookingDaysAfter) }}
|
{{ form_errors(form.extraBookingDaysAfter) }}
|
||||||
|
|
||||||
|
|
@ -252,7 +251,6 @@
|
||||||
'insurance': form.insurance.vars.choices[insuranceForm.vars.value].data
|
'insurance': form.insurance.vars.choices[insuranceForm.vars.value].data
|
||||||
} %}
|
} %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{{ form_errors(form.insurance) }}
|
{{ form_errors(form.insurance) }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -261,8 +259,7 @@
|
||||||
<td>
|
<td>
|
||||||
<p style="white-space: normal;">
|
<p style="white-space: normal;">
|
||||||
<br>
|
<br>
|
||||||
STERN TOURS GmbH empfiehlt generell den Abschluss einer Reise-Rücktrittskosten-Versicherung und einer Auslands-Reisekrankenversicherung mit Rücktransport.
|
{{ getContextBySlug('reise-ruecktrittskosten-empfehlung')|raw }}
|
||||||
Im Anschluss der Buchung senden wir Ihnen diesbezüglich Informationen zu.
|
|
||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -285,9 +282,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
Die gewünschte Zahlungsart (Überweisung, Kreditkarten) stimmen wir mit Ihnen im Anschluss an Ihre Buchung ab.
|
{{ getContextBySlug('gewuenschte-zahlungsart') }}
|
||||||
{% if(travel_program.category.id != 1) %}
|
{% if(travel_program.category.id != 1) %}
|
||||||
Abweichend von den Anzahlungsbedingungen Ziffer 2.1 gelten hier besondere Anzahlungsbedingungen wie folgt: Fluganteil 100% und Landleistung 20%. Abweichend von den allgemeinen Stornobedingungen Ziffer 4.3a gelten hier besondere Stornobedingungen (Ziffer 4.3b) wie folgt: Fluganteil 100% und Landleistung gemäß Ziffer 4.3a allgemeine Stornobedingungen.
|
{{ getContextBySlug('abweichende-anzahlungsbedingungen') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -309,6 +306,7 @@
|
||||||
{% for departure in travel_date.departures %}
|
{% for departure in travel_date.departures %}
|
||||||
{# @var departure \AppBundle\Entity\TravelDeparturePoint #}
|
{# @var departure \AppBundle\Entity\TravelDeparturePoint #}
|
||||||
{% if departure.flightTime[travel_date.startWeekday] is defined %}
|
{% if departure.flightTime[travel_date.startWeekday] is defined %}
|
||||||
|
{% if departure.flightTime[travel_date.startWeekday] != "" %}
|
||||||
<div class="flight_times_ele" id="flight_time_{{ departure.id }}" style="display: none;">
|
<div class="flight_times_ele" id="flight_time_{{ departure.id }}" style="display: none;">
|
||||||
<h3>Von {{ departure.name }}</h3>
|
<h3>Von {{ departure.name }}</h3>
|
||||||
{% for flightTime in departure.flightTime[travel_date.startWeekday]|split('\n') %}
|
{% for flightTime in departure.flightTime[travel_date.startWeekday]|split('\n') %}
|
||||||
|
|
@ -318,13 +316,10 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<div class="" id="no_flight_time" style="display: none;">
|
<div class="" id="no_flight_time" style="display: none;">
|
||||||
<p>Die Flugdaten sind zum Zeitpunkt der Ausschreibung noch nicht bekannt und daher werden wir Ihnen diese mit der Annahme vom Buchungsauftrag mitteilen.</p>
|
<p>{{ getContextBySlug('keine-flugdaten') }}</p>
|
||||||
</div>
|
|
||||||
<div class="" id="yes_flight_time" style="display: none;">
|
|
||||||
<h3>Hinweis</h3>
|
|
||||||
<p>Flugzeiten können um 1 Std. variieren durch Sommer-/Winterzeit.</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -351,7 +346,7 @@
|
||||||
<li>
|
<li>
|
||||||
<span id="extraDaysProgramBefore_date" data-org-date="{{ travel_program_date.date }}">{{ travel_program_date.date }}</span> : Reiseverlängerung vor der Reise - {{ travel_program_date.day|raw }}
|
<span id="extraDaysProgramBefore_date" data-org-date="{{ travel_program_date.date }}">{{ travel_program_date.date }}</span> : Reiseverlängerung vor der Reise - {{ travel_program_date.day|raw }}
|
||||||
{% if travel_program_date.night is defined %}
|
{% if travel_program_date.night is defined %}
|
||||||
<br>Übernachtung : Reiseverlängerung im Rundreisehotel oder auf Wunsch in einem anderen Hotel der gebuchten Preiskategorie in Tel Aviv oder Jerusalem
|
<br> {{ getContextBySlug('uebernachtung-reiseverlaengerung') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
@ -390,7 +385,7 @@
|
||||||
<div id="extraDaysProgramAfter_show" style="display: none;">
|
<div id="extraDaysProgramAfter_show" style="display: none;">
|
||||||
<li>
|
<li>
|
||||||
{{ travel_program_date.date }} : Ende {{ travel_program.title }}
|
{{ travel_program_date.date }} : Ende {{ travel_program.title }}
|
||||||
<br>Übernachtung : Reiseverlängerung im Rundreisehotel oder auf Wunsch in einem anderen Hotel der gebuchten Preiskategorie in Tel Aviv oder Jerusalem
|
<br>{{ getContextBySlug('uebernachtung-reiseverlaengerung') }}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span id="extraDaysProgramAfter_date" data-org-date="{{ travel_program_date.date }}">{{ travel_program_date.date }}</span> : Reiseverlängerung - {{ travel_program_date.day|raw }}
|
<span id="extraDaysProgramAfter_date" data-org-date="{{ travel_program_date.date }}">{{ travel_program_date.date }}</span> : Reiseverlängerung - {{ travel_program_date.day|raw }}
|
||||||
|
|
@ -574,7 +569,7 @@
|
||||||
<div class="">
|
<div class="">
|
||||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||||
<h5>Reiseteilnehmer</h5>
|
<h5>Reiseteilnehmer</h5>
|
||||||
<p>Bitte geben Sie Ihre Vornamen und Nachnamen in die beiden Felder "Vornamen" und "Nachnamen" ein, wie diese im maschinenlesbaren Teil in Ihrem Reisepass eingetragen sind.</p>
|
<p>{{ getContextBySlug('namen-reisepass') }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||||
<div class="hidden">
|
<div class="hidden">
|
||||||
|
|
@ -684,7 +679,7 @@
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
{{ form_widget(traveler.acceptEntryRequirements) }}
|
{{ form_widget(traveler.acceptEntryRequirements) }}
|
||||||
<label for="{{ traveler.acceptEntryRequirements.vars.id }}" style="line-height: 1.2em;">
|
<label for="{{ traveler.acceptEntryRequirements.vars.id }}" style="line-height: 1.2em;">
|
||||||
Ich habe die oben genannten Hinweise zu den "Einreisebestimmungen, Visabestimmungen und gesundheitspolizeilichen Vorschriften" für mich und alle Mitreisenden gelesen und zur Kenntnis genommen..
|
{{ getContextBySlug('hinweise-einreisebestimmungen')|raw }}
|
||||||
</label>
|
</label>
|
||||||
<span class="checkbox_marker"></span>
|
<span class="checkbox_marker"></span>
|
||||||
{{ form_errors(traveler.acceptEntryRequirements) }}
|
{{ form_errors(traveler.acceptEntryRequirements) }}
|
||||||
|
|
@ -700,12 +695,10 @@
|
||||||
|
|
||||||
</div> <!-- st trav -->
|
</div> <!-- st trav -->
|
||||||
<h2>Hinweis</h2>
|
<h2>Hinweis</h2>
|
||||||
<p>Sofern Sie nicht oder nicht ausschließlich nur die Staatsbürgerschaft für
|
<p>{{ getContextBySlug('hinweis-staatsbuergerschaft-1')|raw }}
|
||||||
{% for nationalitie in nationalities %}
|
{% for nationalitie in nationalities %}
|
||||||
{{ nationalitie.name }}{% if not loop.last %},{% endif %}
|
{{ nationalitie.name }}{% if not loop.last %},{% endif %}
|
||||||
{% endfor %} besitzen, können Sie die Reise nicht buchen,
|
{% endfor %} {{ getContextBySlug('hinweis-staatsbuergerschaft-2')|raw }} </p>
|
||||||
da wir Sie vorher u.a. über die Einreisebestimmungen für Ihre individuelle Staatsbürgerschaft informieren müssen.
|
|
||||||
Bitte nehmen Sie vor einer Buchung Kontakt mit uns auf, damit Sie nach Erhalt der Informationen entscheiden können, ob Sie die Reise buchen möchten.</p>
|
|
||||||
|
|
||||||
|
|
||||||
</div> <!-- col -->
|
</div> <!-- col -->
|
||||||
|
|
@ -721,14 +714,15 @@
|
||||||
|
|
||||||
{{ travel_program.organizer.legalRights|raw }}
|
{{ travel_program.organizer.legalRights|raw }}
|
||||||
<a href="/uploads/{{ travel_program.organizer.fileFormPage }}" target="_blank">
|
<a href="/uploads/{{ travel_program.organizer.fileFormPage }}" target="_blank">
|
||||||
Weiterführende Informationen zu Ihren wichtigsten Rechten nach der Richtlinie (EU) 2015/2302 (Formblatt)
|
{{ getContextBySlug('informationen-formblatt') }}
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
{{ form_widget(form.acceptLegalRights) }}
|
{{ form_widget(form.acceptLegalRights) }}
|
||||||
<label for="{{ form.acceptLegalRights.vars.id }}" style="line-height: 1.2em;">
|
<label for="{{ form.acceptLegalRights.vars.id }}" style="line-height: 1.2em;">
|
||||||
Hiermit bestätige ich, dass ich das Formblatt mit den Informationen zu meinen wichtigsten Rechten nach der Richtlinie (EU) 2015/2302 zur Kenntnis genommen habe.
|
{{ getContextBySlug('bestaetigung-formblatt') }}
|
||||||
</label>
|
</label>
|
||||||
<span class="checkbox_marker"></span>
|
<span class="checkbox_marker"></span>
|
||||||
{{ form_errors(form.acceptLegalRights) }}
|
{{ form_errors(form.acceptLegalRights) }}
|
||||||
|
|
@ -749,20 +743,18 @@
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
{{ form_widget(form.acceptTerms) }}
|
{{ form_widget(form.acceptTerms) }}
|
||||||
<label for="{{ form.acceptTerms.vars.id }}" style="line-height: 1.2em;">
|
<label for="{{ form.acceptTerms.vars.id }}" style="line-height: 1.2em;">
|
||||||
Ich habe alle Daten und Angaben auf Richtigkeit überprüft. Ich habe die
|
{{ getContextBySlug('reisebedingungen-check-1') }}
|
||||||
|
|
||||||
{% if travel_program.isMediated %}
|
{% if travel_program.isMediated %}
|
||||||
<a href="/uploads/{{ travel_program.organizer.fileName }}?t={{ travel_program.organizer.rulesUpdatedTime }}" target="_blank">
|
<a href="/uploads/{{ travel_program.organizer.fileName }}?t={{ travel_program.organizer.rulesUpdatedTime }}" target="_blank">
|
||||||
Allgemeinen Geschäftsbedingungen des Reiseveranstalters
|
{{ getContextBySlug('reisebedingungen-link-1') }}
|
||||||
</a> {{ travel_program.organizer.name }}
|
</a> {{ travel_program.organizer.name }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="/uploads/{{ travel_program.organizer.formArb }}?t={{ travel_program.organizer.rulesUpdatedTime }}" target="_blank">
|
<a href="/uploads/{{ travel_program.organizer.formArb }}?t={{ travel_program.organizer.rulesUpdatedTime }}" target="_blank">
|
||||||
Allgemeinen Reisebedingungen des Reiseveranstalters
|
{{ getContextBySlug('reisebedingungen-link-2') }}
|
||||||
</a> {{ travel_program.organizer.name }}
|
</a> {{ travel_program.organizer.name }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
gelesen und akzeptiert. Zugleich erkenne ich diese für alle Reiseteilnehmer an.<br>
|
{{ getContextBySlug('reisebedingungen-check-2')|raw }}
|
||||||
Es gelten die der Staatsbürgerschaft der einzelnen Reiseteilnehmer entsprechenden Einreise- und Impfbestimmungen für das Ziel- und Transitland.
|
|
||||||
Die für deutsche Staatsbürger geltenden Bestimmungen finden Sie auf den Seiten des <a href="https://www.auswaertiges-amt.de/de/ReiseUndSicherheit/reise-und-sicherheitshinweise" target="_blank">Auswärtigen Amts</a>
|
|
||||||
Ein Widerrufsrecht steht Ihnen gemäß § 312 g Abs. 2 Nr. 9 BGB (Bürgerliches Gesetzbuch) nicht zu.
|
|
||||||
</label>
|
</label>
|
||||||
<span class="checkbox_marker"></span>
|
<span class="checkbox_marker"></span>
|
||||||
{{ form_errors(form.acceptTerms) }}
|
{{ form_errors(form.acceptTerms) }}
|
||||||
|
|
@ -800,10 +792,7 @@
|
||||||
<div class="">
|
<div class="">
|
||||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||||
<h5>Wichtiger Hinweis</h5>
|
<h5>Wichtiger Hinweis</h5>
|
||||||
Nach Abschluss Ihrer Buchung erhalten Sie innerhalb von 15 Minuten eine Email zur Bestätigung Ihres verbindlichen Buchungsauftrages.
|
{{ getContextBySlug('hinweis-bestellung')|raw }}
|
||||||
Sollten Sie diese Email nicht bekommen, kontaktieren Sie uns bitte per Email, oder per Telefon unter 030-70094100.
|
|
||||||
Wir sind Montag bis Freitag von 9 bis 22 Uhr, Samstag von 10 bis 22 Uhr und Sonn- und Feiertage von 11 bis 22:00 Uhr für Sie da.
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- end form-box -->
|
</div><!-- end form-box -->
|
||||||
|
|
|
||||||
|
|
@ -28,18 +28,22 @@
|
||||||
|
|
||||||
<td class="{{ dayState.getCssClass }} {% if dayState.isBookable %}active{% endif %}">
|
<td class="{{ dayState.getCssClass }} {% if dayState.isBookable %}active{% endif %}">
|
||||||
{% if dayState.isBookable %}
|
{% if dayState.isBookable %}
|
||||||
|
{% if dayState.isPastDate %}
|
||||||
|
<div style="padding: 8px"><del style="color:#989898;">{{ dayState.day }}</del></div>
|
||||||
|
{% else %}
|
||||||
<a href="{{ page.urlPath }}/buchen?pnr={{ dayState.price.id }}&fd={{ dayState.day < 10 ? '0':'' }}{{dayState.day}}{{ calendar_month['monthNumber'] < 10 ? '0':'' }}{{calendar_month['monthNumber']}}{{calendar_month['year']}}"
|
<a href="{{ page.urlPath }}/buchen?pnr={{ dayState.price.id }}&fd={{ dayState.day < 10 ? '0':'' }}{{dayState.day}}{{ calendar_month['monthNumber'] < 10 ? '0':'' }}{{calendar_month['monthNumber']}}{{calendar_month['year']}}"
|
||||||
rel="nofollow" class="table-link"
|
rel="nofollow" class="table-link"
|
||||||
>
|
>
|
||||||
{{ dayState.day }}
|
{{ dayState.day }}
|
||||||
</a>
|
</a>
|
||||||
|
{% endif %}
|
||||||
{% elseif dayState.day == 0 %}
|
{% elseif dayState.day == 0 %}
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if dayState.isPastDate %}
|
{% if dayState.isPastDate %}
|
||||||
<del style="color:#989898;">{{ dayState.day }}</del>
|
<div style="padding: 8px"><del style="color:#989898;">{{ dayState.day }}</del></div>
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ dayState.day }}
|
<div style="padding: 8px">{{ dayState.day }}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,24 @@
|
||||||
</td>
|
</td>
|
||||||
</tr> -->
|
</tr> -->
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>{{ form_label(form.travelerCountAdult, 'Reiseteilnehmer Erwachsene') }}</td>
|
||||||
|
<td>
|
||||||
|
<div style="max-width: 180px;">
|
||||||
|
{{ form_widget(form.travelerCountAdult) }}
|
||||||
|
{{ form_errors(form.travelerCountAdult) }}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{ form_label(form.travelerCountChild, 'Reiseteilnehmer Kinder') }}</td>
|
||||||
|
<td>
|
||||||
|
<div style="max-width: 180px;">
|
||||||
|
{{ form_widget(form.travelerCountChild) }}
|
||||||
|
{{ form_errors(form.travelerCountChild) }}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<!-- <tr>
|
||||||
<td>{{ form_label(form.travelerCount, 'Reiseteilnehmer') }}</td>
|
<td>{{ form_label(form.travelerCount, 'Reiseteilnehmer') }}</td>
|
||||||
<td>
|
<td>
|
||||||
<div style="max-width: 180px;">
|
<div style="max-width: 180px;">
|
||||||
|
|
@ -85,7 +103,7 @@
|
||||||
{{ form_errors(form.travelerCount) }}
|
{{ form_errors(form.travelerCount) }}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>-->
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,11 @@
|
||||||
<td>
|
<td>
|
||||||
Anzahl Reiseteilnehmer
|
Anzahl Reiseteilnehmer
|
||||||
</td>
|
</td>
|
||||||
<td>{{ fewo_booking_request.travelerCount }}</td>
|
<td>
|
||||||
|
Erwachsene: {{ fewo_booking_request.travelerCountAdult }}<br>
|
||||||
|
Kinder: {{ fewo_booking_request.travelerCountChild }}<br>
|
||||||
|
Gesamt: {{ fewo_booking_request.travelerCount }}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ services:
|
||||||
- '@twig'
|
- '@twig'
|
||||||
- '@app.keyword_service'
|
- '@app.keyword_service'
|
||||||
- '@request_stack'
|
- '@request_stack'
|
||||||
|
- '@doctrine.orm.entity_manager'
|
||||||
tags:
|
tags:
|
||||||
- { name: twig.extension }
|
- { name: twig.extension }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -410,6 +410,9 @@ class AdminController extends Controller
|
||||||
$toDate = '';
|
$toDate = '';
|
||||||
|
|
||||||
$maxPersons = $lodging->getMaximumPersons();
|
$maxPersons = $lodging->getMaximumPersons();
|
||||||
|
$maxAdults = $lodging->getMaximumAdults();
|
||||||
|
$maxChilds = $lodging->getMaximumChilds();
|
||||||
|
|
||||||
|
|
||||||
$fewoBookingRequest = new FewoBookingRequest();
|
$fewoBookingRequest = new FewoBookingRequest();
|
||||||
$reservation = new FewoReservation();
|
$reservation = new FewoReservation();
|
||||||
|
|
@ -430,6 +433,8 @@ class AdminController extends Controller
|
||||||
$form = $this->createForm(FewoBookingRequestType::class, $fewoBookingRequest, [
|
$form = $this->createForm(FewoBookingRequestType::class, $fewoBookingRequest, [
|
||||||
'lodging' => $lodging,
|
'lodging' => $lodging,
|
||||||
'maxPersons' => $maxPersons,
|
'maxPersons' => $maxPersons,
|
||||||
|
'maxAdults' => $maxAdults,
|
||||||
|
'maxChilds' => $maxChilds,
|
||||||
'toDate' => $toDate
|
'toDate' => $toDate
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,6 @@ class BookingController extends Controller
|
||||||
|
|
||||||
if ($request->getMethod() == 'POST' && $form->isValid())
|
if ($request->getMethod() == 'POST' && $form->isValid())
|
||||||
{
|
{
|
||||||
|
|
||||||
$errors = array();
|
$errors = array();
|
||||||
foreach ($form as $fieldName => $formField) {
|
foreach ($form as $fieldName => $formField) {
|
||||||
foreach ($formField->getErrors(true) as $error) {
|
foreach ($formField->getErrors(true) as $error) {
|
||||||
|
|
@ -164,7 +163,6 @@ class BookingController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$booking = $this->getDoctrine()->getRepository('AppBundle:TravelBooking')->createFromBookingRequest(
|
$booking = $this->getDoctrine()->getRepository('AppBundle:TravelBooking')->createFromBookingRequest(
|
||||||
$bookingRequest, $travelDate, $bookingPriceInfo);
|
$bookingRequest, $travelDate, $bookingPriceInfo);
|
||||||
|
|
||||||
|
|
@ -172,7 +170,6 @@ class BookingController extends Controller
|
||||||
$em->persist($booking);
|
$em->persist($booking);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
|
||||||
$crmBookingUrl = $this->get('app.booking_exporter')->process($bookingRequest, $travelDate, $bookingPriceInfo);
|
$crmBookingUrl = $this->get('app.booking_exporter')->process($bookingRequest, $travelDate, $bookingPriceInfo);
|
||||||
|
|
||||||
if (!$crmBookingUrl)
|
if (!$crmBookingUrl)
|
||||||
|
|
@ -202,7 +199,6 @@ class BookingController extends Controller
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$this->get('mailer')->send(\Swift_Message::newInstance()
|
$this->get('mailer')->send(\Swift_Message::newInstance()
|
||||||
->setSubject('BUCHUNG: '. $travelProgram->getTitle() .'('. $travelDate->getName() .')')
|
->setSubject('BUCHUNG: '. $travelProgram->getTitle() .'('. $travelDate->getName() .')')
|
||||||
->setFrom('stern@stern-tours.de', 'STERN TOURS')
|
->setFrom('stern@stern-tours.de', 'STERN TOURS')
|
||||||
|
|
@ -916,6 +912,7 @@ class BookingController extends Controller
|
||||||
{
|
{
|
||||||
$outPriceInfo['total'] = $ret;
|
$outPriceInfo['total'] = $ret;
|
||||||
$outPriceInfo['totalWithoutInsurance'] = $ret - $insuranceTotal;
|
$outPriceInfo['totalWithoutInsurance'] = $ret - $insuranceTotal;
|
||||||
|
$outPriceInfo['totalInsurance'] = $insuranceTotal;
|
||||||
|
|
||||||
if($outPriceInfo['departure_extra'] >= 0){
|
if($outPriceInfo['departure_extra'] >= 0){
|
||||||
$outPriceInfo['flight_price'] = $outPriceInfo['flight_price'] + $outPriceInfo['departure_extra'];
|
$outPriceInfo['flight_price'] = $outPriceInfo['flight_price'] + $outPriceInfo['departure_extra'];
|
||||||
|
|
@ -928,14 +925,14 @@ class BookingController extends Controller
|
||||||
}
|
}
|
||||||
//Aeqypten (20% from price)
|
//Aeqypten (20% from price)
|
||||||
if($categoryId == 1){
|
if($categoryId == 1){
|
||||||
$deposit = ($outPriceInfo['total'] / 100 * $depositPercent);
|
$deposit = ($outPriceInfo['totalWithoutInsurance'] / 100 * $depositPercent);
|
||||||
$outPriceInfo['deposit_total'] = $deposit;
|
$outPriceInfo['deposit_total'] = $deposit;
|
||||||
$outPriceInfo['final_payment'] = ($outPriceInfo['total'] - $outPriceInfo['deposit_total']);
|
$outPriceInfo['final_payment'] = ($outPriceInfo['totalWithoutInsurance'] - $outPriceInfo['deposit_total']);
|
||||||
}else{
|
}else{
|
||||||
//all 100% vom Flugpreis und 20% von der Landleistung.
|
//all 100% vom Flugpreis und 20% von der Landleistung.
|
||||||
$deposit = (($outPriceInfo['total'] - $outPriceInfo['flight_price']) / 100 * $depositPercent);
|
$deposit = (($outPriceInfo['totalWithoutInsurance'] - $outPriceInfo['flight_price']) / 100 * $depositPercent);
|
||||||
$outPriceInfo['deposit_total'] = ($deposit + $outPriceInfo['flight_price']);
|
$outPriceInfo['deposit_total'] = ($deposit + $outPriceInfo['flight_price']);
|
||||||
$outPriceInfo['final_payment'] = ($outPriceInfo['total'] - $outPriceInfo['deposit_total']);
|
$outPriceInfo['final_payment'] = ($outPriceInfo['totalWithoutInsurance'] - $outPriceInfo['deposit_total']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ use AppBundle\Entity\FewoBookingRequest;
|
||||||
use AppBundle\Form\FewoBookingRequestType;
|
use AppBundle\Form\FewoBookingRequestType;
|
||||||
use AppBundle\Entity\FewoReservation;
|
use AppBundle\Entity\FewoReservation;
|
||||||
|
|
||||||
|
use Doctrine\ORM\Query;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
|
@ -175,6 +176,9 @@ class FewoBookingController extends Controller
|
||||||
$this->initCalender($lodging);
|
$this->initCalender($lodging);
|
||||||
|
|
||||||
$maxPersons = $lodging->getMaximumPersons();
|
$maxPersons = $lodging->getMaximumPersons();
|
||||||
|
$maxAdults = $lodging->getMaximumAdults();
|
||||||
|
$maxChilds = $lodging->getMaximumChilds();
|
||||||
|
|
||||||
|
|
||||||
$fewoBookingRequest = new FewoBookingRequest();
|
$fewoBookingRequest = new FewoBookingRequest();
|
||||||
$fewoBookingRequest->setLodging($lodging);
|
$fewoBookingRequest->setLodging($lodging);
|
||||||
|
|
@ -207,10 +211,17 @@ class FewoBookingController extends Controller
|
||||||
$fewoBookingRequest->setNumberDays($minimumStay);
|
$fewoBookingRequest->setNumberDays($minimumStay);
|
||||||
$fewoBookingRequest->setPrice($price);
|
$fewoBookingRequest->setPrice($price);
|
||||||
|
|
||||||
|
$nationalities = $this->getDoctrine()
|
||||||
|
->getRepository('AppBundle:TravelNationality')
|
||||||
|
->createQueryBuilder('n')
|
||||||
|
->getQuery()->getResult(Query::HYDRATE_ARRAY);
|
||||||
|
|
||||||
$form = $this->createForm(FewoBookingRequestType::class, $fewoBookingRequest, [
|
$form = $this->createForm(FewoBookingRequestType::class, $fewoBookingRequest, [
|
||||||
'lodging' => $lodging,
|
'lodging' => $lodging,
|
||||||
'maxPersons' => $maxPersons,
|
'maxPersons' => $maxPersons,
|
||||||
|
'maxAdults' => $maxAdults,
|
||||||
|
'maxChilds' => $maxChilds,
|
||||||
|
'nationalities' => $nationalities,
|
||||||
'fromDate' => $fromDate,
|
'fromDate' => $fromDate,
|
||||||
'toDate' => $toDate,
|
'toDate' => $toDate,
|
||||||
]);
|
]);
|
||||||
|
|
@ -246,6 +257,7 @@ class FewoBookingController extends Controller
|
||||||
//$perDayTotalPrice = $this->calculatePerDayTotalPrice($fewoBookingRequest, $price);
|
//$perDayTotalPrice = $this->calculatePerDayTotalPrice($fewoBookingRequest, $price);
|
||||||
$fewoBookingRequest->setTotalPrice($priceResult['price_total']);
|
$fewoBookingRequest->setTotalPrice($priceResult['price_total']);
|
||||||
|
|
||||||
|
$isPossible = true;
|
||||||
|
|
||||||
if($action == '/buchen')
|
if($action == '/buchen')
|
||||||
{
|
{
|
||||||
|
|
@ -261,16 +273,18 @@ class FewoBookingController extends Controller
|
||||||
$em->persist($reservation);
|
$em->persist($reservation);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
//TODO add to new CRM
|
||||||
$crmBookingUrl = $this->get('app.fewo_booking_exporter')->process($fewoBookingRequest, $lodging, $price, $priceResult);//, $travelDate, $bookingPriceInfo);
|
$crmBookingUrl = $this->get('app.fewo_booking_exporter')->process($fewoBookingRequest, $lodging, $price, $priceResult);//, $travelDate, $bookingPriceInfo);
|
||||||
if (!$crmBookingUrl)
|
if (!$crmBookingUrl)
|
||||||
{
|
{
|
||||||
$crmBookingUrl = '[CRM-EXPORT FEHLGESCHLAGEN]';
|
$crmBookingUrl = '[CRM-EXPORT FEHLGESCHLAGEN]';
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
/* else
|
||||||
{
|
{
|
||||||
$crmBookingUrl = preg_replace('/\\/api/', '', $crmBookingUrl) . '/edit';
|
$crmBookingUrl = preg_replace('/\\/api/', '', $crmBookingUrl) . '/edit';
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
$this->get('mailer')->send(\Swift_Message::newInstance()
|
$this->get('mailer')->send(\Swift_Message::newInstance()
|
||||||
->setSubject('Ihre FeWo-Mietauftrag bei STERN TOURS')
|
->setSubject('Ihre FeWo-Mietauftrag bei STERN TOURS')
|
||||||
->setFrom('stern@stern-tours.de', 'STERN TOURS')
|
->setFrom('stern@stern-tours.de', 'STERN TOURS')
|
||||||
|
|
@ -312,6 +326,7 @@ class FewoBookingController extends Controller
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return $this->render('default/pages/fewoBookingConfirmation.html.twig', [
|
return $this->render('default/pages/fewoBookingConfirmation.html.twig', [
|
||||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||||
'site_loading' => 'bookingconfirm',
|
'site_loading' => 'bookingconfirm',
|
||||||
|
|
|
||||||
253
trunk/src/AppBundle/Entity/CMSContent.php
Normal file
253
trunk/src/AppBundle/Entity/CMSContent.php
Normal file
|
|
@ -0,0 +1,253 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace AppBundle\Entity;
|
||||||
|
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CMSContent
|
||||||
|
*
|
||||||
|
* @ORM\Table(name="c_m_s_contents")
|
||||||
|
* @ORM\Entity(repositoryClass="AppBundle\Entity\CMSContentRepository")
|
||||||
|
*/
|
||||||
|
class CMSContent
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var int
|
||||||
|
*
|
||||||
|
* @ORM\Column(name="id", type="integer")
|
||||||
|
* @ORM\Id
|
||||||
|
* @ORM\GeneratedValue(strategy="AUTO")
|
||||||
|
*/
|
||||||
|
private $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*
|
||||||
|
* @ORM\Column(name="name", type="string", length=255)
|
||||||
|
*/
|
||||||
|
private $name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*
|
||||||
|
* @ORM\Column(name="slug", type="string", length=255, unique=true)
|
||||||
|
*/
|
||||||
|
private $slug;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*
|
||||||
|
* @ORM\Column(name="field", type="string", length=10)
|
||||||
|
*/
|
||||||
|
private $field;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*
|
||||||
|
* @ORM\Column(name="text", type="string", length=255, nullable=true)
|
||||||
|
*/
|
||||||
|
private $text;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*
|
||||||
|
* @ORM\Column(name="full_text", type="text", nullable=true)
|
||||||
|
*/
|
||||||
|
private $fullText;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int
|
||||||
|
*
|
||||||
|
* @ORM\Column(name="integer", type="integer", nullable=true)
|
||||||
|
*/
|
||||||
|
private $integer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*
|
||||||
|
* @ORM\Column(name="decimal", type="decimal", precision=15, scale=2, nullable=true)
|
||||||
|
*/
|
||||||
|
private $decimal;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get id
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function getId()
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set name
|
||||||
|
*
|
||||||
|
* @param string $name
|
||||||
|
*
|
||||||
|
* @return CMSContent
|
||||||
|
*/
|
||||||
|
public function setName($name)
|
||||||
|
{
|
||||||
|
$this->name = $name;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get name
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set slug
|
||||||
|
*
|
||||||
|
* @param string $slug
|
||||||
|
*
|
||||||
|
* @return CMSContent
|
||||||
|
*/
|
||||||
|
public function setSlug($slug)
|
||||||
|
{
|
||||||
|
$this->slug = $slug;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get slug
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getSlug()
|
||||||
|
{
|
||||||
|
return $this->slug;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set field
|
||||||
|
*
|
||||||
|
* @param string $field
|
||||||
|
*
|
||||||
|
* @return CMSContent
|
||||||
|
*/
|
||||||
|
public function setField($field)
|
||||||
|
{
|
||||||
|
$this->field = $field;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get field
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getField()
|
||||||
|
{
|
||||||
|
return $this->field;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set text
|
||||||
|
*
|
||||||
|
* @param string $text
|
||||||
|
*
|
||||||
|
* @return CMSContent
|
||||||
|
*/
|
||||||
|
public function setText($text)
|
||||||
|
{
|
||||||
|
$this->text = $text;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get text
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getText()
|
||||||
|
{
|
||||||
|
return $this->text;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set fullText
|
||||||
|
*
|
||||||
|
* @param string $fullText
|
||||||
|
*
|
||||||
|
* @return CMSContent
|
||||||
|
*/
|
||||||
|
public function setFullText($fullText)
|
||||||
|
{
|
||||||
|
$this->fullText = $fullText;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get fullText
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getFullText()
|
||||||
|
{
|
||||||
|
return $this->fullText;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set integer
|
||||||
|
*
|
||||||
|
* @param integer $integer
|
||||||
|
*
|
||||||
|
* @return CMSContent
|
||||||
|
*/
|
||||||
|
public function setInteger($integer)
|
||||||
|
{
|
||||||
|
$this->integer = $integer;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get integer
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function getInteger()
|
||||||
|
{
|
||||||
|
return $this->integer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set decimal
|
||||||
|
*
|
||||||
|
* @param string $decimal
|
||||||
|
*
|
||||||
|
* @return CMSContent
|
||||||
|
*/
|
||||||
|
public function setDecimal($decimal)
|
||||||
|
{
|
||||||
|
$this->decimal = $decimal;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get decimal
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getDecimal()
|
||||||
|
{
|
||||||
|
return $this->decimal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
25
trunk/src/AppBundle/Entity/CMSContentRepository.php
Normal file
25
trunk/src/AppBundle/Entity/CMSContentRepository.php
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace AppBundle\Entity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CMSContentRepository
|
||||||
|
*
|
||||||
|
* This class was generated by the Doctrine ORM. Add your own custom
|
||||||
|
* repository methods below.
|
||||||
|
*/
|
||||||
|
class CMSContentRepository extends \Doctrine\ORM\EntityRepository
|
||||||
|
{
|
||||||
|
|
||||||
|
public function findBySlug($slug)
|
||||||
|
{
|
||||||
|
$qb = $this->getEntityManager()->createQueryBuilder();
|
||||||
|
$qb->select('c');
|
||||||
|
$qb->from('AppBundle:CMSContent', 'c');
|
||||||
|
$qb->where('c.slug = :slug');
|
||||||
|
$qb->setParameter('slug', $slug);
|
||||||
|
$qb->setMaxResults(1);
|
||||||
|
return $qb->getQuery()->getOneOrNullResult();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -81,6 +81,12 @@ class FewoBookingRequest
|
||||||
|
|
||||||
private $travelerCount;
|
private $travelerCount;
|
||||||
|
|
||||||
|
private $travelerCountAdult;
|
||||||
|
|
||||||
|
|
||||||
|
private $travelerCountChild;
|
||||||
|
|
||||||
|
|
||||||
// private $acceptTerms = false;
|
// private $acceptTerms = false;
|
||||||
|
|
||||||
private $acceptPrivacy = false;
|
private $acceptPrivacy = false;
|
||||||
|
|
@ -314,6 +320,7 @@ class FewoBookingRequest
|
||||||
*/
|
*/
|
||||||
public function getTravelerCount()
|
public function getTravelerCount()
|
||||||
{
|
{
|
||||||
|
$this->travelerCount = $this->travelerCountAdult + $this->travelerCountChild;
|
||||||
return $this->travelerCount;
|
return $this->travelerCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -322,7 +329,40 @@ class FewoBookingRequest
|
||||||
*/
|
*/
|
||||||
public function setTravelerCount($travelerCount)
|
public function setTravelerCount($travelerCount)
|
||||||
{
|
{
|
||||||
$this->travelerCount = $travelerCount;
|
$this->travelerCount = $this->travelerCountAdult + $this->travelerCountChild;
|
||||||
|
// $this->travelerCount = $travelerCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function getTravelerCountAdult()
|
||||||
|
{
|
||||||
|
return $this->travelerCountAdult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed $travelerCountAdult
|
||||||
|
*/
|
||||||
|
public function setTravelerCountAdult($travelerCountAdult)
|
||||||
|
{
|
||||||
|
$this->travelerCountAdult = $travelerCountAdult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function getTravelerCountChild()
|
||||||
|
{
|
||||||
|
return $this->travelerCountChild;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed $travelerCountChild
|
||||||
|
*/
|
||||||
|
public function setTravelerCountChild($travelerCountChild)
|
||||||
|
{
|
||||||
|
$this->travelerCountChild = $travelerCountChild;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,22 @@ class FewoLodging
|
||||||
*/
|
*/
|
||||||
private $maximumPersons;
|
private $maximumPersons;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var integer
|
||||||
|
*
|
||||||
|
* @ORM\Column(name="maximum_adults", type="integer", nullable=false)
|
||||||
|
*/
|
||||||
|
private $maximumAdults;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var integer
|
||||||
|
*
|
||||||
|
* @ORM\Column(name="maximum_childs", type="integer", nullable=false)
|
||||||
|
*/
|
||||||
|
private $maximumChilds;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var float
|
* @var float
|
||||||
*
|
*
|
||||||
|
|
@ -394,6 +410,54 @@ class FewoLodging
|
||||||
return $this->maximumPersons;
|
return $this->maximumPersons;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set maximumAdults
|
||||||
|
*
|
||||||
|
* @param integer $maximumAdults
|
||||||
|
*
|
||||||
|
* @return FewoLodging
|
||||||
|
*/
|
||||||
|
public function setMaximumAdults($maximumAdults)
|
||||||
|
{
|
||||||
|
$this->maximumAdults = $maximumAdults;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get maximumAdults
|
||||||
|
*
|
||||||
|
* @return integer
|
||||||
|
*/
|
||||||
|
public function getMaximumAdults()
|
||||||
|
{
|
||||||
|
return $this->maximumAdults;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set maximumChilds
|
||||||
|
*
|
||||||
|
* @param integer $maximumChilds
|
||||||
|
*
|
||||||
|
* @return FewoLodging
|
||||||
|
*/
|
||||||
|
public function setMaximumChilds($maximumChilds)
|
||||||
|
{
|
||||||
|
$this->maximumChilds = $maximumChilds;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get maximumChilds
|
||||||
|
*
|
||||||
|
* @return integer
|
||||||
|
*/
|
||||||
|
public function getMaximumChilds()
|
||||||
|
{
|
||||||
|
return $this->maximumChilds;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set deposit
|
* Set deposit
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,13 @@ class TravelInsurancePrice
|
||||||
*/
|
*/
|
||||||
private $price;
|
private $price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var float
|
||||||
|
*
|
||||||
|
* @ORM\Column(name="price_old", type="float", precision=10, scale=2, nullable=true)
|
||||||
|
*/
|
||||||
|
private $price_old;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var float
|
* @var float
|
||||||
*
|
*
|
||||||
|
|
@ -33,6 +40,13 @@ class TravelInsurancePrice
|
||||||
*/
|
*/
|
||||||
private $percent;
|
private $percent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var float
|
||||||
|
*
|
||||||
|
* @ORM\Column(name="percent_old", type="float", precision=10, scale=2, nullable=true)
|
||||||
|
*/
|
||||||
|
private $percent_old;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
|
|
@ -109,6 +123,31 @@ class TravelInsurancePrice
|
||||||
return $this->price;
|
return $this->price;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set price_old
|
||||||
|
*
|
||||||
|
* @param float $price_old
|
||||||
|
*
|
||||||
|
* @return TravelInsurancePrice
|
||||||
|
*/
|
||||||
|
public function setPriceOld($price_old)
|
||||||
|
{
|
||||||
|
$this->price_old = $price_old;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get price_old
|
||||||
|
*
|
||||||
|
* @return float
|
||||||
|
*/
|
||||||
|
public function getPriceOld()
|
||||||
|
{
|
||||||
|
return $this->price_old;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set percent
|
* Set percent
|
||||||
*
|
*
|
||||||
|
|
@ -133,6 +172,30 @@ class TravelInsurancePrice
|
||||||
return $this->percent;
|
return $this->percent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set percent_old
|
||||||
|
*
|
||||||
|
* @param float $percent_old
|
||||||
|
*
|
||||||
|
* @return TravelInsurancePrice
|
||||||
|
*/
|
||||||
|
public function setPercentOld($percent_old)
|
||||||
|
{
|
||||||
|
$this->percent_old = $percent_old;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get percent_old
|
||||||
|
*
|
||||||
|
* @return float
|
||||||
|
*/
|
||||||
|
public function getPercentOld()
|
||||||
|
{
|
||||||
|
return $this->percent_old;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set code
|
* Set code
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,9 @@ class ContactSternToursCrmExporter extends SternToursCrmExporter
|
||||||
{
|
{
|
||||||
$this->logger->error(get_class($this). ': Failed submitting contact request to CRM');
|
$this->logger->error(get_class($this). ': Failed submitting contact request to CRM');
|
||||||
$this->logger->error('*** Submitted data: '. json_encode($data));
|
$this->logger->error('*** Submitted data: '. json_encode($data));
|
||||||
$this->logger->error('*** Server response: '. $resp['content']);
|
//var_dump($resp['content']);
|
||||||
|
//die();
|
||||||
|
//$this->logger->error('*** Server response: '. $resp['content']);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $resp['location'] ?? null;
|
return $resp['location'] ?? null;
|
||||||
|
|
|
||||||
|
|
@ -28,25 +28,19 @@ class FewoBookingSternToursCrmExporter extends SternToursCrmExporter
|
||||||
$this->warn('Failed creating lead in CRM', $fewoBookingRequest, Logger::ERROR);
|
$this->warn('Failed creating lead in CRM', $fewoBookingRequest, Logger::ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$bookingUrl = $this->createBooking($fewoBookingRequest, $fewoLodging, $fewoPrice, $priceResult, $lead['customer_id'], $lead['id']);
|
$booking = $this->createBooking($fewoBookingRequest, $fewoLodging, $fewoPrice, $priceResult, $lead->travel_user_id);
|
||||||
if ($bookingUrl === false)
|
if ($booking === null)
|
||||||
{
|
{
|
||||||
$this->warn('Failed creating booking in CRM', $fewoBookingRequest, Logger::ERROR);
|
$this->warn('Failed creating booking in CRM', $fewoBookingRequest, Logger::ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// is out $this->createNewDrafts($booking['crm_url'], $fewoBookingRequest, $fewoLodging, $fewoPrice, $priceResult);
|
||||||
if(!$this->createTraveler($bookingUrl, $fewoBookingRequest))
|
|
||||||
{
|
|
||||||
$this->warn('Failed creating traveler in CRM.', $fewoBookingRequest);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
$this->createNewDrafts($bookingUrl, $fewoBookingRequest, $fewoLodging, $fewoPrice, $priceResult);
|
|
||||||
|
|
||||||
return $bookingUrl;
|
return $booking->crm_url;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function createNewDrafts($bookingUrl, $fewoBookingRequest, $fewoLodging, $fewoPrice, $priceResult){
|
/* private function createNewDrafts($bookingUrl, $fewoBookingRequest, $fewoLodging, $fewoPrice, $priceResult){
|
||||||
//make an request omn the new API
|
//make an request omn the new API
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -61,99 +55,74 @@ class FewoBookingSternToursCrmExporter extends SternToursCrmExporter
|
||||||
if (count($resp) == 0)
|
if (count($resp) == 0)
|
||||||
{
|
{
|
||||||
$this->warn('Failed retrieving newly created new draft object', $fewoBookingRequest);
|
$this->warn('Failed retrieving newly created new draft object', $fewoBookingRequest);
|
||||||
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
return $resp;
|
return $resp;
|
||||||
|
|
||||||
}
|
} */
|
||||||
|
|
||||||
|
|
||||||
private function createLead(FewoBookingRequest $fewoBookingRequest)
|
private function createLead(FewoBookingRequest $fewoBookingRequest)
|
||||||
{
|
{
|
||||||
$resp = $this->httpPost('lead', ['lead' => [
|
$resp = $this->httpPostAPIv3('fewo/create_travel_users',
|
||||||
'customerForm' => [
|
['travel_user' => [
|
||||||
'salutation_id' => $fewoBookingRequest->getSalutation(),
|
'salutation_id' => $fewoBookingRequest->getSalutation(),
|
||||||
'name' => $fewoBookingRequest->getLastName(), // required
|
'first_name' => $fewoBookingRequest->getFirstName(),
|
||||||
'firstname' => $fewoBookingRequest->getFirstName(),
|
'last_name' => $fewoBookingRequest->getLastName(),
|
||||||
'street' => $fewoBookingRequest->getStreetAddress(),
|
'street' => $fewoBookingRequest->getStreetAddress(),
|
||||||
'zip' => $fewoBookingRequest->getZipCode(),
|
'zipcode' => $fewoBookingRequest->getZipCode(),
|
||||||
'city' => $fewoBookingRequest->getCity(),
|
'city' => $fewoBookingRequest->getCity(),
|
||||||
'country_id' => $fewoBookingRequest->getNation(), // required
|
'travel_nationality_id' => $fewoBookingRequest->getNation(),
|
||||||
'phone' => $fewoBookingRequest->getPhone(),
|
'phone' => $fewoBookingRequest->getPhone(),
|
||||||
'fax' => $fewoBookingRequest->getFax(),
|
'fax' => $fewoBookingRequest->getFax(),
|
||||||
'email' => $fewoBookingRequest->getEmail()
|
'email' => $fewoBookingRequest->getEmail()
|
||||||
],
|
],
|
||||||
'request_date' => (new \DateTime())->format('Y-m-d'), // required
|
]
|
||||||
'sf_guard_user_id' => self::API_USER_ID,
|
);
|
||||||
'status_id' => 7, // 'gebucht'
|
if (count($resp) == 0)
|
||||||
'travelperiod_start' => $fewoBookingRequest->getFromDate()->format('Y-m-d'),
|
|
||||||
'travelperiod_end' => $fewoBookingRequest->getToDate()->format('Y-m-d'),
|
|
||||||
//'travelcategory_id'
|
|
||||||
'is_closed' => 1,
|
|
||||||
'website_id' => self::WEBSITE_ID,
|
|
||||||
'initialcontacttype_id' => 14,
|
|
||||||
// 'travelperiod_length
|
|
||||||
'remarks' => $fewoBookingRequest->getNotes()
|
|
||||||
]]);
|
|
||||||
|
|
||||||
//Util::varDump($resp);
|
|
||||||
//die();
|
|
||||||
|
|
||||||
if ($resp['success'])
|
|
||||||
{
|
{
|
||||||
$ret = $this->httpGet($resp['location']);
|
$this->warn('Failed retrieving newly created new draft object', $fewoBookingRequest);
|
||||||
if ($ret == null)
|
|
||||||
{
|
|
||||||
$this->warn('Failed retrieving newly created lead object', $fewoBookingRequest);
|
|
||||||
}
|
|
||||||
return $ret;
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
return $resp;
|
||||||
|
}
|
||||||
|
|
||||||
private function createBooking(FewoBookingRequest $fewoBookingRequest, FewoLodging $lodging, FewoPrice $price, $priceResult, $customerId, $leadId)
|
private function createBooking(FewoBookingRequest $fewoBookingRequest, FewoLodging $lodging, FewoPrice $price, $priceResult, $travel_user_id)
|
||||||
{
|
{
|
||||||
$resp = $this->httpPost('booking', ['booking' => [
|
$resp = $this->httpPostAPIv3('fewo/create_fewo_booking',
|
||||||
'booking_date' => (new \DateTime())->format('Y-m-d'),
|
['travel_user_booking_fewo' => [
|
||||||
'customer_id' => $customerId,
|
'travel_user_id' => $travel_user_id,
|
||||||
'lead_id' => $leadId,
|
'fewo_lodging_id' => $lodging->getId(),
|
||||||
'travel_country_id' => 27,
|
'invoice_number' => '',
|
||||||
'travel_category_id' => 7,
|
'persons' => $fewoBookingRequest->getTravelerCount(),
|
||||||
'travel_company_id' => 1,
|
'adults' => $fewoBookingRequest->getTravelerCountAdult(),
|
||||||
'travelagenda_id' => 109,
|
'children' => $fewoBookingRequest->getTravelerCountChild(),
|
||||||
'sf_guard_user_id' => self::API_USER_ID,
|
// 'booking_date' => now(),
|
||||||
'branch_id' => 4,
|
'from_date' => $fewoBookingRequest->getFromDate()->format('Y-m-d'),
|
||||||
'website_id' => self::WEBSITE_ID,
|
'to_date' => $fewoBookingRequest->getToDate()->format('Y-m-d'),
|
||||||
'title' => $lodging->getName(),
|
'daily_prices' => $priceResult['season'],
|
||||||
'start_date' => $fewoBookingRequest->getFromDate()->format('Y-m-d'), // required
|
'price_travel' => $priceResult['total'],
|
||||||
'end_date' => $fewoBookingRequest->getToDate()->format('Y-m-d'), // required
|
'price_deposit' => $priceResult['deposit'],
|
||||||
'pax' => $fewoBookingRequest->getTravelerCount(),
|
'price_service' => $priceResult['flatPrice'],
|
||||||
'travel_number' => substr($price->getSeason()->getName(), 0, 30),
|
|
||||||
'price' => $priceResult['total'],
|
|
||||||
'price_total' => $priceResult['total_price'],
|
'price_total' => $priceResult['total_price'],
|
||||||
'participant_salutation_id' => $fewoBookingRequest->getSalutation(),
|
'notice' => $fewoBookingRequest->getNotes(),
|
||||||
'participant_name' => $fewoBookingRequest->getLastName(),
|
'travel_booking_fewo_channel_id' => 7,
|
||||||
'participant_firstname' => $fewoBookingRequest->getFirstName(),
|
'is_calendar_fewo_direct' => false,
|
||||||
//'participant_birthdate' => $bookingRequest->getTravelers()[0]->getBirthDate(),
|
'is_calendar_hrs' => false,
|
||||||
'new_drafts' => true,
|
'is_calendar_stern_tours' => true,
|
||||||
|
'status' => false,
|
||||||
|
'status_text' => "",
|
||||||
]]);
|
]]);
|
||||||
|
|
||||||
if (!$resp['success'])
|
if (count($resp) == 0)
|
||||||
{
|
{
|
||||||
return false;
|
$this->warn('Failed retrieving newly created new draft object', $fewoBookingRequest);
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
return $resp['location'];
|
return $resp;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function createTraveler($bookingUrl, FewoBookingRequest $fewoBookingRequest)
|
|
||||||
{
|
|
||||||
$resp = $this->httpPost($bookingUrl .'/participant.json', ['participant' => [
|
|
||||||
'participant_salutation_id' => $fewoBookingRequest->getSalutation(),
|
|
||||||
'participant_name' => $fewoBookingRequest->getLastName(),
|
|
||||||
'participant_firstname' => $fewoBookingRequest->getFirstName(),
|
|
||||||
//'participant_birthdate' => $traveler->getBirthDate(),
|
|
||||||
]], true);
|
|
||||||
return $resp['success'];
|
|
||||||
}
|
|
||||||
|
|
||||||
private function warn($msg, FewoBookingRequest $fewoBookingRequest = null, $level = Logger::WARNING)
|
private function warn($msg, FewoBookingRequest $fewoBookingRequest = null, $level = Logger::WARNING)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,6 @@ abstract class SternToursCrmExporter
|
||||||
|
|
||||||
protected final function loadFromApi($action, $postData){
|
protected final function loadFromApi($action, $postData){
|
||||||
|
|
||||||
|
|
||||||
//first - login and get token
|
//first - login and get token
|
||||||
$baseUrl = self::API_v3_URL.'api/';
|
$baseUrl = self::API_v3_URL.'api/';
|
||||||
if($_SERVER['HTTP_HOST'] == 'sterntours.local') {
|
if($_SERVER['HTTP_HOST'] == 'sterntours.local') {
|
||||||
|
|
@ -99,7 +98,6 @@ abstract class SternToursCrmExporter
|
||||||
$result = curl_exec($ch);
|
$result = curl_exec($ch);
|
||||||
$r = json_decode($result);
|
$r = json_decode($result);
|
||||||
if($r->success) {
|
if($r->success) {
|
||||||
|
|
||||||
//api URL
|
//api URL
|
||||||
$data = json_encode($postData);
|
$data = json_encode($postData);
|
||||||
//var_dump($data);
|
//var_dump($data);
|
||||||
|
|
@ -109,14 +107,16 @@ abstract class SternToursCrmExporter
|
||||||
curl_setopt($ch, CURLOPT_URL, $baseUrl.$action);
|
curl_setopt($ch, CURLOPT_URL, $baseUrl.$action);
|
||||||
$result = curl_exec($ch);
|
$result = curl_exec($ch);
|
||||||
$r = json_decode($result);
|
$r = json_decode($result);
|
||||||
// var_dump($r);
|
//var_dump($r);
|
||||||
if($r->success) {
|
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
|
if(isset($r->success)) {
|
||||||
return $r->success;
|
return $r->success;
|
||||||
}
|
}
|
||||||
|
if(isset($r->error)) {
|
||||||
|
$this->logger->warn('*** v3 Error: '.$r->error);
|
||||||
|
return $r->error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ class ContactRequestType extends AbstractType
|
||||||
],
|
],
|
||||||
'required' => false,
|
'required' => false,
|
||||||
])
|
])
|
||||||
->add('notes', TextareaType::class, ['required' => false])
|
->add('notes', TextareaType::class, ['required' => false, 'attr' => ['max_length' => 100]])
|
||||||
->add('departure0')
|
->add('departure0')
|
||||||
->add('departure1')
|
->add('departure1')
|
||||||
->add('departure2')
|
->add('departure2')
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@ use Symfony\Component\Validator\Constraints\Choice;
|
||||||
use Symfony\Component\Validator\Constraints\NotNull;
|
use Symfony\Component\Validator\Constraints\NotNull;
|
||||||
use Symfony\Component\Validator\Constraints\Email;
|
use Symfony\Component\Validator\Constraints\Email;
|
||||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||||
|
use AppBundle\Entity\TravelNationality;
|
||||||
|
|
||||||
|
|
||||||
class FewoBookingRequestType extends AbstractType
|
class FewoBookingRequestType extends AbstractType
|
||||||
{
|
{
|
||||||
|
|
@ -37,14 +39,7 @@ class FewoBookingRequestType extends AbstractType
|
||||||
'Frau' => 2
|
'Frau' => 2
|
||||||
];
|
];
|
||||||
|
|
||||||
public static $NATION_CHOICES = [
|
public static $NATIONALITY_CHOICES = [];
|
||||||
'Deutschland' => 27,
|
|
||||||
'Österreich' => 34,
|
|
||||||
'Schweiz' => 181,
|
|
||||||
'Niederlande' => 196,
|
|
||||||
'Sonstiges' => 197,
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
|
@ -54,6 +49,9 @@ class FewoBookingRequestType extends AbstractType
|
||||||
$resolver->setDefaults([
|
$resolver->setDefaults([
|
||||||
'lodging' => null,
|
'lodging' => null,
|
||||||
'maxPersons' => null,
|
'maxPersons' => null,
|
||||||
|
'maxAdults' => null,
|
||||||
|
'maxChilds' => null,
|
||||||
|
'nationalities' => null,
|
||||||
'toDate' => null,
|
'toDate' => null,
|
||||||
'fromDate' => null,
|
'fromDate' => null,
|
||||||
'data_class' => 'AppBundle\Entity\FewoBookingRequest',
|
'data_class' => 'AppBundle\Entity\FewoBookingRequest',
|
||||||
|
|
@ -72,6 +70,9 @@ class FewoBookingRequestType extends AbstractType
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$maxPersons = $options['maxPersons'];
|
$maxPersons = $options['maxPersons'];
|
||||||
|
$maxAdults = $options['maxAdults'];
|
||||||
|
$maxChilds = $options['maxChilds'];
|
||||||
|
|
||||||
$fromDate= $options['fromDate'];
|
$fromDate= $options['fromDate'];
|
||||||
$toDate = $options['toDate'];
|
$toDate = $options['toDate'];
|
||||||
$fromDateDateTime = new \DateTime($fromDate);
|
$fromDateDateTime = new \DateTime($fromDate);
|
||||||
|
|
@ -82,6 +83,14 @@ class FewoBookingRequestType extends AbstractType
|
||||||
'1' => 1,
|
'1' => 1,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$TRAVELERS_ADULTS = [
|
||||||
|
'1' => 1,
|
||||||
|
];
|
||||||
|
|
||||||
|
$TRAVELERS_CHILDS = [
|
||||||
|
'0' => 0,
|
||||||
|
];
|
||||||
|
|
||||||
if($maxPersons > 1)
|
if($maxPersons > 1)
|
||||||
{
|
{
|
||||||
for($i = 2; $i <= $maxPersons; $i++)
|
for($i = 2; $i <= $maxPersons; $i++)
|
||||||
|
|
@ -90,6 +99,31 @@ class FewoBookingRequestType extends AbstractType
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($maxAdults > 1)
|
||||||
|
{
|
||||||
|
for($i = 2; $i <= $maxAdults; $i++)
|
||||||
|
{
|
||||||
|
$TRAVELERS_ADULTS[] = $i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($maxChilds > 1)
|
||||||
|
{
|
||||||
|
for($i = 1; $i <= $maxChilds; $i++)
|
||||||
|
{
|
||||||
|
$TRAVELERS_CHILDS[] = $i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!count(self::$NATIONALITY_CHOICES)){
|
||||||
|
$nationalities = $options['nationalities'];
|
||||||
|
if($nationalities){
|
||||||
|
foreach ($nationalities as $nationality){
|
||||||
|
self::$NATIONALITY_CHOICES[$nationality['name']] = $nationality['id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$builder
|
$builder
|
||||||
->add('fromDate', StDateType::class, [
|
->add('fromDate', StDateType::class, [
|
||||||
//options
|
//options
|
||||||
|
|
@ -112,10 +146,24 @@ class FewoBookingRequestType extends AbstractType
|
||||||
->add('travelerCount', ChoiceType::class, [
|
->add('travelerCount', ChoiceType::class, [
|
||||||
'choices' => $TRAVELERS_CHOICES,
|
'choices' => $TRAVELERS_CHOICES,
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
new NotNull(),
|
// new NotNull(),
|
||||||
new Choice(['choices' => $TRAVELERS_CHOICES])
|
new Choice(['choices' => $TRAVELERS_CHOICES])
|
||||||
]
|
]
|
||||||
])
|
])
|
||||||
|
->add('travelerCountAdult', ChoiceType::class, [
|
||||||
|
'choices' => $TRAVELERS_ADULTS,
|
||||||
|
'constraints' => [
|
||||||
|
new NotNull(),
|
||||||
|
new Choice(['choices' => $TRAVELERS_ADULTS])
|
||||||
|
]
|
||||||
|
])
|
||||||
|
->add('travelerCountChild', ChoiceType::class, [
|
||||||
|
'choices' => $TRAVELERS_CHILDS,
|
||||||
|
'constraints' => [
|
||||||
|
new NotNull(),
|
||||||
|
new Choice(['choices' => $TRAVELERS_CHILDS])
|
||||||
|
]
|
||||||
|
])
|
||||||
->add('salutation', ChoiceType::class,[
|
->add('salutation', ChoiceType::class,[
|
||||||
'choices' => self::$SALUTATION_CHOICES,
|
'choices' => self::$SALUTATION_CHOICES,
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
|
|
@ -126,10 +174,10 @@ class FewoBookingRequestType extends AbstractType
|
||||||
->add('firstName')
|
->add('firstName')
|
||||||
->add('lastName')
|
->add('lastName')
|
||||||
->add('nation', ChoiceType::class, [
|
->add('nation', ChoiceType::class, [
|
||||||
'choices' => self::$NATION_CHOICES,
|
'choices' => self::$NATIONALITY_CHOICES,
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
new NotNull(),
|
new NotNull(),
|
||||||
new Choice(['choices' => self::$NATION_CHOICES])
|
new Choice(['choices' => self::$NATIONALITY_CHOICES])
|
||||||
]
|
]
|
||||||
])
|
])
|
||||||
->add('streetAddress')
|
->add('streetAddress')
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,12 @@ class FewoLodgingType extends AbstractType
|
||||||
->add('maximumPersons', TextType::class, [
|
->add('maximumPersons', TextType::class, [
|
||||||
'required' => true,
|
'required' => true,
|
||||||
])
|
])
|
||||||
|
->add('maximumAdults', TextType::class, [
|
||||||
|
'required' => true,
|
||||||
|
])
|
||||||
|
->add('maximumChilds', TextType::class, [
|
||||||
|
'required' => true,
|
||||||
|
])
|
||||||
->add('deposit', null, [
|
->add('deposit', null, [
|
||||||
'required' => true,
|
'required' => true,
|
||||||
])
|
])
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ class KernelControllerListener
|
||||||
$session = $request->getSession();
|
$session = $request->getSession();
|
||||||
$request->attributes->set('_open_side_about', 'open');
|
$request->attributes->set('_open_side_about', 'open');
|
||||||
if($session->get('time')){
|
if($session->get('time')){
|
||||||
$request->attributes->set('_open_side_about', 'closed');
|
$request->attributes->set('_open_side_about', '');
|
||||||
}
|
}
|
||||||
$session->set('time', time());
|
$session->set('time', time());
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -55,4 +55,22 @@
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
.home-info-box {
|
||||||
|
float: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.cc-window.cc-floating {
|
||||||
|
padding: 1em 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cc-window {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.3em;
|
||||||
}
|
}
|
||||||
|
|
@ -3,14 +3,15 @@
|
||||||
|
|
||||||
var collapse_on_responsive = function() {
|
var collapse_on_responsive = function() {
|
||||||
if (jQuery(document).width() < 992) {
|
if (jQuery(document).width() < 992) {
|
||||||
jQuery('.widget').find('.collapse-widget:not(.closed)').addClass('collapsed');
|
jQuery('.widget').find('.collapse-widget:not(.open)').addClass('collapsed');
|
||||||
jQuery('.widget').find('.collapse:not(.closed)').removeClass('in');
|
jQuery('.widget').find('.collapse:not(.open)').removeClass('in');
|
||||||
}else{
|
}else{
|
||||||
jQuery('.widget').find('.collapse-widget:not(.closed)').removeClass('collapsed');
|
jQuery('.widget').find('.collapse-widget').removeClass('collapsed');
|
||||||
jQuery('.widget').find('.collapse:not(.closed)').addClass('in');
|
jQuery('.widget').find('.collapse').addClass('in');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
collapse_on_responsive();
|
collapse_on_responsive();
|
||||||
|
|
||||||
$(window).on('resize',function(e){
|
$(window).on('resize',function(e){
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ namespace AppBundle\Twig;
|
||||||
|
|
||||||
use AppBundle\Service\KeywordService;
|
use AppBundle\Service\KeywordService;
|
||||||
use AppBundle\Util;
|
use AppBundle\Util;
|
||||||
|
use Doctrine\ORM\EntityManager;
|
||||||
use Symfony\Component\HttpFoundation\RequestStack;
|
use Symfony\Component\HttpFoundation\RequestStack;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
|
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
|
||||||
|
|
@ -20,12 +21,14 @@ class AppExtension extends \Twig_Extension
|
||||||
private $keywordService;
|
private $keywordService;
|
||||||
private $requestStack;
|
private $requestStack;
|
||||||
private $template;
|
private $template;
|
||||||
|
protected $em;
|
||||||
|
|
||||||
public function __construct(\Twig_Environment $env, KeywordService $keywordService, RequestStack $requestStack)
|
public function __construct(\Twig_Environment $env, KeywordService $keywordService, RequestStack $requestStack, EntityManager $em)
|
||||||
{
|
{
|
||||||
$this->environment = $env;
|
$this->environment = $env;
|
||||||
$this->keywordService = $keywordService;
|
$this->keywordService = $keywordService;
|
||||||
$this->requestStack = $requestStack;
|
$this->requestStack = $requestStack;
|
||||||
|
$this->em = $em;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilters()
|
public function getFilters()
|
||||||
|
|
@ -55,6 +58,8 @@ class AppExtension extends \Twig_Extension
|
||||||
'get_base_template' => new \Twig_SimpleFunction('get_base_template', [$this, 'getBaseTemplate']),
|
'get_base_template' => new \Twig_SimpleFunction('get_base_template', [$this, 'getBaseTemplate']),
|
||||||
'get_base_url' => new \Twig_SimpleFunction('get_base_url', [$this, 'getBaseUrl']),
|
'get_base_url' => new \Twig_SimpleFunction('get_base_url', [$this, 'getBaseUrl']),
|
||||||
'get_file_last_time' => new \Twig_SimpleFunction('get_file_last_time', [$this, 'getFileLastTime']),
|
'get_file_last_time' => new \Twig_SimpleFunction('get_file_last_time', [$this, 'getFileLastTime']),
|
||||||
|
'get_content_by_slug' => new \Twig_SimpleFunction('getContextBySlug', [$this, 'getContentBySlug'])
|
||||||
|
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
@ -81,11 +86,33 @@ class AppExtension extends \Twig_Extension
|
||||||
return date("Ymd", time());
|
return date("Ymd", time());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getContentBySlug($slug)
|
||||||
|
{
|
||||||
|
$repo = $this->em->getRepository('AppBundle:CMSContent');
|
||||||
|
$re = $repo->findBySlug($slug);
|
||||||
|
if($re){
|
||||||
|
switch ($re->getField()){
|
||||||
|
case 'text':
|
||||||
|
return $re->getText();
|
||||||
|
|
||||||
|
case 'full_text':
|
||||||
|
return $re->getFullText();
|
||||||
|
|
||||||
|
case 'integer':
|
||||||
|
return $re->getInteger();
|
||||||
|
|
||||||
|
case 'decimal':
|
||||||
|
return $re->getDecimal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public function getBaseUrl()
|
public function getBaseUrl()
|
||||||
{
|
{
|
||||||
return Util::getBaseUrl();
|
return Util::getBaseUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function formField($form, $label = null, $opt = null)
|
public function formField($form, $label = null, $opt = null)
|
||||||
{
|
{
|
||||||
$this->template = $this->environment->loadTemplate('::default/form/helpers.html.twig');
|
$this->template = $this->environment->loadTemplate('::default/form/helpers.html.twig');
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ namespace AppBundle;
|
||||||
|
|
||||||
use AppBundle\Entity\BreadcrumbEntry;
|
use AppBundle\Entity\BreadcrumbEntry;
|
||||||
use AppBundle\Entity\Page;
|
use AppBundle\Entity\Page;
|
||||||
|
use Doctrine\ORM\EntityManager;
|
||||||
|
|
||||||
class Util
|
class Util
|
||||||
{
|
{
|
||||||
|
|
@ -48,8 +49,6 @@ class Util
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static function getBaseUrl()
|
public static function getBaseUrl()
|
||||||
{
|
{
|
||||||
return 'http' . (($_SERVER['SERVER_PORT'] == 443) ? 's://' : '://') .$_SERVER['HTTP_HOST'];
|
return 'http' . (($_SERVER['SERVER_PORT'] == 443) ? 's://' : '://') .$_SERVER['HTTP_HOST'];
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
2
trunk/web/js/custom-min.js
vendored
2
trunk/web/js/custom-min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue