updated
This commit is contained in:
@@ -28,30 +28,43 @@ class PaypalController extends Controller
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$paypal_env = "live";
|
||||
$paypal_apiUrl = 'https://api.paypal.com'; // default
|
||||
|
||||
if($paypal_env == 'live'){
|
||||
|
||||
$paypal_apiUrl = 'https://api.paypal.com';
|
||||
}else{
|
||||
$paypal_apiUrl = 'https://api.sandbox.paypal.com';
|
||||
}
|
||||
|
||||
$this->_apiContext = PayPal::ApiContext(
|
||||
config('services.paypal.client_id'),
|
||||
config('services.paypal.secret')
|
||||
config('services.paypal_'.$paypal_env.'.client_id'),
|
||||
config('services.paypal_'.$paypal_env.'.secret')
|
||||
|
||||
// config('services.paypal_live.client_id'),
|
||||
// config('services.paypal_live.secret')
|
||||
);
|
||||
|
||||
|
||||
// $this->_apiContext->setConfig(array(
|
||||
// 'mode' => 'sandbox',
|
||||
// 'service.EndPoint' => 'https://api.sandbox.paypal.com',
|
||||
// 'http.ConnectionTimeOut' => 30,
|
||||
// 'log.LogEnabled' => true,
|
||||
// 'log.FileName' => storage_path('logs/paypal.log'),
|
||||
// 'log.LogLevel' => 'FINE'
|
||||
// ));
|
||||
|
||||
// live
|
||||
$this->_apiContext->setConfig(array(
|
||||
'mode' => 'live',
|
||||
'service.EndPoint' => 'https://api.paypal.com',
|
||||
$this->_apiContext->setConfig(array(
|
||||
'mode' => $paypal_env,
|
||||
'service.EndPoint' => $paypal_apiUrl,
|
||||
'http.ConnectionTimeOut' => 30,
|
||||
'log.LogEnabled' => true,
|
||||
'log.FileName' => storage_path('logs/paypal.log'),
|
||||
'log.LogLevel' => 'FINE'
|
||||
));
|
||||
));
|
||||
|
||||
// live
|
||||
// $this->_apiContext->setConfig(array(
|
||||
// 'mode' => 'sandbox',
|
||||
// 'service.EndPoint' => 'https://api.paypal.com',
|
||||
// 'http.ConnectionTimeOut' => 30,
|
||||
// 'log.LogEnabled' => true,
|
||||
// 'log.FileName' => storage_path('logs/paypal.log'),
|
||||
// 'log.LogLevel' => 'FINE'
|
||||
// ));
|
||||
}
|
||||
|
||||
|
||||
@@ -385,8 +398,8 @@ class PaypalController extends Controller
|
||||
);
|
||||
|
||||
Mail::send('emails.orders', $data, function ($message) use ($data) {
|
||||
$message->from('no-reply@crewsportswear.com', 'CREW Sportswear');
|
||||
$message->bcc($data['email_cc'], 'Orders From CREW Sportswear');
|
||||
$message->from('no-reply@crewsportswear.com', 'Merchbay');
|
||||
$message->bcc($data['email_cc'], 'Orders From Merchbay');
|
||||
$message->to($data['receiver'])->subject($data['subject']);
|
||||
});
|
||||
// end email sending
|
||||
|
||||
@@ -621,7 +621,7 @@ class TeamStoreController extends Controller
|
||||
$finalSubTotal = $getSubtotal[0]->Subtotal;
|
||||
}
|
||||
|
||||
return view('sublayouts.cart')
|
||||
return view('merchbay.cart')
|
||||
->with('item_group', $items_group)
|
||||
->with('row', $items)
|
||||
->with('img_thumb', $item_thumbs)
|
||||
@@ -725,8 +725,6 @@ class TeamStoreController extends Controller
|
||||
$offData = $getVoucher[0]->VoucherValue . ' ' . $store_array[0]->StoreCurrency;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$message = '<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-xs">' . $getVoucher[0]->VoucherCode . ' ' . $offData . ' OFF</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle btn-xs" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
|
||||
@@ -34,16 +34,27 @@ return [
|
||||
'secret' => '',
|
||||
],
|
||||
|
||||
// sandbox
|
||||
// sandbox crew
|
||||
// 'paypal' => [
|
||||
// 'client_id' => 'AQuz-HKzQiL7FygkG8skSekaWf-RP6Rgj4f1XeX1Ghp86bUFj7tQXVT1xbpluu5_WCGRbQpOVGtlJKVB',
|
||||
// client_id' => 'AQuz-HKzQiL7FygkG8skSekaWf-RP6Rgj4f1XeX1Ghp86bUFj7tQXVT1xbpluu5_WCGRbQpOVGtlJKVB',
|
||||
// 'secret' => 'EJAMKxQsl-mFkL_4J_90cvTamYfcsgswqgIxz9wQPiRAwJ6sy_wNsttMlmrXIpxI96JpYzdMXkLCHAPz'
|
||||
// ],
|
||||
|
||||
// live
|
||||
'paypal' => [
|
||||
'client_id' => 'AUqBUFW5lfyYmrlBtFZA3RNw45sttM3ltbvS_d4qCVBMrkcMG9rEeivGvtNFSy8XTiEp50YyQ6khKxbq',
|
||||
'secret' => 'ELlnuiupoFKwGUSc2g5j-sD1EmsvKpdhth1gFV7njpfvyNtKsK8WwIKUMOS0ehJcRatV865eMhfgsnd_'
|
||||
],
|
||||
// live crew
|
||||
// 'paypal' => [
|
||||
// 'client_id' => 'AUqBUFW5lfyYmrlBtFZA3RNw45sttM3ltbvS_d4qCVBMrkcMG9rEeivGvtNFSy8XTiEp50YyQ6khKxbq',
|
||||
// 'secret' => 'ELlnuiupoFKwGUSc2g5j-sD1EmsvKpdhth1gFV7njpfvyNtKsK8WwIKUMOS0ehJcRatV865eMhfgsnd_'
|
||||
// ],
|
||||
|
||||
// sandbox merchbay
|
||||
'paypal_sandbox' => [
|
||||
'client_id' => 'AWBh_7_t3c3zo1FAXo-lgUB6LgBkMjE3hsUaX0eQZUbugfTx3djrAJjzgSF2FsctkwtOPb-q3XjZOF3F',
|
||||
'secret' => 'EColKouxhzsY9HV904V0KOq6MYNixWg4lqQQ3mpEC2ZDmwuHOf6fN0LzprfgSkaGAhzhorEdWncH2GA1'
|
||||
],
|
||||
|
||||
// live merchbay
|
||||
'paypal_live' => [
|
||||
'client_id' => 'Ab4VS4QGjGw0z6jtyCaARI1SoUKfq76Qr1MVh0NM0WKGxhu0zE-h3oBplIQFnAzAMiuS7FBiTch3YKcr',
|
||||
'secret' => 'EEbk7SwRC1iOOsE6g23v-YCI52uGdTN3NMjoAqfTmtd48M0iS0U_kvL5wZTZoLXBA19gwj3ftXp96iSC'
|
||||
],
|
||||
];
|
||||
|
||||
340
resources/views/merchbay/cart.blade.php
Normal file
340
resources/views/merchbay/cart.blade.php
Normal file
@@ -0,0 +1,340 @@
|
||||
@extends('merchbay_main')
|
||||
@section('main-content')
|
||||
|
||||
<style>
|
||||
.previewImage{
|
||||
height: 150px;
|
||||
width: 95%;
|
||||
overflow:hidden;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.cart-store-logo{
|
||||
border: 1px solid #e2e2e2;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="wrapper pb-5">
|
||||
<div class="main__content">
|
||||
<div class="container">
|
||||
|
||||
{{-- breadcrumbs --}}
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="py-4">
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
@if(isset($store_array[0]->StoreUrl))
|
||||
<li class="breadcrumb-item"><a href="{{ url('store') . '/' . $store_array[0]->StoreUrl }}">{{ $store_array[0]->StoreName }}</a></li>
|
||||
@else
|
||||
<li class="breadcrumb-item"><a href="{{ url('/') }}">Home</a></li>
|
||||
@endif
|
||||
<li class="breadcrumb-item active" aria-current="page">Shopping cart</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row pb-5">
|
||||
<div class="col-lg-12">
|
||||
<h3>Shopping Cart</h3>
|
||||
@if(Session::has('cartkeyError'))
|
||||
<div class="alert alert-danger alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="fa fa-exclamation-circle"></i> Error:</h4>
|
||||
{!! Session::get('cartkeyError') !!}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(count($row) > 0)
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-pull-4">
|
||||
<div style="border: 1px solid #e2e2e2; padding: 10px;">
|
||||
<h6><img height="30px" class="cart-store-logo" src="{{ config('site_config.uploads') . 'teamstore/'. $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo }}"> {{ $store_array[0]->StoreName }}</h6>
|
||||
</div>
|
||||
@foreach($item_group as $item)
|
||||
@if($item->VoucherId == null)
|
||||
<div style="border: 1px solid #e2e2e2; padding: 10px; border-top: none;">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="text-center">
|
||||
@foreach($img_thumb as $img)
|
||||
@if($img->ProductId == $item->ProductId)
|
||||
<img class="previewImage" src="{{ config('site_config.images_url') }}/{{ $img->Image }}">
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<h4>
|
||||
<a href="{{ url('store') . '/' . $item->StoreURL . '/' . 'product/' . $item->ProductURL }}">{{ $item->ProductName }}</a>
|
||||
</h4>
|
||||
<p>Total Price: {{ $item->total_price . ' ' . $store_array[0]->StoreCurrency }} • Row(s): {{ $item->qty }} </p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed">
|
||||
|
||||
@if($item->FormUsed=="jersey-and-shorts-form")
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Number</th>
|
||||
<th>Jersey Size</th>
|
||||
<th>Shorts Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="tshirt-form")
|
||||
<tr>
|
||||
<th>Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@elseif($item->FormUsed=="quantity-form")
|
||||
<tr>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
|
||||
@elseif($item->FormUsed=="name-number-form")
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Number</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@elseif($item->FormUsed=="name-number-size-form")
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Number</th>
|
||||
<th>Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@elseif($item->FormUsed=="number-form")
|
||||
<tr>
|
||||
<th>Number</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="name-name2-size-form")
|
||||
<tr>
|
||||
<th>Gamer Tag</th>
|
||||
<th>Name</th>
|
||||
<th>Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="name-size-form")
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="jersey-and-shorts-quantity-form")
|
||||
<tr>
|
||||
<th>Jersey Size</th>
|
||||
<th>Shorts Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="number-jersey-shorts-form")
|
||||
<tr>
|
||||
<th>Number</th>
|
||||
<th>Jersey Size</th>
|
||||
<th>Shorts Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@else
|
||||
|
||||
@endif
|
||||
|
||||
@foreach($row as $sub_item)
|
||||
@if($sub_item->ProductId == $item->ProductId)
|
||||
|
||||
@if($item->FormUsed=="jersey-and-shorts-form")
|
||||
<tr>
|
||||
<td> @if($sub_item->Name != '') {{ $sub_item->Name }} @else -- @endif </td>
|
||||
<td>{{ $sub_item->Number }}</td>
|
||||
<td>{{ $sub_item->JerseySize }}</td>
|
||||
<td>{{ $sub_item->ShortsSize }}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="tshirt-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Size }}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="quantity-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="name-number-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Name }}</td>
|
||||
<td>{{ $sub_item->Number }}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="name-number-size-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Name }}</td>
|
||||
<td>{{ $sub_item->Number }}</td>
|
||||
<td>{{ $sub_item->Size }}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="number-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Number }}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="name-name2-size-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Name }}</td>
|
||||
<td>{{ $sub_item->Name2 }}</td>
|
||||
<td>{{ $sub_item->Size }}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="name-size-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Name }}</td>
|
||||
<td>{{ $sub_item->Size }}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="jersey-and-shorts-quantity-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->JerseySize}}</td>
|
||||
<td>{{ $sub_item->ShortsSize}}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="number-jersey-shorts-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Number }}</td>
|
||||
<td>{{ $sub_item->JerseySize }}</td>
|
||||
<td>{{ $sub_item->ShortsSize }}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><i class="fa fa-times"></i></a></td>
|
||||
</tr>
|
||||
@else
|
||||
|
||||
@endif
|
||||
|
||||
@endif
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-md-push-8 order-summary">
|
||||
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
|
||||
@if(Session::has('msg'))
|
||||
<div class="alert alert-warning alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="fa fa-exclamation-triangle"></i> Warning:</h4>
|
||||
{!! Session::get('msg') !!}
|
||||
</div>
|
||||
@endif
|
||||
<h3>Order Summary</h3>
|
||||
</div>
|
||||
|
||||
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
|
||||
<h3>Subtotal: <span id="my_subtotal">{{ round($getSubtotal, 2) }}</span> <small>{{ $store_array[0]->StoreCurrency }}</small></h3>
|
||||
<hr>
|
||||
<div class="form-group" id="voucher_list">
|
||||
@foreach($row as $item)
|
||||
@if($item->VoucherId != null)
|
||||
<div class="btn-group">
|
||||
@if($item->VoucherType == "Percentage")
|
||||
<button type="button" class="btn btn-default btn-xs">{{ $item->VoucherCode . ' ' . $item->VoucherValue . '%' }} OFF</button>
|
||||
@else
|
||||
<button type="button" class="btn btn-default btn-xs">{{ $item->VoucherCode . ' ' . $item->VoucherValue . ' ' . $store_array[0]->StoreCurrency }} OFF</button>
|
||||
@endif
|
||||
<button type="button" class="btn btn-default dropdown-toggle btn-xs" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{ url('removeitem') . '/' . $item->Id }}"><i class="fa fa-times"></i> Remove</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
<form id="frm_voucher">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="voucher" data-error="#error_voucher" placeholder="Enter Voucher Code">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" id="btn_apply_voucher" type="submit" >Apply</button>
|
||||
</span>
|
||||
</div>
|
||||
<span id="error_voucher" style="color: #dd4b39"></span>
|
||||
</form>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div style="border: 1px solid #e2e2e2; padding: 10px;">
|
||||
<a @if($getSubtotal <= 0 ) disabled @endif href="{{ url('getCheckout') }}" class="btn btn-primary w-100" style="background-color: #ffc300; border-color: #e2ad00; text-align: -webkit-center;" ><img src="{{asset('/public/images/paypal1.png')}}" class="img img-responsive" style="height:30px;"></a><br>
|
||||
|
||||
</div>
|
||||
<div class="py-4">
|
||||
<a href="{{ url('store') . '/' . $store_array[0]->StoreUrl }}" class="btn btn-black w-100" type="submit">Continue Shopping</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@else
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center">
|
||||
<h3 style="color:#d2d2d2;">Your cart is currently empty.</h3>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
@@ -80,7 +80,7 @@
|
||||
@endif
|
||||
<li class="nav-item">
|
||||
<a href="{{ url('cart') }}" type="button" class="nav-link btn btn-navbar-cart btn-sm">
|
||||
<i class="bi bi-cart-fill"></i>
|
||||
<i class="fa fa-shopping-cart"></i>
|
||||
<span class="badge bg-secondary">{{ \App\Http\Controllers\MainController::getCountCart() }}</span>
|
||||
{{-- <span class="visually-hidden">unread messages</span> --}}
|
||||
</a>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<meta name="csrf_token" content="{{ csrf_token() }}" />
|
||||
<!-- Bootstrap CSS -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
|
||||
|
||||
|
||||
@@ -1,319 +0,0 @@
|
||||
@extends('layout.main')
|
||||
@section('content')
|
||||
|
||||
<style>
|
||||
.previewImage{
|
||||
height: 150px;
|
||||
width: 95%;
|
||||
overflow:hidden;
|
||||
object-fit: contain;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<ol class="breadcrumb">
|
||||
@if(isset($store_array[0]->StoreUrl))
|
||||
<li><a href="{{ url('teamstore') . '/' . $store_array[0]->StoreUrl }}">{{ $store_array[0]->StoreName }}</a></li>
|
||||
@else
|
||||
<li><a href="{{ url('/') }}">Home</a></li>
|
||||
@endif
|
||||
<li class="active">My Cart</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h2 style="font-size: 20px; font-weight: bold;">MY CART</h2>
|
||||
@if(Session::has('cartkeyError'))
|
||||
<div class="alert alert-danger alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="fa fa-exclamation-circle"></i> Error:</h4>
|
||||
{!! Session::get('cartkeyError') !!}
|
||||
</div>
|
||||
@endif
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(count($row) > 0)
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-md-push-8 order-summary" >
|
||||
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
|
||||
@if(Session::has('msg'))
|
||||
<div class="alert alert-warning alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="fa fa-exclamation-triangle"></i> Warning:</h4>
|
||||
{!! Session::get('msg') !!}
|
||||
</div>
|
||||
@endif
|
||||
<h3>Order Summary</h3>
|
||||
</div>
|
||||
|
||||
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
|
||||
<h3>Subtotal: <span id="my_subtotal">{{ round($getSubtotal, 2) }}</span> <small>{{ $store_array[0]->StoreCurrency }}</small></h3>
|
||||
<hr>
|
||||
<div class="form-group" id="voucher_list">
|
||||
@foreach($row as $item)
|
||||
@if($item->VoucherId != null)
|
||||
<div class="btn-group">
|
||||
@if($item->VoucherType == "Percentage")
|
||||
<button type="button" class="btn btn-default btn-xs">{{ $item->VoucherCode . ' ' . $item->VoucherValue . '%' }} OFF</button>
|
||||
@else
|
||||
<button type="button" class="btn btn-default btn-xs">{{ $item->VoucherCode . ' ' . $item->VoucherValue . ' ' . $store_array[0]->StoreCurrency }} OFF</button>
|
||||
@endif
|
||||
<button type="button" class="btn btn-default dropdown-toggle btn-xs" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{ url('removeitem') . '/' . $item->Id }}"><i class="fa fa-times"></i> Remove</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
<form id="frm_voucher">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="voucher" data-error="#error_voucher" placeholder="Enter Voucher Code">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" id="btn_apply_voucher" type="submit" >Apply</button>
|
||||
</span>
|
||||
</div>
|
||||
<span id="error_voucher" style="color: #dd4b39"></span>
|
||||
</form>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div style="border: 1px solid #e2e2e2; padding: 10px;">
|
||||
<a @if($getSubtotal <= 0 ) disabled @endif href="{{ url('getCheckout') }}" class="btn btn-primary btn-block" style="background-color: #ffc300; border-color: #e2ad00; text-align: -webkit-center;" ><img src="{{asset('/public/images/paypal1.png')}}" class="img img-responsive" style="height:30px;"></a><br>
|
||||
<a href="{{ url('teamstore') . '/' . $store_array[0]->StoreUrl }}" class="btn btn-default btn-block" type="submit">Continue Shopping</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8 col-md-pull-4">
|
||||
<div style="border: 1px solid #e2e2e2; padding: 10px;">
|
||||
<h4><img height="30px" class="store-logo" src="{{ config('site_config.uploads') . 'teamstore/'. $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo }}"> {{ $store_array[0]->StoreName }}</h4>
|
||||
</div>
|
||||
@foreach($item_group as $item)
|
||||
@if($item->VoucherId == null)
|
||||
<div style="border: 1px solid #e2e2e2; padding: 10px; border-top: none;">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="text-center">
|
||||
@foreach($img_thumb as $img)
|
||||
@if($img->ProductId == $item->ProductId)
|
||||
<img class="previewImage" src="{{ config('site_config.images_url') }}/{{ $img->Image }}">
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<h4>
|
||||
<a href="{{ url('teamstore') . '/' . $item->StoreURL . '/' . 'product/' . $item->ProductURL }}">{{ $item->ProductName }}</a>
|
||||
</h4>
|
||||
<p>Total Price: {{ $item->total_price . ' ' . $store_array[0]->StoreCurrency }} • Row(s): {{ $item->qty }} </p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed">
|
||||
|
||||
@if($item->FormUsed=="jersey-and-shorts-form")
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Number</th>
|
||||
<th>Jersey Size</th>
|
||||
<th>Shorts Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="tshirt-form")
|
||||
<tr>
|
||||
<th>Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@elseif($item->FormUsed=="quantity-form")
|
||||
<tr>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
|
||||
@elseif($item->FormUsed=="name-number-form")
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Number</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@elseif($item->FormUsed=="name-number-size-form")
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Number</th>
|
||||
<th>Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@elseif($item->FormUsed=="number-form")
|
||||
<tr>
|
||||
<th>Number</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="name-name2-size-form")
|
||||
<tr>
|
||||
<th>Gamer Tag</th>
|
||||
<th>Name</th>
|
||||
<th>Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="name-size-form")
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="jersey-and-shorts-quantity-form")
|
||||
<tr>
|
||||
<th>Jersey Size</th>
|
||||
<th>Shorts Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="number-jersey-shorts-form")
|
||||
<tr>
|
||||
<th>Number</th>
|
||||
<th>Jersey Size</th>
|
||||
<th>Shorts Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@else
|
||||
|
||||
@endif
|
||||
|
||||
@foreach($row as $sub_item)
|
||||
@if($sub_item->ProductId == $item->ProductId)
|
||||
|
||||
@if($item->FormUsed=="jersey-and-shorts-form")
|
||||
<tr>
|
||||
<td> @if($sub_item->Name != '') {{ $sub_item->Name }} @else -- @endif </td>
|
||||
<td>{{ $sub_item->Number }}</td>
|
||||
<td>{{ $sub_item->JerseySize }}</td>
|
||||
<td>{{ $sub_item->ShortsSize }}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><span class="glyphicon glyphicon-remove"></span></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="tshirt-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Size }}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><span class="glyphicon glyphicon-remove"></span></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="quantity-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><span class="glyphicon glyphicon-remove"></span></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="name-number-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Name }}</td>
|
||||
<td>{{ $sub_item->Number }}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><span class="glyphicon glyphicon-remove"></span></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="name-number-size-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Name }}</td>
|
||||
<td>{{ $sub_item->Number }}</td>
|
||||
<td>{{ $sub_item->Size }}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><span class="glyphicon glyphicon-remove"></span></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="number-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Number }}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><span class="glyphicon glyphicon-remove"></span></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="name-name2-size-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Name }}</td>
|
||||
<td>{{ $sub_item->Name2 }}</td>
|
||||
<td>{{ $sub_item->Size }}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><span class="glyphicon glyphicon-remove"></span></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="name-size-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Name }}</td>
|
||||
<td>{{ $sub_item->Size }}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><span class="glyphicon glyphicon-remove"></span></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="jersey-and-shorts-quantity-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->JerseySize}}</td>
|
||||
<td>{{ $sub_item->ShortsSize}}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><span class="glyphicon glyphicon-remove"></span></a></td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="number-jersey-shorts-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Number }}</td>
|
||||
<td>{{ $sub_item->JerseySize }}</td>
|
||||
<td>{{ $sub_item->ShortsSize }}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><span class="glyphicon glyphicon-remove"></span></a></td>
|
||||
</tr>
|
||||
@else
|
||||
|
||||
@endif
|
||||
|
||||
@endif
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@else
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h3 style="color:#d2d2d2;">Your cart is currently empty.</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
@endsection
|
||||
Reference in New Issue
Block a user