helpers bug fix
checkout order page view events with images api categories and events routes cache category children scope event seans count
This commit is contained in:
parent
f77504bfeb
commit
69eabbae71
|
|
@ -62,3 +62,30 @@ if(!function_exists('organisers')){
|
|||
return \Illuminate\Support\Facades\Auth::user()->account->organisers;
|
||||
}
|
||||
}
|
||||
if ( ! function_exists('sanitise')) {
|
||||
/**
|
||||
* @param string $input
|
||||
* @return string
|
||||
*/
|
||||
function sanitise($input)
|
||||
{
|
||||
$clear = clean($input); // Package to remove code "mews/purifier"
|
||||
$clear = strip_tags($clear);
|
||||
$clear = html_entity_decode($clear);
|
||||
$clear = urldecode($clear);
|
||||
$clear = preg_replace('~[\r\n\t]+~', ' ', trim($clear));
|
||||
$clear = preg_replace('/ +/', ' ', $clear);
|
||||
return $clear;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $input
|
||||
* @return string
|
||||
*/
|
||||
function clean_whitespace($input)
|
||||
{
|
||||
$clear = preg_replace('~[\r\n\t]+~', ' ', trim($input));
|
||||
$clear = preg_replace('/ +/', ' ', $clear);
|
||||
return $clear;
|
||||
}
|
||||
}
|
||||
|
|
@ -280,8 +280,8 @@ class EventCheckoutController extends Controller
|
|||
return view('Public.ViewEvent.Embedded.EventPageCheckout', $data); // <--- todo check this out
|
||||
}
|
||||
|
||||
return view('Public.ViewEvent.EventPageCheckout', $data);
|
||||
// return view('Bilettm.ViewEvent.EventPageCheckout', $data);
|
||||
// return view('Public.ViewEvent.EventPageCheckout', $data);
|
||||
return view('Bilettm.ViewEvent.CheckoutPage', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -381,7 +381,7 @@ class EventCheckoutController extends Controller
|
|||
$orderService->calculateFinalCosts();
|
||||
$secondsToExpire = Carbon::now()->diffInSeconds($order_session['expires']);
|
||||
$transaction_data += [
|
||||
'amount' => $orderService->getGrandTotal()*100,//todo multiply by 100
|
||||
'amount' => $orderService->getGrandTotal()*1,//todo multiply by 100
|
||||
'currency' => 934,
|
||||
'sessionTimeoutSecs' => $secondsToExpire,
|
||||
'description' => 'Order for customer: ' . $request->get('order_email'),
|
||||
|
|
@ -584,17 +584,17 @@ class EventCheckoutController extends Controller
|
|||
$order->is_payment_received = isset($request_data['pay_offline']) ? 0 : 1;
|
||||
|
||||
// Business details is selected, we need to save the business details
|
||||
if (isset($request_data['is_business']) && (bool)$request_data['is_business']) {
|
||||
$order->is_business = $request_data['is_business'];
|
||||
$order->business_name = sanitise($request_data['business_name']);
|
||||
$order->business_tax_number = sanitise($request_data['business_tax_number']);
|
||||
$order->business_address_line_one = sanitise($request_data['business_address_line1']);
|
||||
$order->business_address_line_two = sanitise($request_data['business_address_line2']);
|
||||
$order->business_address_state_province = sanitise($request_data['business_address_state']);
|
||||
$order->business_address_city = sanitise($request_data['business_address_city']);
|
||||
$order->business_address_code = sanitise($request_data['business_address_code']);
|
||||
|
||||
}
|
||||
// if (isset($request_data['is_business']) && (bool)$request_data['is_business']) {
|
||||
// $order->is_business = $request_data['is_business'];
|
||||
// $order->business_name = sanitise($request_data['business_name']);
|
||||
// $order->business_tax_number = sanitise($request_data['business_tax_number']);
|
||||
// $order->business_address_line_one = sanitise($request_data['business_address_line1']);
|
||||
// $order->business_address_line_two = sanitise($request_data['business_address_line2']);
|
||||
// $order->business_address_state_province = sanitise($request_data['business_address_state']);
|
||||
// $order->business_address_city = sanitise($request_data['business_address_city']);
|
||||
// $order->business_address_code = sanitise($request_data['business_address_code']);
|
||||
//
|
||||
// }
|
||||
|
||||
// Calculating grand total including tax
|
||||
$orderService = new OrderService($ticket_order['order_total'], $ticket_order['total_booking_fee'], $event);
|
||||
|
|
@ -790,7 +790,7 @@ class EventCheckoutController extends Controller
|
|||
return view('Public.ViewEvent.Embedded.EventPageViewOrder', $data);
|
||||
}
|
||||
|
||||
return view('Public.ViewEvent.EventPageViewOrder', $data);
|
||||
return view('Bilettm.ViewEvent.ViewOrderPage', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ class PublicController extends Controller
|
|||
$e_query->whereDate('start_date','>=',Carbon::parse($date));
|
||||
}
|
||||
|
||||
$events = $e_query->paginate(10);
|
||||
$events = $e_query->with('images')->paginate(1);
|
||||
$navigation = $nav_query->get();
|
||||
// dd($events);
|
||||
return view('Bilettm.Public.EventsPage')->with([
|
||||
|
|
@ -88,7 +88,7 @@ class PublicController extends Controller
|
|||
public function search(SearchRequest $request){
|
||||
//todo implement with elastick search and scout
|
||||
$query = $request->get('q');
|
||||
$events = Event::where('title','like',"%{$query}%")->get();
|
||||
$events = Event::where('title','like',"%{$query}%")->paginate(10);
|
||||
|
||||
return view('Bilettm.Public.SearchResults')
|
||||
->with([
|
||||
|
|
|
|||
|
|
@ -1,19 +1,23 @@
|
|||
<?php
|
||||
|
||||
Route::group(['prefix' => 'api', 'middleware' => 'auth:api'], function () {
|
||||
Route::group(['prefix' => 'api'], function () {
|
||||
|
||||
/*
|
||||
* ---------------
|
||||
* Organisers
|
||||
* ---------------
|
||||
*/
|
||||
Route::get('category/{parent_id?}','API\PublicController@getCategories');
|
||||
Route::get('events/{cat_id?}','API\PublicController@getEvents');
|
||||
|
||||
Route::group(['prefix' =>'admin', 'middleware' => 'auth:api'], function (){
|
||||
/*
|
||||
* ---------------
|
||||
* Organisers
|
||||
* ---------------
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* ---------------
|
||||
* Events
|
||||
* ---------------
|
||||
*/
|
||||
/*
|
||||
* ---------------
|
||||
* Events
|
||||
* ---------------
|
||||
*/
|
||||
Route::resource('events', 'API\EventsApiController');
|
||||
|
||||
|
||||
|
|
@ -44,11 +48,11 @@ Route::group(['prefix' => 'api', 'middleware' => 'auth:api'], function () {
|
|||
*/
|
||||
|
||||
|
||||
Route::get('/', function () {
|
||||
return response()->json([
|
||||
'Hello' => Auth::guard('api')->user()->full_name . '!'
|
||||
]);
|
||||
// Route::get('/', function () {
|
||||
// return response()->json([
|
||||
// 'Hello' => Auth::guard('api')->user()->full_name . '!'
|
||||
// ]);
|
||||
// });
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
|
@ -41,16 +41,6 @@ Route::group(
|
|||
'as' => 'logout',
|
||||
]);
|
||||
|
||||
|
||||
Route::get('/terms_and_conditions', [
|
||||
'as' => 'termsAndConditions',
|
||||
function () {
|
||||
return 'TODO: add terms and cond';
|
||||
}
|
||||
]);
|
||||
|
||||
|
||||
|
||||
Route::group(['middleware' => ['installed']], function () {
|
||||
|
||||
/*
|
||||
|
|
@ -344,28 +334,11 @@ Route::group(
|
|||
]
|
||||
);
|
||||
|
||||
Route::get('{event_id}', function ($event_id) {
|
||||
return Redirect::route('showEventDashboard', [
|
||||
'event_id' => $event_id,
|
||||
]);
|
||||
});
|
||||
Route::get('{event_id}', 'EventDashboardController@showDashboard');
|
||||
|
||||
/*
|
||||
* @todo Move to a controller
|
||||
*/
|
||||
Route::get('{event_id}/go_live', [
|
||||
'as' => 'MakeEventLive',
|
||||
function ($event_id) {
|
||||
$event = \App\Models\Event::scope()->findOrFail($event_id);
|
||||
$event->is_live = 1;
|
||||
$event->save();
|
||||
\Session::flash('message',
|
||||
'Event Successfully Made Live! You can undo this action in event settings page.');
|
||||
|
||||
return Redirect::route('showEventDashboard', [
|
||||
'event_id' => $event_id,
|
||||
]);
|
||||
}
|
||||
'uses'=>'EventController@makeEventLive'
|
||||
]);
|
||||
|
||||
/*
|
||||
|
|
@ -748,16 +721,13 @@ Route::group(
|
|||
'uses' =>'PublicController@subscribe'
|
||||
]);
|
||||
|
||||
Route::get('/terms_and_conditions', [
|
||||
'as' => 'termsAndConditions',
|
||||
function () {
|
||||
return 'TODO: add terms and cond';
|
||||
}
|
||||
]);
|
||||
// Route::get('/terms_and_conditions', [
|
||||
// 'as' => 'termsAndConditions',
|
||||
// function () {
|
||||
// return 'TODO: add terms and cond';
|
||||
// }
|
||||
// ]);
|
||||
|
||||
Route::get('/itemlist', function (){
|
||||
return view('Bilettm.Partials.ItemsList');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class GenerateTicket extends Job implements ShouldQueue
|
|||
Log::info("Ticket generated!");
|
||||
} catch(\Exception $e) {
|
||||
Log::error("Error generating ticket. This can be due to permissions on vendor/nitmedia/wkhtml2pdf/src/Nitmedia/Wkhtml2pdf/lib. This folder requires write and execute permissions for the web user");
|
||||
Log::error("Error message. " . $e->getMessage());
|
||||
Log::error("Error message. " . $e->getMessage()); //Path must be absolute ("/tmp/")
|
||||
Log::error("Error stack trace" . $e->getTraceAsString());
|
||||
$this->fail($e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use App\Models\Order;
|
|||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class SendOrderNotification extends Job implements ShouldQueue
|
||||
{
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ class Category extends \Illuminate\Database\Eloquent\Model{
|
|||
return $query->where('depth',2)->orderBy('lft','asc');
|
||||
}
|
||||
|
||||
public function getChildren($parent_id){
|
||||
return $this->where('parent_id',$parent_id)->orderBy('lft','asc');
|
||||
public function scopeChildren($query,$parent_id){
|
||||
return $query->where('parent_id',$parent_id)->orderBy('lft','asc');
|
||||
}
|
||||
|
||||
public function parent(){
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ class Event extends MyBaseModel
|
|||
*/
|
||||
public function getCurrencySymbolAttribute()
|
||||
{
|
||||
return $this->currency->symbol_left;
|
||||
return $this->currency->symbol_left ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -451,6 +451,9 @@ ICSTemplate;
|
|||
return $icsTemplate;
|
||||
}
|
||||
|
||||
public function getSeansCount(){
|
||||
return $this->tickets()->distinct()->orderBy('ticket_date')->count();
|
||||
}
|
||||
/**
|
||||
* @param integer $accessCodeId
|
||||
* @return bool
|
||||
|
|
@ -475,6 +478,6 @@ ICSTemplate;
|
|||
|
||||
public function scopeOnLive($query){
|
||||
$query->whereDate('end_date','>',Carbon::now('Asia/Ashgabat'));
|
||||
return $query->where('is_live',1);
|
||||
return $query->where('is_live',1)->with('images');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ return array (
|
|||
'event_title' => 'Event Title',
|
||||
'event_title_placeholder' => 'E.g: :name\'s Interational Conference',
|
||||
'event_visibility' => 'Event Visibility',
|
||||
'go_live' => 'Event Successfully Made Live! You can undo this action in event settings page.',
|
||||
'n_attendees_for_event' => ':num Attendee(s) for event: :name (:date)',
|
||||
'no_events_yet' => 'No Event Yet!',
|
||||
'no_events_yet_text' => 'Looks like you have yet to create an event. You can create one by clicking the button below.',
|
||||
|
|
|
|||
|
|
@ -44,13 +44,19 @@
|
|||
@yield('after_scripts')
|
||||
|
||||
@stack('after_scripts')
|
||||
{!!HTML::script(config('attendize.cdn_url_static_assets').'/assets/javascript/frontend.js')!!}
|
||||
<script>
|
||||
$('document').ready(function(){
|
||||
$('#top-header-submit').click(function(){
|
||||
$('#main-header-search-form').submit();
|
||||
})
|
||||
});
|
||||
|
||||
function showMessage(message) {
|
||||
humane.log(message, {
|
||||
timeoutAfterMove: 3000,
|
||||
waitForMove: true
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@if(session()->get('message'))
|
||||
<script>showMessage('{{\Session::get('message')}}');</script>
|
||||
|
|
|
|||
|
|
@ -6,10 +6,9 @@
|
|||
<div class="col-md-6 col-lg-6 col-6">
|
||||
<div class="film_op">
|
||||
<div class="date">
|
||||
<img src="{{asset('assets/images/icons/eticket.svg')}}">
|
||||
<div class="day">
|
||||
<h4>{{$event->start_date->format('d.m.Y')}}</h4>
|
||||
<h6>{{$event->end_date->format('d.m.Y')}}</h6>
|
||||
<h6>{{$event->getSeansCount()}} seansa</h6>
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="film_name"><a href="{{$event->event_url}}">{{$event->title}}</a></h2>
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@
|
|||
</path>
|
||||
</svg></a></li>
|
||||
@endforeach
|
||||
|
||||
|
||||
{{--<li class="nav-item hs-has-sub-menu g-mx-10--lg g-mx-15--xl dropdown" id="center-menu-dropdown">--}}
|
||||
{{--<a id="nav-link--home" class="nav-link g-px-5 g-py-20 dropdown-toggle" data-toggle="dropdown"><svg class="Polygon_3" fill="#ffffff" width="7px" viewBox="0 0 8 8">--}}
|
||||
{{--<path id="Polygon_3" d="M 3.292892932891846 0.7071067690849304 C 3.683417320251465 0.3165824711322784 4.316582202911377 0.3165824711322784 4.707106590270996 0.7071067690849304 L 7.292893409729004 3.292893171310425 C 7.683417320251465 3.683417320251465 7.683417320251465 4.316582679748535 7.292893409729004 4.707107067108154 L 4.707106590270996 7.292893409729004 C 4.316582202911377 7.683417320251465 3.683417081832886 7.683417320251465 3.292892932891846 7.292893409729004 L 0.7071067094802856 4.707106590270996 C 0.3165824413299561 4.316582202911377 0.3165824711322784 3.683417320251465 0.7071067690849304 3.292892932891846 Z">--}}
|
||||
|
|
|
|||
|
|
@ -31,13 +31,7 @@
|
|||
<div class="container film">
|
||||
<div class="row">
|
||||
<div class="col-md-9 col-lg-9 col-sm-9 col-9">
|
||||
<div class="pagination_blk">
|
||||
<span>Видно на странице - 5/48</span>
|
||||
<div class="arrows_block">
|
||||
<a class='arrows' id='left_arrow' href="#"><img src="{{asset('assets/images/icons/left.png')}}"></a>
|
||||
<a class='arrows' id='right_arrow' href="#"><img src="{{asset('assets/images/icons/right.png')}}"></a>
|
||||
</div>
|
||||
</div>
|
||||
{{$events->links('vendor.pagination.simple-bootstrap-4')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<!-- Nav tabs -->
|
||||
<ul class="nav u-nav-v1-1 g-mb-20" role="tablist" data-target="nav-1-1-default-hor-left" data-tabs-mobile-type="slide-up-down" data-btn-classes="btn btn-md btn-block rounded-0 u-btn-outline-lightgray g-mb-20">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="tab" role="tab">Результатов поиска: {{$events->count()}}</a>
|
||||
<a class="nav-link active" data-toggle="tab" role="tab">Результатов поиска: {{$events->count()}}/{{$events->total()}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- End Nav tabs -->
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
@foreach($events as $event)
|
||||
@include('Bilettm.Partials.EventItem')
|
||||
@endforeach
|
||||
<div class="col-12 no-more-results">Больше результатов нет</div>
|
||||
{{$events->links('vendor.pagination.simple-bootstrap-4')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,53 @@
|
|||
@extends('Bilettm.Layouts.BilettmLayout')
|
||||
@section('content')
|
||||
@include('Bilettm.ViewEvent.Partials.HeaderSection')
|
||||
|
||||
@include('Bilettm.ViewEvent.Partials.CreateOrderSection')
|
||||
|
||||
@include('Bilettm.ViewEvent.Partials.FooterSection')
|
||||
@endsection
|
||||
@section('after_scripts')
|
||||
@include("Shared.Partials.LangScript")
|
||||
{!!HTML::script(config('attendize.cdn_url_static_assets').'/assets/javascript/frontend.js')!!}
|
||||
<script>
|
||||
var OrderExpires = {{strtotime($expires)}};
|
||||
$('#mirror_buyer_info').on('click', function(e) {
|
||||
$('.ticket_holder_first_name').val($('#order_first_name').val());
|
||||
$('.ticket_holder_last_name').val($('#order_last_name').val());
|
||||
$('.ticket_holder_email').val($('#order_email').val());
|
||||
});
|
||||
function setCountdown($element, seconds) {
|
||||
|
||||
var endTime, mins, msLeft, time, twoMinWarningShown = false;
|
||||
|
||||
function twoDigits(n) {
|
||||
return (n <= 9 ? "0" + n : n);
|
||||
}
|
||||
|
||||
function updateTimer() {
|
||||
msLeft = endTime - (+new Date);
|
||||
if (msLeft < 1000) {
|
||||
alert(lang("time_run_out"));
|
||||
location.reload();
|
||||
} else {
|
||||
|
||||
if (msLeft < 120000 && !twoMinWarningShown) {
|
||||
showMessage(lang("just_2_minutes"));
|
||||
twoMinWarningShown = true;
|
||||
}
|
||||
|
||||
time = new Date(msLeft);
|
||||
mins = time.getUTCMinutes();
|
||||
$element.html('<b>' + mins + ':' + twoDigits(time.getUTCSeconds()) + '</b>');
|
||||
setTimeout(updateTimer, time.getUTCMilliseconds() + 500);
|
||||
}
|
||||
}
|
||||
|
||||
endTime = (+new Date) + 1000 * seconds + 500;
|
||||
updateTimer();
|
||||
}
|
||||
</script>
|
||||
@if(isset($secondsToExpire))
|
||||
<script>if($('#countdown')) {setCountdown($('#countdown'), {{$secondsToExpire}});}</script>
|
||||
@endif
|
||||
@endsection
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
@extends('Bilettm.Layouts.BilettmLayout')
|
||||
@section('content')
|
||||
{{\DaveJamesMiller\Breadcrumbs\Facades\Breadcrumbs::render('home')}}
|
||||
{{\DaveJamesMiller\Breadcrumbs\Facades\Breadcrumbs::render('event',$event)}}
|
||||
<section style="margin-top: 30px; margin-bottom: 100px">
|
||||
<div class="container">
|
||||
<div class="row m-0">
|
||||
|
|
@ -56,8 +56,4 @@
|
|||
@section('after_scripts')
|
||||
@include("Shared.Partials.LangScript")
|
||||
{!!HTML::script(config('attendize.cdn_url_static_assets').'/assets/javascript/frontend.js')!!}
|
||||
|
||||
@if(isset($secondsToExpire))
|
||||
<script>if($('#countdown')) {setCountdown($('#countdown'), {{$secondsToExpire}});}</script>
|
||||
@endif
|
||||
@endsection
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
@extends('Bilettm.Layouts.BilettmLayout')
|
||||
@section('content')
|
||||
@include('Bilettm.ViewEvent.Partials.CheckoutHeader')
|
||||
|
||||
@include('Bilettm.ViewEvent.Partials.CreateOrderSection')
|
||||
<script>var OrderExpires = {{strtotime($expires)}};</script>
|
||||
@include('Bilettm.ViewEvent.Partials.CheckoutFooter')
|
||||
@endsection
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
@extends('Bilettm.Layouts.BilettmLayout')
|
||||
|
||||
@section('content')
|
||||
|
||||
@include('Public.ViewEvent.Partials.EventHeaderSection')
|
||||
@include('Public.ViewEvent.Partials.EventShareSection')
|
||||
@include('Public.ViewEvent.Partials.EventViewOrderSection')
|
||||
@include('Public.ViewEvent.Partials.EventFooterSection')
|
||||
|
||||
@stop
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: merdan
|
||||
* Date: 9/13/2019
|
||||
* Time: 16:31
|
||||
*/
|
||||
|
|
@ -1,77 +1,26 @@
|
|||
<section id='order_form' class="container">
|
||||
<div class="row">
|
||||
<h1 class="section_head">
|
||||
<div class="row justify-content-center bg-danger my-3">
|
||||
<h1 class="section_head text-light">
|
||||
@lang("Public_ViewEvent.order_details")
|
||||
</h1>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: center">
|
||||
@lang("Public_ViewEvent.below_order_details_header")
|
||||
</div>
|
||||
<div class="col-md-4 col-md-push-8">
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="ico-cart mr5"></i>
|
||||
@lang("Public_ViewEvent.order_summary")
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="panel-body pt0">
|
||||
<table class="table mb0 table-condensed">
|
||||
@foreach($tickets as $ticket)
|
||||
<tr>
|
||||
<td class="pl0">{{{$ticket['ticket']['title']}}} X <b>{{$ticket['qty']}}</b></td>
|
||||
<td style="text-align: right;">
|
||||
@if((int)ceil($ticket['full_price']) === 0)
|
||||
@lang("Public_ViewEvent.free")
|
||||
@else
|
||||
{{ money($ticket['full_price'], $event->currency) }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
@if($order_total > 0)
|
||||
<div class="panel-footer">
|
||||
<h5>
|
||||
@lang("Public_ViewEvent.total"): <span style="float: right;"><b>{{ $orderService->getOrderTotalWithBookingFee(true) }}</b></span>
|
||||
</h5>
|
||||
@if($event->organiser->charge_tax)
|
||||
<h5>
|
||||
{{ $event->organiser->tax_name }} ({{ $event->organiser->tax_value }}%):
|
||||
<span style="float: right;"><b>{{ $orderService->getTaxAmount(true) }}</b></span>
|
||||
</h5>
|
||||
<h5>
|
||||
<strong>@lang("Public_ViewEvent.grand_total")</strong>
|
||||
<span style="float: right;"><b>{{ $orderService->getGrandTotal(true) }}</b></span>
|
||||
</h5>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<div class="help-block">
|
||||
{!! @trans("Public_ViewEvent.time", ["time"=>"<span id='countdown'></span>"]) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8 col-md-pull-4">
|
||||
<div class="event_order_form">
|
||||
<div class="col-md-8">
|
||||
<div class="event_order_form card p-3">
|
||||
{!! Form::open(['url' => route('postCreateOrder', ['event_id' => $event->id]), 'class' => ($order_requires_payment && @$payment_gateway->is_on_site) ? 'ajax payment-form' : 'ajax', 'data-stripe-pub-key' => isset($account_payment_gateway->config['publishableKey']) ? $account_payment_gateway->config['publishableKey'] : '']) !!}
|
||||
|
||||
{!! Form::hidden('event_id', $event->id) !!}
|
||||
|
||||
<h3> @lang("Public_ViewEvent.your_information")</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-row">
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label("order_first_name", trans("Public_ViewEvent.first_name")) !!}
|
||||
{!! Form::text("order_first_name", null, ['required' => 'required', 'class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label("order_last_name", trans("Public_ViewEvent.last_name")) !!}
|
||||
{!! Form::text("order_last_name", null, ['required' => 'required', 'class' => 'form-control']) !!}
|
||||
|
|
@ -79,7 +28,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
{!! Form::label("order_email", trans("Public_ViewEvent.email")) !!}
|
||||
|
|
@ -87,80 +36,13 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{--<div class="row"><div class="col-md-12"> </div></div>--}}
|
||||
{{--<div class="row">--}}
|
||||
{{--<div class="col-md-12">--}}
|
||||
{{--<div class="form-group">--}}
|
||||
{{--<div class="custom-checkbox">--}}
|
||||
{{--{!! Form::checkbox('is_business', 1, null, ['data-toggle' => 'toggle', 'id' => 'is_business']) !!}--}}
|
||||
{{--{!! Form::label('is_business', trans("Public_ViewEvent.is_business"), ['class' => 'control-label']) !!}--}}
|
||||
{{--</div>--}}
|
||||
{{--</div>--}}
|
||||
{{--</div>--}}
|
||||
{{--</div>--}}
|
||||
{{--<div class="row"><div class="col-md-12"> </div></div>--}}
|
||||
<div class="row hidden" id="business_details">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label("business_name", trans("Public_ViewEvent.business_name")) !!}
|
||||
{!! Form::text("business_name", null, ['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label("business_tax_number", trans("Public_ViewEvent.business_tax_number")) !!}
|
||||
{!! Form::text("business_tax_number", null, ['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label("business_address_line1", trans("Public_ViewEvent.business_address_line1")) !!}
|
||||
{!! Form::text("business_address_line1", null, ['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label("business_address_line2", trans("Public_ViewEvent.business_address_line2")) !!}
|
||||
{!! Form::text("business_address_line2", null, ['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-4">
|
||||
<div class="form-group">
|
||||
{!! Form::label("business_address_state", trans("Public_ViewEvent.business_address_state_province")) !!}
|
||||
{!! Form::text("business_address_state", null, ['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="form-group">
|
||||
{!! Form::label("business_address_city", trans("Public_ViewEvent.business_address_city")) !!}
|
||||
{!! Form::text("business_address_city", null, ['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="form-group">
|
||||
{!! Form::label("business_address_code", trans("Public_ViewEvent.business_address_code")) !!}
|
||||
{!! Form::text("business_address_code", null, ['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"><div class="col-md-12"> </div></div>
|
||||
<div class="p20 pl0">
|
||||
<a href="javascript:void(0);" class="btn btn-primary btn-xs" id="mirror_buyer_info">
|
||||
<a href="javascript:void(0);" class="btn btn-primary btn-sm" id="mirror_buyer_info">
|
||||
@lang("Public_ViewEvent.copy_buyer")
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="row mt-3">
|
||||
<div class="col-md-12">
|
||||
<div class="ticket_holders_details" >
|
||||
<h3>@lang("Public_ViewEvent.ticket_holder_information")</h3>
|
||||
|
|
@ -169,14 +51,14 @@
|
|||
?>
|
||||
@foreach($tickets as $ticket)
|
||||
@for($i=0; $i<=$ticket['qty']-1; $i++)
|
||||
<div class="panel panel-primary">
|
||||
<div class="card card-info">
|
||||
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
<b>{{$ticket['ticket']['title']}}</b>: @lang("Public_ViewEvent.ticket_holder_n", ["n"=>$i+1])
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
|
|
@ -295,13 +177,56 @@
|
|||
@endif
|
||||
|
||||
{!! Form::hidden('is_embedded', $is_embedded) !!}
|
||||
{!! Form::submit(trans("Public_ViewEvent.checkout_submit"), ['class' => 'btn btn-lg btn-success card-submit', 'style' => 'width:100%;']) !!}
|
||||
{!! Form::submit(trans("Public_ViewEvent.checkout_submit"), ['class' => 'btn btn-lg btn-danger card-submit']) !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body pt0">
|
||||
<h3 class="card-title">
|
||||
<i class="ico-cart mr5"></i>
|
||||
@lang("Public_ViewEvent.order_summary")
|
||||
</h3>
|
||||
<table class="table mb0 table-condensed">
|
||||
@foreach($tickets as $ticket)
|
||||
<tr>
|
||||
<td class="pl0">{{{$ticket['ticket']['title']}}} X <b>{{$ticket['qty']}}</b></td>
|
||||
<td style="text-align: right;">
|
||||
@if((int)ceil($ticket['full_price']) === 0)
|
||||
@lang("Public_ViewEvent.free")
|
||||
@else
|
||||
{{ money($ticket['full_price'], $event->currency) }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
@if($order_total > 0)
|
||||
<div class="card-footer">
|
||||
<h5>
|
||||
@lang("Public_ViewEvent.total"): <span style="float: right;"><b>{{ $orderService->getOrderTotalWithBookingFee(true) }}</b></span>
|
||||
</h5>
|
||||
@if($event->organiser->charge_tax)
|
||||
<h5>
|
||||
{{ $event->organiser->tax_name }} ({{ $event->organiser->tax_value }}%):
|
||||
<span style="float: right;"><b>{{ $orderService->getTaxAmount(true) }}</b></span>
|
||||
</h5>
|
||||
<h5>
|
||||
<strong>@lang("Public_ViewEvent.grand_total")</strong>
|
||||
<span style="float: right;"><b>{{ $orderService->getGrandTotal(true) }}</b></span>
|
||||
</h5>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<div class="help-block">
|
||||
{!! @trans("Public_ViewEvent.time", ["time"=>"<span id='countdown'></span>"]) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<img src="https://cdn.attendize.com/lg.png" />
|
||||
</section>
|
||||
@if(session()->get('message'))
|
||||
<script>showMessage('{{session()->get('message')}}');</script>
|
||||
@endif
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<section id="footer" class="container-fluid">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@if(Utils::userOwns($event))
|
||||
•
|
||||
<a class="adminLink " href="{{route('showEventDashboard' , ['event_id' => $event->id])}}">@lang("Public_ViewEvent.event_dashboard")</a>
|
||||
•
|
||||
<a class="adminLink "
|
||||
href="{{route('showOrganiserDashboard' , ['organiser_id' => $event->organiser->id])}}">@lang("Public_ViewEvent.organiser_dashboard")</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div onclick="window.location='{{$event->event_url}}#organiser'" class="event_organizer">
|
||||
<div onclick="window.location='{{$event->event_url}}#organiser'" class="event_organizer text-center p-3">
|
||||
<b>{{$event->organiser->name}}</b> @lang("Public_ViewEvent.presents")
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
</section>
|
||||
<section id="intro" class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12 text-center">
|
||||
<h1 property="name">{{$event->title}}</h1>
|
||||
<div class="event_venue">
|
||||
<span property="startDate" content="{{ $event->start_date->toIso8601String() }}">
|
||||
|
|
@ -0,0 +1,243 @@
|
|||
<section id="order_form" class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 order_header">
|
||||
<span class="massive-icon">
|
||||
<i class="ico ico-checkmark-circle"></i>
|
||||
</span>
|
||||
<h1>{{ @trans("Public_ViewEvent.thank_you_for_your_order") }}</h1>
|
||||
<h2>
|
||||
{{ @trans("Public_ViewEvent.your") }}
|
||||
<a class="ticket_download_link"
|
||||
href="{{ route('showOrderTickets', ['order_reference' => $order->order_reference] ).'?download=1' }}">
|
||||
{{ @trans("Public_ViewEvent.tickets") }}</a> {{ @trans("Public_ViewEvent.confirmation_email") }}
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="content event_view_order">
|
||||
|
||||
@if($event->post_order_display_message)
|
||||
<div class="alert alert-dismissable alert-info">
|
||||
{{ nl2br(e($event->post_order_display_message)) }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="order_details well">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 col-xs-6">
|
||||
<b>@lang("Public_ViewEvent.first_name")</b><br> {{$order->first_name}}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4 col-xs-6">
|
||||
<b>@lang("Public_ViewEvent.last_name")</b><br> {{$order->last_name}}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4 col-xs-6">
|
||||
<b>@lang("Public_ViewEvent.amount")</b><br> {{$order->event->currency_symbol}}{{number_format($order->total_amount, 2)}}
|
||||
@if($event->organiser->charge_tax)
|
||||
<small>{{ $orderService->getVatFormattedInBrackets() }}</small>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4 col-xs-6">
|
||||
<b>@lang("Public_ViewEvent.reference")</b><br> {{$order->order_reference}}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4 col-xs-6">
|
||||
<b>@lang("Public_ViewEvent.date")</b><br> {{$order->created_at->toDateTimeString()}}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4 col-xs-6">
|
||||
<b>@lang("Public_ViewEvent.email")</b><br> {{$order->email}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@if(!$order->is_payment_received)
|
||||
<h3>
|
||||
@lang("Public_ViewEvent.payment_instructions")
|
||||
</h3>
|
||||
<div class="alert alert-info">
|
||||
@lang("Public_ViewEvent.order_awaiting_payment")
|
||||
</div>
|
||||
<div class="offline_payment_instructions well">
|
||||
{!! Markdown::parse($event->offline_payment_instructions) !!}
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
<h3>
|
||||
@lang("Public_ViewEvent.order_items")
|
||||
</h3>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@lang("Public_ViewEvent.ticket")
|
||||
</th>
|
||||
<th>
|
||||
@lang("Public_ViewEvent.quantity_full")
|
||||
</th>
|
||||
<th>
|
||||
@lang("Public_ViewEvent.price")
|
||||
</th>
|
||||
<th>
|
||||
@lang("Public_ViewEvent.booking_fee")
|
||||
</th>
|
||||
<th>
|
||||
@lang("Public_ViewEvent.total")
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($order->orderItems as $order_item)
|
||||
<tr>
|
||||
<td>
|
||||
{{$order_item->title}}
|
||||
</td>
|
||||
<td>
|
||||
{{$order_item->quantity}}
|
||||
</td>
|
||||
<td>
|
||||
@if((int)ceil($order_item->unit_price) == 0)
|
||||
@lang("Public_ViewEvent.free")
|
||||
@else
|
||||
{{money($order_item->unit_price, $order->event->currency)}}
|
||||
@endif
|
||||
|
||||
</td>
|
||||
<td>
|
||||
@if((int)ceil($order_item->unit_price) == 0)
|
||||
-
|
||||
@else
|
||||
{{money($order_item->unit_booking_fee, $order->event->currency)}}
|
||||
@endif
|
||||
|
||||
</td>
|
||||
<td>
|
||||
@if((int)ceil($order_item->unit_price) == 0)
|
||||
@lang("Public_ViewEvent.free")
|
||||
@else
|
||||
{{money(($order_item->unit_price + $order_item->unit_booking_fee) * ($order_item->quantity), $order->event->currency)}}
|
||||
@endif
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<b>@lang("Public_ViewEvent.sub_total")</b>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
{{ $orderService->getOrderTotalWithBookingFee(true) }}
|
||||
</td>
|
||||
</tr>
|
||||
@if($event->organiser->charge_tax)
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
{{$event->organiser->tax_name}}
|
||||
</td>
|
||||
<td colspan="2">
|
||||
{{ $orderService->getTaxAmount(true) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<b>Total</b>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
{{ $orderService->getGrandTotal(true) }}
|
||||
</td>
|
||||
</tr>
|
||||
@if($order->is_refunded || $order->is_partially_refunded)
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<b>@lang("Public_ViewEvent.refunded_amount")</b>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
{{money($order->amount_refunded, $order->event->currency)}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<b>@lang("Public_ViewEvent.total")</b>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
{{money($order->total_amount - $order->amount_refunded, $order->event->currency)}}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<h3>
|
||||
@lang("Public_ViewEvent.order_attendees")
|
||||
</h3>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<tbody>
|
||||
@foreach($order->attendees as $attendee)
|
||||
<tr>
|
||||
<td>
|
||||
{{$attendee->first_name}}
|
||||
{{$attendee->last_name}}
|
||||
(<a href="mailto:{{$attendee->email}}">{{$attendee->email}}</a>)
|
||||
</td>
|
||||
<td>
|
||||
{{{$attendee->ticket->title}}}
|
||||
</td>
|
||||
<td>
|
||||
@if($attendee->is_cancelled)
|
||||
@lang("Public_ViewEvent.attendee_cancelled")
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
@extends('Bilettm.Layouts.BilettmLayout')
|
||||
|
||||
@section('content')
|
||||
|
||||
@include('Bilettm.ViewEvent.Partials.HeaderSection')
|
||||
{{--@include('Public.ViewEvent.Partials.EventShareSection')--}}
|
||||
@include('Bilettm.ViewEvent.Partials.ViewOrderSection')
|
||||
@include('Bilettm.ViewEvent.Partials.FooterSection')
|
||||
|
||||
@stop
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
@if ($paginator->hasPages())
|
||||
<div class="pagination_blk">
|
||||
<span>Видно на странице - {{$events->count()}}/{{$events->total()}}</span>
|
||||
<div class="arrows_block">
|
||||
<a class='arrows' id='left_arrow' href="#"><img src="{{asset('assets/images/icons/left.png')}}"></a>
|
||||
<a class='arrows' id='right_arrow' href="#"><img src="{{asset('assets/images/icons/right.png')}}"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -21,7 +21,7 @@ Breadcrumbs::for('category', function ($trail, $category){
|
|||
});
|
||||
|
||||
Breadcrumbs::for('event',function($trail, $event){
|
||||
$trail->parent('category', $event->category);
|
||||
$trail->parent('category', $event->mainCategory);
|
||||
$trail->push($event->title,$event->event_url);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue