updated
This commit is contained in:
@@ -78,23 +78,23 @@ class CustomAuthController extends Controller
|
|||||||
$post['captcha'] = $this->captchaCheck();
|
$post['captcha'] = $this->captchaCheck();
|
||||||
|
|
||||||
$validator = Validator::make(
|
$validator = Validator::make(
|
||||||
$post,
|
|
||||||
[
|
|
||||||
'username' => 'unique:user_logins',
|
|
||||||
'email' => 'unique:user_logins',
|
|
||||||
'g-recaptcha-response' => 'required',
|
|
||||||
'captcha' => 'required|min:1'
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'g-recaptcha-response.required' => 'Captcha is required',
|
|
||||||
'captcha.min' => 'Wrong captcha, please try again.'
|
|
||||||
]
|
|
||||||
|
|
||||||
// $post,
|
// $post,
|
||||||
// [
|
// [
|
||||||
// 'username' => 'unique:user_logins',
|
// 'username' => 'unique:user_logins',
|
||||||
// 'email' => 'unique:user_logins',
|
// 'email' => 'unique:user_logins',
|
||||||
|
// 'g-recaptcha-response' => 'required',
|
||||||
|
// 'captcha' => 'required|min:1'
|
||||||
|
// ],
|
||||||
|
// [
|
||||||
|
// 'g-recaptcha-response.required' => 'Captcha is required',
|
||||||
|
// 'captcha.min' => 'Wrong captcha, please try again.'
|
||||||
// ]
|
// ]
|
||||||
|
|
||||||
|
$post,
|
||||||
|
[
|
||||||
|
'username' => 'unique:user_logins',
|
||||||
|
'email' => 'unique:user_logins',
|
||||||
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@@ -123,20 +123,36 @@ class CustomAuthController extends Controller
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// var_dump($post);
|
||||||
|
|
||||||
$user = User::create([
|
$user = User::create([
|
||||||
'name' => $post['name'],
|
'name' => $post['firstname'] . ' ' . $post['lastname'],
|
||||||
'username' => $post['username'],
|
'username' => $post['email'],
|
||||||
'email' => $post['email'],
|
'email' => $post['email'],
|
||||||
'password' => bcrypt($post['password']),
|
'password' => bcrypt($post['password']),
|
||||||
'role' => 'user'
|
'role' => 'user'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$country = explode("_", $post['country']);
|
// $country = explode("_", $post['country']);
|
||||||
|
|
||||||
|
// $data = array(
|
||||||
|
// 'UserId' => $user->id,
|
||||||
|
// 'CountryCode' => $country[0],
|
||||||
|
// 'Country' => $country[1]
|
||||||
|
// );
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
'UserId' => $user->id,
|
'UserId' => $user->id,
|
||||||
'CountryCode' => $country[0],
|
'Fullname' => $post['firstname'] . ' ' . $post['lastname'],
|
||||||
'Country' => $country[1]
|
'ContactNumber' => $post['mobilenumber'],
|
||||||
|
// 'OtherNotes' => $post['othernotes'],
|
||||||
|
'Address' => $post['address'],
|
||||||
|
'Address2' => $post['address2'],
|
||||||
|
'State' => $post['state'],
|
||||||
|
'City' => $post['city'],
|
||||||
|
'ZipCode' => $post['zipcode'],
|
||||||
|
'CountryCode' => $post['countryCode'],
|
||||||
|
'Country' => $post['country']
|
||||||
);
|
);
|
||||||
$userModel->insertAddressBook($data);
|
$userModel->insertAddressBook($data);
|
||||||
Auth::attempt(['email' => $post['email'], 'password' => $post['password']]);
|
Auth::attempt(['email' => $post['email'], 'password' => $post['password']]);
|
||||||
|
|||||||
@@ -201,6 +201,7 @@ class PaypalController extends Controller
|
|||||||
$shipping = PayPal::ShippingAddress();
|
$shipping = PayPal::ShippingAddress();
|
||||||
$shipping->setRecipientName($array_address_book[0]->Fullname);
|
$shipping->setRecipientName($array_address_book[0]->Fullname);
|
||||||
$shipping->setLine1($array_address_book[0]->Address);
|
$shipping->setLine1($array_address_book[0]->Address);
|
||||||
|
$shipping->setLine2($array_address_book[0]->Address2);
|
||||||
$shipping->setCity($array_address_book[0]->City);
|
$shipping->setCity($array_address_book[0]->City);
|
||||||
$shipping->setCountryCode($array_address_book[0]->CountryCode);
|
$shipping->setCountryCode($array_address_book[0]->CountryCode);
|
||||||
$shipping->setPostalCode($array_address_book[0]->ZipCode);
|
$shipping->setPostalCode($array_address_book[0]->ZipCode);
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ class UserController extends Controller {
|
|||||||
'ContactNumber' => $post['mobilenumber'],
|
'ContactNumber' => $post['mobilenumber'],
|
||||||
'OtherNotes' => $post['othernotes'],
|
'OtherNotes' => $post['othernotes'],
|
||||||
'Address' => $post['address'],
|
'Address' => $post['address'],
|
||||||
|
'Address2' => $post['address2'],
|
||||||
'State' => $post['state'],
|
'State' => $post['state'],
|
||||||
'City' => $post['city'],
|
'City' => $post['city'],
|
||||||
'ZipCode' => $post['zipcode'],
|
'ZipCode' => $post['zipcode'],
|
||||||
@@ -118,6 +119,7 @@ class UserController extends Controller {
|
|||||||
'ContactNumber' => $post['mobilenumber'],
|
'ContactNumber' => $post['mobilenumber'],
|
||||||
'OtherNotes' => $post['othernotes'],
|
'OtherNotes' => $post['othernotes'],
|
||||||
'Address' => $post['address'],
|
'Address' => $post['address'],
|
||||||
|
'Address2' => $post['address2'],
|
||||||
'State' => $post['state'],
|
'State' => $post['state'],
|
||||||
'City' => $post['city'],
|
'City' => $post['city'],
|
||||||
'ZipCode' => $post['zipcode'],
|
'ZipCode' => $post['zipcode'],
|
||||||
|
|||||||
@@ -1,82 +1,131 @@
|
|||||||
@extends('merchbay_main')
|
@extends('merchbay_main')
|
||||||
@section('main-content')
|
@section('main-content')
|
||||||
<style>
|
<style>
|
||||||
.error{
|
.error {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
.g-recaptcha {
|
|
||||||
width:100%;
|
.g-recaptcha {
|
||||||
}
|
width: 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="wrapper bg-white pb-5">
|
<div class="wrapper bg-white pb-5">
|
||||||
<div class="main__content">
|
<div class="main__content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col col-lg-5 pt-5 text-center text-lg-start">
|
<div class="col col-lg-5 pt-5 text-center text-lg-start">
|
||||||
<h4>Register</h4>
|
<h4>Register</h4>
|
||||||
<hr class="custom-hr" />
|
<hr class="custom-hr" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col col-lg-5">
|
<div class="col col-lg-5">
|
||||||
<div id="register-response-msg"></div>
|
<div id="register-response-msg"></div>
|
||||||
<form role="form" id="frm-register">
|
<form role="form" id="frm-register">
|
||||||
<input type="hidden" name="redirect" value="{{ Request::get('redirectUrl') }}">
|
<input type="hidden" name="redirect" value="{{ Request::get('redirectUrl') }}">
|
||||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||||
<div class="mb-3">
|
|
||||||
<label class="control-label">Fullname</label>
|
|
||||||
<input type="text" class="form-control" name="name" value="{{ old('name') }}" placeholder="Fullname">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="text-center my-3 clearfix">
|
||||||
|
<strong>Personal Information</strong>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="control-label">First name</label>
|
||||||
|
<input type="text" class="form-control" name="firstname" placeholder="First name">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="control-label">Last name</label>
|
||||||
|
<input type="text" class="form-control" name="lastname" placeholder="Last name">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="control-label">Email Address</label>
|
||||||
|
<input type="email" class="form-control" name="email" value="{{ old('email') }}" placeholder="Email Address">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="control-label">Phone Number</label>
|
||||||
|
<input type="text" class="form-control" name="mobilenumber" placeholder="Phone Number">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="control-label">Password</label>
|
||||||
|
<input type="password" class="form-control" name="password" id="password" required placeholder="Password">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="control-label">Confirm Password</label>
|
||||||
|
<input type="password" class="form-control" name="password_confirmation" placeholder="Confirm Password" data-rule-equalTo="#password" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <div class="mb-3">
|
||||||
<label class="control-label">Username</label>
|
<label class="control-label">Username</label>
|
||||||
<input type="text" class="form-control" name="username" value="{{ old('username') }}" placeholder="Username">
|
<input type="text" class="form-control" name="username" value="{{ old('username') }}" placeholder="Username">
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="text-center my-3 clearfix">
|
||||||
<label class="control-label">Email Address</label>
|
<strong>Address Information</strong>
|
||||||
<input type="email" class="form-control" name="email" value="{{ old('email') }}" placeholder="Email Address">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-3">
|
|
||||||
<label class="control-label">Password</label>
|
|
||||||
<input type="password" class="form-control" name="password" id="password" required placeholder="Password">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-3">
|
|
||||||
<label class="control-label">Confirm Password</label>
|
|
||||||
<input type="password" class="form-control" name="password_confirmation" placeholder="Confirm Password" data-rule-equalTo="#password" required>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-3">
|
|
||||||
<label class="control-label">Select Country</label>
|
|
||||||
<select name="country" id="country" class="form-control">
|
|
||||||
<option value="US_United States">United States</option>
|
|
||||||
<option value="CA_Canada">Canada</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-3">
|
|
||||||
<div class="g-recaptcha text-center" data-sitekey="{{ env('CAPTCHA_SITE_KEY') }}"></div>
|
|
||||||
</div>
|
|
||||||
<button
|
|
||||||
type="submit"
|
|
||||||
class="btn btn-black btn-sm w-100 mt-3"
|
|
||||||
>
|
|
||||||
Register
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
<hr class="custom-hr" />
|
|
||||||
<div class="py-3 text-start">
|
|
||||||
Have already an account?
|
|
||||||
<a href="{{ url('./auth/login') }}" class="btn btn-green btn-sm w-100"
|
|
||||||
>Login here</a
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="control-label">Select Country</label>
|
||||||
|
<select name="countryCode" id="select_country" class="form-control" onchange="selectCountry(this)">
|
||||||
|
<option value="">Select Country</option>
|
||||||
|
<option value="US">United States</option>
|
||||||
|
<option value="CA">Canada</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="control-label">State / Province</label>
|
||||||
|
<label></label>
|
||||||
|
<select class="form-control" name="state" id="lst-states">
|
||||||
|
<option value="">Select State</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="control-label">City</label>
|
||||||
|
<select class="form-control" name="city" id="lst-cities">
|
||||||
|
<option value="">Select City</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="control-label">Address 1</label>
|
||||||
|
<!-- <textarea type="text" class="form-control" name="address" placeholder="Please enter your House Number, Building and Street Name"></textarea> -->
|
||||||
|
<input type="text" class="form-control" name="address" placeholder="Address 1">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="control-label">Address 2</label>
|
||||||
|
<!-- <textarea type="text" class="form-control" name="address" placeholder="Please enter your House Number, Building and Street Name"></textarea> -->
|
||||||
|
<input type="text" class="form-control" name="address2" placeholder="Address 2">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="control-label">Zip Code</label>
|
||||||
|
<input type="text" class="form-control" name="zipcode" placeholder="Please enter your zip code">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<div class="g-recaptcha text-center" data-sitekey="{{ env('CAPTCHA_SITE_KEY') }}"></div>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-black btn-sm w-100 mt-3">
|
||||||
|
Register
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
<hr class="custom-hr" />
|
||||||
|
<div class="py-3 text-start">
|
||||||
|
Have already an account?
|
||||||
|
<a href="{{ url('./auth/login') }}" class="btn btn-green btn-sm w-100">Login here</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
@@ -1,432 +1,403 @@
|
|||||||
@extends('merchbay_main')
|
@extends('merchbay_main')
|
||||||
@section('main-content')
|
@section('main-content')
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.previewImage {
|
.previewImage {
|
||||||
height: 150px;
|
height: 150px;
|
||||||
width: 95%;
|
width: 95%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cart-store-logo {
|
.cart-store-logo {
|
||||||
border: 1px solid #e2e2e2;
|
border: 1px solid #e2e2e2;
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
</style>
|
<div class="wrapper pb-5">
|
||||||
|
<div class="main__content">
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
<div class="wrapper pb-5">
|
{{-- breadcrumbs --}}
|
||||||
<div class="main__content">
|
<div class="row">
|
||||||
<div class="container">
|
<div class="col-lg-12">
|
||||||
|
<div class="py-4">
|
||||||
{{-- breadcrumbs --}}
|
<nav aria-label="breadcrumb">
|
||||||
<div class="row">
|
<ol class="breadcrumb">
|
||||||
<div class="col-lg-12">
|
@if (isset($store_array[0]->StoreUrl))
|
||||||
<div class="py-4">
|
<li class="breadcrumb-item"><a href="{{ url('store') . '/' . $store_array[0]->StoreUrl }}">{{ $store_array[0]->StoreName }}</a>
|
||||||
<nav aria-label="breadcrumb">
|
</li>
|
||||||
<ol class="breadcrumb">
|
@else
|
||||||
@if (isset($store_array[0]->StoreUrl))
|
<li class="breadcrumb-item"><a href="{{ url('/') }}">Home</a></li>
|
||||||
<li class="breadcrumb-item"><a
|
@endif
|
||||||
href="{{ url('store') . '/' . $store_array[0]->StoreUrl }}">{{ $store_array[0]->StoreName }}</a>
|
<li class="breadcrumb-item active" aria-current="page">Shopping cart</li>
|
||||||
</li>
|
</ol>
|
||||||
@else
|
</nav>
|
||||||
<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>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row pb-5">
|
<div class="row pb-5">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<h3>Shopping Cart</h3>
|
<h3>Shopping Cart</h3>
|
||||||
@if (Session::has('cartkeyError'))
|
@if (Session::has('cartkeyError'))
|
||||||
{{-- <div class="alert alert-danger alert-dismissible">
|
{{-- <div class="alert alert-danger alert-dismissible">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
<h4><i class="fa fa-exclamation-circle"></i> Error:</h4>
|
<h4><i class="fa fa-exclamation-circle"></i> Error:</h4>
|
||||||
{!! Session::get('cartkeyError') !!}
|
{!! Session::get('cartkeyError') !!}
|
||||||
</div> --}}
|
</div> --}}
|
||||||
|
|
||||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||||
<strong>Error!</strong> {!! Session::get('cartkeyError') !!}
|
<strong>Error!</strong> {!! Session::get('cartkeyError') !!}
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="alert"
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||||
aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
</div>
|
</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>
|
||||||
|
|
||||||
@if (count($row) > 0)
|
<div class="col-md-4 col-md-push-8 order-summary">
|
||||||
<div class="row">
|
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
|
||||||
<div class="col-md-8 col-md-pull-4">
|
@if (Session::has('msg'))
|
||||||
<div style="border: 1px solid #e2e2e2; padding: 10px;">
|
<div class="alert alert-warning alert-dismissible">
|
||||||
<h6><img height="30px" class="cart-store-logo"
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
src="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo }}">
|
<h4><i class="fa fa-exclamation-triangle"></i> Warning:</h4>
|
||||||
{{ $store_array[0]->StoreName }}</h6>
|
{!! Session::get('msg') !!}
|
||||||
</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>
|
||||||
|
@endif
|
||||||
|
<h3>Order Summary</h3>
|
||||||
|
</div>
|
||||||
|
@if (!Auth::guest())
|
||||||
|
|
||||||
<div class="col-md-4 col-md-push-8 order-summary">
|
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
|
||||||
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
|
|
||||||
@if (Session::has('msg'))
|
<p><strong>Ship to:</strong></p>
|
||||||
<div class="alert alert-warning alert-dismissible">
|
|
||||||
<button type="button" class="close" data-dismiss="alert"
|
@if ($address_book === null)
|
||||||
aria-hidden="true">×</button>
|
<a href="{{ url('user/address-book/create') }}">[ Add ]</a>
|
||||||
<h4><i class="fa fa-exclamation-triangle"></i> Warning:</h4>
|
@else
|
||||||
{!! Session::get('msg') !!}
|
<div>{{ $address_book[0]->Fullname }}</div>
|
||||||
</div>
|
<div>{{ $address_book[0]->ContactNumber }}</div>
|
||||||
|
<div>
|
||||||
|
{{ $address_book[0]->Address . ' ' . $address_book[0]->Address2 . ', ' . $address_book[0]->State . ', ' . $address_book[0]->City . ', ' . $address_book[0]->Country . ', ' . $address_book[0]->CountryCode . ' ' . $address_book[0]->ZipCode }}
|
||||||
|
<a href="{{ url('user/address-book/edit/'.$address_book[0]->Id) }}">[ Edit ]</a>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
|
||||||
|
<h5>Subtotal:
|
||||||
|
<small>{{ number_format($tax['order_grandtotal'], 2) . ' ' . $store_array[0]->StoreCurrency }}</small>
|
||||||
|
</h5>
|
||||||
|
<h5>Shipping Fee:
|
||||||
|
<small>{{ number_format($shipping_fee, 2) . ' ' . $store_array[0]->StoreCurrency }}</small>
|
||||||
|
</h5>
|
||||||
|
<h5>Tax:
|
||||||
|
<small>{{ number_format($tax['tax'], 2) . ' ' . $store_array[0]->StoreCurrency }}</small>
|
||||||
|
</h5>
|
||||||
|
<hr>
|
||||||
|
<h3>Total: <span id="my_subtotal">{{ number_format($tax['order_grandtotal'] + $shipping_fee + $tax['tax'], 2) }}</span>
|
||||||
|
<small>{{ $store_array[0]->StoreCurrency }}</small>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
{{-- {{ var_dump($tax) }}
|
||||||
|
{{ var_dump($shipping_fee) }} --}}
|
||||||
|
<hr>
|
||||||
|
<div class="form-group" id="voucher_list">
|
||||||
|
@foreach ($row as $item)
|
||||||
|
@if ($item->VoucherId != null)
|
||||||
|
<div class="btn-group mb-2">
|
||||||
|
@if ($item->VoucherType == 'Percentage')
|
||||||
|
<button type="button" class="btn btn-black btn-sm dropdown-toggle" data-bs-toggle="dropdown">{{ $item->VoucherCode . ' ' . $item->VoucherValue . '%' }}
|
||||||
|
OFF</button>
|
||||||
|
@else
|
||||||
|
<button type="button" class="btn btn-black btn-sm dropdown-toggle" data-bs-toggle="dropdown">{{ $item->VoucherCode . ' ' . $item->VoucherValue . ' ' . $store_array[0]->StoreCurrency }}
|
||||||
|
OFF</button>
|
||||||
@endif
|
@endif
|
||||||
<h3>Order Summary</h3>
|
<ul class="dropdown-menu">
|
||||||
</div>
|
<li><a class="dropdown-item" href="{{ url('removeitem') . '/' . $item->Id }}">Remove</a>
|
||||||
@if (!Auth::guest())
|
</li>
|
||||||
|
</ul>
|
||||||
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
|
|
||||||
|
|
||||||
<p><strong>Ship to:</strong></p>
|
|
||||||
|
|
||||||
@if ($address_book === null)
|
|
||||||
<a href="{{ url('user/address-book/create') }}">[ Add ]</a>
|
|
||||||
@else
|
|
||||||
<div>{{ $address_book[0]->Fullname }}</div>
|
|
||||||
<div>{{ $address_book[0]->ContactNumber }}</div>
|
|
||||||
<div>
|
|
||||||
{{ $address_book[0]->Address . ', ' . $address_book[0]->State . ', ' . $address_book[0]->City . ', ' . $address_book[0]->Country . ', ' . $address_book[0]->CountryCode . ' ' . $address_book[0]->ZipCode }}
|
|
||||||
<a href="{{ url('user/address-book/edit/'.$address_book[0]->Id) }}">[ Edit ]</a>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
|
@endforeach
|
||||||
<h5>Subtotal:
|
|
||||||
<small>{{ number_format($tax['order_grandtotal'], 2) . ' ' . $store_array[0]->StoreCurrency }}</small>
|
|
||||||
</h5>
|
|
||||||
<h5>Shipping Fee:
|
|
||||||
<small>{{ number_format($shipping_fee, 2) . ' ' . $store_array[0]->StoreCurrency }}</small>
|
|
||||||
</h5>
|
|
||||||
<h5>Tax:
|
|
||||||
<small>{{ number_format($tax['tax'], 2) . ' ' . $store_array[0]->StoreCurrency }}</small>
|
|
||||||
</h5>
|
|
||||||
<hr>
|
|
||||||
<h3>Total: <span
|
|
||||||
id="my_subtotal">{{ number_format($tax['order_grandtotal'] + $shipping_fee + $tax['tax'], 2) }}</span>
|
|
||||||
<small>{{ $store_array[0]->StoreCurrency }}</small>
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
{{-- {{ var_dump($tax) }}
|
</div>
|
||||||
{{ var_dump($shipping_fee) }} --}}
|
<form id="frm_voucher">
|
||||||
<hr>
|
<div class="input-group">
|
||||||
<div class="form-group" id="voucher_list">
|
<input type="text" class="form-control" name="voucher" data-error="#error_voucher" placeholder="Enter Voucher Code">
|
||||||
@foreach ($row as $item)
|
<span class="input-group-btn">
|
||||||
@if ($item->VoucherId != null)
|
<button class="btn btn-default" id="btn_apply_voucher" type="submit">Apply</button>
|
||||||
<div class="btn-group mb-2">
|
</span>
|
||||||
@if ($item->VoucherType == 'Percentage')
|
|
||||||
<button type="button" class="btn btn-black btn-sm dropdown-toggle"
|
|
||||||
data-bs-toggle="dropdown">{{ $item->VoucherCode . ' ' . $item->VoucherValue . '%' }}
|
|
||||||
OFF</button>
|
|
||||||
@else
|
|
||||||
<button type="button" class="btn btn-black btn-sm dropdown-toggle"
|
|
||||||
data-bs-toggle="dropdown">{{ $item->VoucherCode . ' ' . $item->VoucherValue . ' ' . $store_array[0]->StoreCurrency }}
|
|
||||||
OFF</button>
|
|
||||||
@endif
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li><a class="dropdown-item"
|
|
||||||
href="{{ url('removeitem') . '/' . $item->Id }}">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>
|
||||||
|
<span id="error_voucher" style="color: #dd4b39"></span>
|
||||||
|
</form>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style="border: 1px solid #e2e2e2; padding: 10px;">
|
<div style="border: 1px solid #e2e2e2; padding: 10px;">
|
||||||
<a @if ($getSubtotal <= 0) disabled @endif href="{{ url('getCheckout') }}" class="btn w-100"
|
<a @if ($getSubtotal <=0) disabled @endif href="{{ url('getCheckout') }}" class="btn w-100" style="background-color: #ffc300; border-color: #e2ad00; text-align: -webkit-center;">Checkout</a><br>
|
||||||
style="background-color: #ffc300; border-color: #e2ad00; text-align: -webkit-center;">Checkout</a><br>
|
<!-- <div class="my-2">
|
||||||
<!-- <div class="my-2">
|
|
||||||
<button class="btn btn-lg btn-info w-100">Checkout with Voucher</button>
|
<button class="btn btn-lg btn-info w-100">Checkout with Voucher</button>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="bg-info p-2 mt-2">
|
<div class="border rounded-2 p-2 mt-2">
|
||||||
Be advised payments made on merchbay will show up as crewsportswear on your receipt
|
Payments made on Merchbay will show up as Crewsportswear on your order confirmations and receipt.
|
||||||
</div>
|
|
||||||
</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>
|
||||||
|
|
||||||
</div>
|
<div class="border rounded-2 p-2 mt-2">
|
||||||
@else
|
Store payments are processed through PayPal. A PayPal account is not required to make a purchase. If you do not have a PayPal account click on “Pay with Debit or Credit Card” on the PayPal check out page
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12 text-center">
|
|
||||||
<h3 style="color:#d2d2d2;">Your cart is currently empty.</h3>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
|
||||||
|
<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>
|
</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>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
@@ -115,12 +115,15 @@
|
|||||||
|
|
||||||
$("#frm-register").validate({
|
$("#frm-register").validate({
|
||||||
rules: {
|
rules: {
|
||||||
name: {
|
firstname: {
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
username: {
|
lastname: {
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
// username: {
|
||||||
|
// required: true
|
||||||
|
// },
|
||||||
email: {
|
email: {
|
||||||
required: true,
|
required: true,
|
||||||
email: true
|
email: true
|
||||||
@@ -128,6 +131,24 @@
|
|||||||
password: {
|
password: {
|
||||||
required: true
|
required: true
|
||||||
//minlength: 6 // <-- removed underscore
|
//minlength: 6 // <-- removed underscore
|
||||||
|
},
|
||||||
|
mobilenumber: {
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
address: {
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
state: {
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
city: {
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
zipcode: {
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
countryCode: {
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
messages: {},
|
messages: {},
|
||||||
@@ -182,6 +203,148 @@
|
|||||||
|
|
||||||
}); // end document ready
|
}); // end document ready
|
||||||
|
|
||||||
|
|
||||||
|
function getSelectedCountry() {
|
||||||
|
var selectedState = $('#select_country').data('selected');
|
||||||
|
if (selectedState) {
|
||||||
|
// console.log(selectedState)
|
||||||
|
$("#select_country").val(selectedState).change();
|
||||||
|
// selectCountry()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectCountry(item) {
|
||||||
|
|
||||||
|
const country = item.options[item.selectedIndex].text;
|
||||||
|
const countryCode = item.options[item.selectedIndex].value
|
||||||
|
console.log(countryCode)
|
||||||
|
|
||||||
|
if (countryCode === "US") {
|
||||||
|
fetchUSA()
|
||||||
|
}
|
||||||
|
|
||||||
|
if (countryCode === "CA") {
|
||||||
|
fetchCanada()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function fetchCanada() {
|
||||||
|
$.getJSON("{{ asset('/public/api/canada.json') }}", function(items) {
|
||||||
|
var states = [];
|
||||||
|
|
||||||
|
Object.keys(items).forEach(function(state) {
|
||||||
|
states.push(state)
|
||||||
|
});
|
||||||
|
|
||||||
|
var uniqueStates = Array.from(new Set(states));
|
||||||
|
var selectedState = $('#lst-states').data('selected');
|
||||||
|
|
||||||
|
$('.dynamic-state').remove();
|
||||||
|
$('.dynamic-city').remove();
|
||||||
|
uniqueStates.sort().forEach(function(key) {
|
||||||
|
if (selectedState == key) {
|
||||||
|
$('#lst-states').append('<option value="' + key + '" selected class="dynamic-state">' + key + '</option>');
|
||||||
|
|
||||||
|
var cities = [];
|
||||||
|
cities = items[selectedState];
|
||||||
|
var uniqueCities = Array.from(new Set(cities));
|
||||||
|
var selectedCity = $('#lst-cities').data('selected');
|
||||||
|
$('.dynamic-city').remove();
|
||||||
|
uniqueCities.sort().forEach(function(key) {
|
||||||
|
if (selectedCity == key) {
|
||||||
|
$('#lst-cities').append('<option value="' + key + '" class="dynamic-city" selected>' + key + '</option>');
|
||||||
|
} else {
|
||||||
|
$('#lst-cities').append('<option value="' + key + '" class="dynamic-city">' + key + '</option>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$('#lst-states').append('<option value="' + key + '" class="dynamic-state">' + key + '</option>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$(document).on('select change', '#lst-states', function() {
|
||||||
|
var cities = [];
|
||||||
|
var selectedState = $(this).val()
|
||||||
|
cities = items[selectedState];
|
||||||
|
var uniqueCities = Array.from(new Set(cities));
|
||||||
|
$('.dynamic-city').remove();
|
||||||
|
uniqueCities.sort().forEach(function(key) {
|
||||||
|
$('#lst-cities').append('<option value="' + key + '" class="dynamic-city">' + key + '</option>');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function fetchUSA() {
|
||||||
|
$.getJSON("{{ asset('/public/api/usaCities.json') }}", function(data) {
|
||||||
|
var states = [];
|
||||||
|
|
||||||
|
for (i = 0; i < data.length; i++) {
|
||||||
|
states.push(data[i]['state']);
|
||||||
|
}
|
||||||
|
var uniqueStates = Array.from(new Set(states));
|
||||||
|
var selectedState = $('#lst-states').data('selected');
|
||||||
|
$('.dynamic-state').remove();
|
||||||
|
$('.dynamic-city').remove();
|
||||||
|
uniqueStates.sort().forEach(function(key) {
|
||||||
|
if (selectedState == key) {
|
||||||
|
$('#lst-states').append('<option value="' + key + '" selected class="dynamic-state">' + key + '</option>');
|
||||||
|
//
|
||||||
|
var cities = [];
|
||||||
|
for (i = 0; i < data.length; i++) {
|
||||||
|
console.log(data[i])
|
||||||
|
cities.push(data[i]);
|
||||||
|
}
|
||||||
|
var city = getCities(cities, key);
|
||||||
|
var uniqueCities = Array.from(new Set(city));
|
||||||
|
var selectedCity = $('#lst-cities').data('selected');
|
||||||
|
$('.dynamic-city').remove();
|
||||||
|
uniqueCities.sort().forEach(function(key) {
|
||||||
|
if (selectedCity == key) {
|
||||||
|
$('#lst-cities').append('<option value="' + key + '" class="dynamic-city" selected>' + key + '</option>');
|
||||||
|
} else {
|
||||||
|
$('#lst-cities').append('<option value="' + key + '" class="dynamic-city">' + key + '</option>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$('#lst-states').append('<option value="' + key + '" class="dynamic-state">' + key + '</option>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$(document).on('select change', '#lst-states', function() {
|
||||||
|
var cities = [];
|
||||||
|
for (i = 0; i < data.length; i++) {
|
||||||
|
cities.push(data[i]);
|
||||||
|
}
|
||||||
|
var city = getCities(cities, $(this).val());
|
||||||
|
var uniqueCities = Array.from(new Set(city));
|
||||||
|
$('.dynamic-city').remove();
|
||||||
|
uniqueCities.sort().forEach(function(key) {
|
||||||
|
|
||||||
|
$('#lst-cities').append('<option value="' + key + '" class="dynamic-city">' + key + '</option>');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCities(arr, q) {
|
||||||
|
var sd = [];
|
||||||
|
arr.find(function(element) {
|
||||||
|
if (element['state'] == q) {
|
||||||
|
sd.push(element['city']);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return sd;
|
||||||
|
}
|
||||||
|
|
||||||
function submitLoginForm() {
|
function submitLoginForm() {
|
||||||
// method="POST" action="{{ url('/auth/login') }}"
|
// method="POST" action="{{ url('/auth/login') }}"
|
||||||
var data = $("#frm-login").serialize();
|
var data = $("#frm-login").serialize();
|
||||||
@@ -218,7 +381,13 @@
|
|||||||
} /* login submit */
|
} /* login submit */
|
||||||
|
|
||||||
function submitRegisterForm() {
|
function submitRegisterForm() {
|
||||||
var data = $("#frm-register").serialize();
|
|
||||||
|
var data = $("#frm-register").serializeArray();
|
||||||
|
data.push({
|
||||||
|
name: "country",
|
||||||
|
value: $("#select_country option:selected").text()
|
||||||
|
});
|
||||||
|
// var data = $("#frm-register").serialize();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
@foreach($array_address_book as $row)
|
@foreach($array_address_book as $row)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $row->Fullname }}</td>
|
<td>{{ $row->Fullname }}</td>
|
||||||
<td>{{ $row->Address }}, {{ $row->State }}, {{ $row->City }}, {{ $row->Country}} {{ $row->CountryCode}}, {{ $row->ZipCode }}</td>
|
<td>{{ $row->Address . ' ' . $row->Address2 }}, {{ $row->State }}, {{ $row->City }}, {{ $row->Country}} {{ $row->CountryCode}}, {{ $row->ZipCode }}</td>
|
||||||
<td>{{ $row->ContactNumber }}</td>
|
<td>{{ $row->ContactNumber }}</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a href="{{ url('user/address-book/edit/') }}/{{ $row->Id }}" class="btn btn-default btn-xs"><i class="fa fa-edit"></i> Edit</a>
|
<a href="{{ url('user/address-book/edit/') }}/{{ $row->Id }}" class="btn btn-default btn-xs"><i class="fa fa-edit"></i> Edit</a>
|
||||||
|
|||||||
@@ -66,8 +66,12 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>House Number, Building and Street Name</label>
|
<label>Address 1</label>
|
||||||
<textarea type="text" class="form-control" name="address" placeholder="Please enter your House Number, Building and Street Name"></textarea>
|
<textarea type="text" class="form-control" name="address" placeholder="Address 1"></textarea>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Address 2</label>
|
||||||
|
<textarea type="text" class="form-control" name="address2" placeholder="Address 2"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Zip Code</label>
|
<label>Zip Code</label>
|
||||||
|
|||||||
@@ -66,8 +66,13 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>House Number, Building and Street Name</label>
|
<label>Address 1</label>
|
||||||
<input type="text" class="form-control" name="address" placeholder="Please enter your House Number, Building and Street Name" value="{{ $array_address_book[0]->Address }}">
|
<input type="text" class="form-control" name="address" placeholder="Address 1" value="{{ $array_address_book[0]->Address }}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Address 2</label>
|
||||||
|
<input type="text" class="form-control" name="address2" placeholder="Address 2" value="{{ $array_address_book[0]->Address2 }}">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Zip Code</label>
|
<label>Zip Code</label>
|
||||||
|
|||||||
Reference in New Issue
Block a user