fixed user dashboard for store owner (store settings, store reports)/ fixed login/register page/

This commit is contained in:
Frank John Begornia
2019-09-24 19:52:38 +08:00
parent 502b13e793
commit 83f0624f07
45 changed files with 17655 additions and 373 deletions

View File

@@ -23,6 +23,15 @@
<!-- <link href="{{asset('public/assets/login/css/style.css')}}" rel="stylesheet">
<link href="{{asset('public/assets/login/css/form-elements.css')}}" rel="stylesheet"> -->
<script src='https://www.google.com/recaptcha/api.js'></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-136108155-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-136108155-1');
</script>
</head>
<body>
<!-- <nav class="navbar navbar-default">

View File

@@ -14,7 +14,7 @@
<div class="form-wrapper">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="text-center">L O G I N</h3>
<h3 class="text-center">S I G N - I N</h3>
</div>
<div class="panel-body">
<div class="row">
@@ -38,9 +38,17 @@
</label>
<p class="help-block">(if this is a private computer)</p>
</div>
<button type="submit" id="btn-login" class="btn btn-success btn-block"><span class="glyphicon glyphicon-log-in"></span> &nbsp; Sign in</button>
<button type="submit" id="btn-login" class="btn btn-success btn-block"><i class="fa fa-sign-in"></i> &nbsp; Sign in</button>
<a href="{{ url('/password/email') }}" class="btn btn-link btn-block">Forgot Your Password?</a>
</form>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<hr />
<p class="text-center">Don't have an account? Register Now!</p>
<a href="{{ url('/auth/register') }}" type="submit" id="btn-login" class="btn btn-primary btn-block">Register</a>
</div>
</div>
</div>

View File

@@ -61,6 +61,13 @@
</form>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<hr />
<p class="text-center">Have already an account?</p>
<a href="{{ url('/auth/login') }}" type="submit" id="btn-login" class="btn btn-success btn-block">Login here</a>
</div>
</div>
</div>
</div>
</div>

View File

@@ -77,6 +77,15 @@
}
</style>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-136108155-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-136108155-1');
</script>
</head>
<body>
@include('layout.navbar')

View File

@@ -197,6 +197,15 @@
}
</style>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-136108155-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-136108155-1');
</script>
</head>
<body>
<div class="navbar-holder">
@@ -267,6 +276,14 @@
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="512px" height="512px" style="position:absolute; top: 50%; left: 50%;"></canvas>
@endif
<!-- Hoodie -->
@if($template->Type == "Hoodie" && $template->Side == "Front" && $template->TemplateFormat == "svg")
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="158px" height="174px" style="margin-top:193px; margin-left: 0px;"></canvas>
@endif
@if($template->Type == "Hoodie" && $template->Side == "Back" && $template->TemplateFormat == "svg")
<canvas id="canvas_{{ $template->Type }}_{{ $template->Side }}" width="158px" height="174px" style="margin-top:171px; margin-left:0xp;"></canvas>
@endif
</div>
</div>
</div>
@@ -444,7 +461,8 @@
@else
<h4>Trim {{ $i }}</h4>
@endif
<!-- <h4 id="h4_Trim_{{ $i }}">Trim {{ $i }}</h4> -->
<ul class="nav nav-pills nav-stacked col-md-4">
<li class="active"><a href="#tab_trim_basecolor{{ $i }}" data-toggle="pill">Base Color</a></li>
<li><a href="#tab_trimpattern{{ $i }}" data-toggle="pill">Pattern</a></li>
@@ -852,8 +870,6 @@
function callbackFuncWithData(data){
console.log(data)
}
myCart();
$('#toTop').click(function() {
$('body,html').animate({scrollTop:0},800);
@@ -1009,7 +1025,9 @@
loadClipartContent();
var get_template_type = "{{ $template->Type }}";
if(get_template_type != "Shirts"){
// if((get_template_type != "Shirts") || (get_template_type != "Hoodie")){
if(get_template_type != "Hoodie" && get_template_type != "Shirts" ){
addDefaultTeamText();
addNameNumber();
}
@@ -1483,7 +1501,7 @@
var gradientPrefix = sideName+"_"+type+"_";
var tempPath = "{{ config('site_config.uploads') }}" + pathLocation;
// console.log(tempPath)
console.log(tempPath)
if(!document.getElementById(objectId))
return false;
@@ -1611,14 +1629,24 @@
xhr.setRequestHeader( 'X-Requested-With', 'XMLHttpRequest');
},
success: function(response) {
// console.log(response);
var objColor = jQuery.parseJSON(response);
for (var i = 0; i < objColor.length; i++){
for (var key in objColor[i]) {
if(key == "default_mainColor"){
$("#mainColor").spectrum("set", objColor[i][key]);
}else{
$("input#Trim_"+key+".trimColor").spectrum("set", objColor[i][key]);
if(objColor[i][key] != null){
console.log( objColor[i][key]);
// $().html()
}
// for(var k in objColor[i][']){
// }
colorPickerCustom();
}
}
@@ -3425,8 +3453,9 @@
var y = 0.2126*color._r + 0.7152*color._g + 0.0722*color._b;
// var c = y < 128 ? 'white' : 'black';
document.getElementById(mainColorId).setAttribute("fill", onMoveColor);
try{
document.getElementById(mainColorId).setAttribute("fill", onMoveColor);
if(y < 128){
document.getElementById(sideName+'_Grid_Lines_Path').setAttribute("stroke", "white");
@@ -4221,18 +4250,6 @@
});
}
//################### E N D C O L O R P A L E T T E S #######################//
function myCart(){
$.ajax({ //create an ajax request to load_page.php
type: "GET",
url: "{{url('cartcount')}}",
dataType: "html",
success: function(response){
$("#my-cart-count").html(response);
}
});
}
</script>
</body>

View File

@@ -64,6 +64,15 @@
text-transform: uppercase;
}
</style>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-136108155-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-136108155-1');
</script>
</head>
<body>
@@ -87,7 +96,6 @@
<script src="{{ asset('public/assets/js/crew-designer.js') }}"></script>
<script>
$(function(){
myCart();
$(".hide-row").hide();
// $(window).scroll(function() {
@@ -172,18 +180,6 @@
return false;
}
function myCart(){
$.ajax({ //create an ajax request to load_page.php
type: "GET",
url: "{{url('cartcount')}}",
dataType: "html",
success: function(response){
$("#my-cart-count").html(response);
}
});
}
function setModalMaxHeight(element) {
this.$element = $(element);
this.$content = this.$element.find('.modal-content');

View File

@@ -18,9 +18,10 @@
<a href="{{ url('teamstore') }}"><span style="text-transform:uppercase;">Team Store</span></a>
</li>
<li style="font-size: 14px;">
<a href="{{ url('cart') }}"><span style="text-transform:uppercase;">My Cart</span> <i class="fa fa-shopping-cart"></i> <span class="badge" id="my-cart-count">0</span></a>
<li style="font-size: 14px;">
<a href="{{ url('cart') }}"><span style="text-transform:uppercase;">My Cart</span> <i class="fa fa-shopping-cart"></i>
<span class="badge" id="my-cart-count">{{ \App\Http\Controllers\MainController::getCountCart() }}</span>
</a>
</li>
<li>
@@ -35,7 +36,6 @@
<li>
<a href="#" data-toggle="modal" data-target="#modalLogin" title="Register">Register</a>
</li>
@else
<li>
<a href="{{ url('/auth/login') }}" title="Login">Sign in</a>
@@ -70,10 +70,7 @@
</li> -->
</ul>
</li>
</ul>
</div>
</div>
</nav>

View File

@@ -33,7 +33,60 @@
@if(count($row) > 0)
<div class="row">
<div class="col-md-8">
<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">{{ $getSubtotal }}</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]->StoreUrl . '/' . $store_array[0]->StoreLogo }}"> {{ $store_array[0]->StoreName }}</h4>
</div>
@@ -199,61 +252,6 @@
@endforeach
</div>
<div class="row">
<div class="col-md-4 order-summary" >
<div style="border: 1px solid #e2e2e2; padding: 10px; border-bottom: none;">
@if(Session::has('msg'))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> ERROR:</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">{{ $getSubtotal }}</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>
</div>
@else
<div class="row">

View File

@@ -54,7 +54,17 @@
<link href="{{asset('/public/designer/css/build.css')}}" rel="stylesheet">
<style>
</style>
</style>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-136108155-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-136108155-1');
</script>
</head>
<body>
@@ -80,7 +90,6 @@
<script>
$(document).ready(function() {
myCart();
// $('.img-zoom').zoom();
$('.inputName').keyup(function() {
this.value = this.value.toLocaleUpperCase();
@@ -590,18 +599,6 @@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ end adding of rows @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
}); //end document ready
function myCart(){
$.ajax({ //create an ajax request to load_page.php
type: "GET",
url: "{{url('cartcount')}}",
dataType: "html",
success: function(response){
$("#my-cart-count").html(response);
}
});
}
</script>
</body>
</html>

View File

@@ -82,7 +82,7 @@
@if($store_array[0]->StoreBanner == null)
background-image: url("{{ config('site_config.uploads') . 'teamstore/store-banner-dark.png' }}");
@else
background-image: url("{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->StoreUrl . '/' . $store_array[0]->StoreBanner }}");
background-image: url("{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner }}");
@endif
background-color: #f3f3f3;
background-position: center;

View File

@@ -49,7 +49,7 @@
<div class="input-group">
<input type="text" class="form-control" placeholder="Search Store" value="{{ $keyword }}" name="q">
<div class="input-group-btn">
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
<button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
</div>
</div>
</div>
@@ -82,12 +82,12 @@
<div style="border: 1px solid #dddddd; padding: 5px;">
@if($store->Password != null )
<a class="thumbnail password-protected" href="#" data-store-url="{{ $store->StoreUrl }}">
<img class="store-logo" src="{{ config('site_config.uploads') . 'teamstore/'. $store->StoreUrl . '/' . $store->StoreLogo }}">
<img class="store-logo" src="{{ config('site_config.uploads') . 'teamstore/'. $store->ImageFolder . '/' . $store->StoreLogo }}">
</a>
<h4 style="border-top: 1px solid #dddddd; padding: 10px; font-size: 16px; font-weight: bold; text-transform: uppercase;" class="text-center">{{ $store->StoreName }} <i class="fa fa-lock" title="This store is password protected."></i></h4>
@else
<a class="thumbnail" href="{{ url('teamstore') . '/' . $store->StoreUrl }}">
<img class="store-logo" src="{{ config('site_config.uploads') . 'teamstore/' . $store->StoreUrl . '/' . $store->StoreLogo }}">
<img class="store-logo" src="{{ config('site_config.uploads') . 'teamstore/' . $store->ImageFolder . '/' . $store->StoreLogo }}">
</a>
<h4 style="border-top: 1px solid #dddddd; padding: 10px; font-size: 16px; font-weight: bold; text-transform: uppercase;" class="text-center">{{ $store->StoreName }}</h4>
@endif

View File

@@ -32,7 +32,7 @@
<div style="min-height:500px;">
<input type="file" id="imgupload" name="imgupload[]" style="display:none;" multiple accept="image/*"/>
<a href="#" id="OpenImgUpload" style="position:absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);" >
<i style="font-size: 125px;" class="fa fa-picture-o"></i>
<img class="img img-responsive product-center " style="height: 65.45px;" src="{{ asset('/public/images/add-new-img.svg') }}"/>
<div class="text-center"> Add item image(s)</div>
<!-- <div class="gallery"></div> -->
</a>
@@ -88,7 +88,7 @@
</div>
<div class="form-group">
<label>Item Price</label>
<input id="item_price" name="itemPrice" class="form-control price_format" type="text" data-error="#err-price" />
<input id="item_price" name="itemPrice" class="form-control price_format" value="0.00" type="text" data-error="#err-price" />
</div>
<div class="form-group">
<label>Item Form</label>
@@ -116,6 +116,7 @@
<option value="toddler">Toddler</option>
<option value="youth">Youth</option>
<option value="adult">Adult</option>
<option value="none">None</option>
</select>
<span id="err_available_size"></span>
</div>

View File

@@ -40,7 +40,7 @@
<div class="col-md-12 col-sm-12">
<a href="{{ url('/') }}/{{ Request::path() }}/view/{{ $row->DesignCode }} " class="btn btn-warning btn-xs"><i class="fa fa-eye"></i> View</a>
<!-- <a href="{{ url('designer/edit') }}/{{ $row->DesignCode }}" class="btn btn-default btn-xs"><i class="fa fa-edit"></i> Edit Design</a> -->
<a href="{{ url('user/my-designs/buy-design') }}/{{ $row->DesignCode }}" class="btn btn-primary btn-xs"><i class="fa fa-shopping-cart"></i> Buy</a>
<!-- <a href="{{ url('user/my-designs/buy-design') }}/{{ $row->DesignCode }}" class="btn btn-primary btn-xs"><i class="fa fa-shopping-cart"></i> Buy</a> -->
@if(Auth::user()->role == "store_owner")
<a href="{{ url('user/my-designs/sell-design/' . $row->DesignCode) }}" class="btn btn-success btn-xs"><i class="fa fa-usd"></i> Sell</a>
@endif

View File

@@ -0,0 +1,143 @@
<table class="table table-condensed table-bordered">
<tr >
<th class="bg-info" colspan="2">Payer Information</th>
<th class="text-center bg-info">Shipping Address</th>
</tr>
<tr>
<th class="col-md-3">Payer Name</th>
<td>{{ $array_payment_details[0]->Payer_Firstname . ' ' . $array_payment_details[0]->Payer_Lastname }}</td>
<td rowspan="3">
{{ $array_shipping_add[0]->recipient_name }}<br>
{{ $array_shipping_add[0]->line1 . ' ' . $array_shipping_add[0]->line2 . ', ' }}<br>
{{ $array_shipping_add[0]->city . ', ' . $array_shipping_add[0]->state . ' ' . $array_shipping_add[0]->postal_code }}<br>
{{ $array_shipping_add[0]->country_code }}
</td>
</tr>
<tr>
<th class="col-md-3">Payer Email Address</th>
<td>{{ $array_payment_details[0]->Payer_Email }}</td>
</tr>
<tr>
<th class="col-md-3">Payment Method</th>
<td>{{ $array_payment_details[0]->PaymentMethod }}</td>
</tr>
<tr >
<th class="bg-info" colspan="3">Transaction Information</th>
</tr>
<tr>
<th class="col-md-3">Invoice #</th>
<td colspan="2">{{ $array_payment_details[0]->InvoiceNumber }}</td>
</tr>
</table>
<div style="border: 1px solid #e2e2e2; padding: 10px; margin-bottom: 10px;">
<div class="row">
<div class="col-md-2">
<div class="text-center">
<img class="previewImage" id="active_thumbnail" src="{{ config('site_config.prod_private_server_ip') . '/images/' . $array_thumbnail_display[0]->Image }}">
</div>
</div>
<div class="col-md-10">
<table class="table table-striped table-condensed">
@if($array_item[0]->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>
</tr>
@elseif($array_item[0]->FormUsed=="tshirt-form")
<tr>
<th>Size</th>
<th>Price</th>
<th>Quantity</th>
<!-- <th></th> -->
</tr>
@elseif($array_item[0]->FormUsed=="quantity-form")
<tr>
<th>Price</th>
<th>Quantity</th>
</tr>
@elseif($array_item[0]->FormUsed=="name-number-form")
<tr>
<th>Name</th>
<th>Number</th>
<th>Price</th>
<th>Quantity</th>
</tr>
@elseif($array_item[0]->FormUsed=="name-number-size-form")
<tr>
<th>Name</th>
<th>Number</th>
<th>Size</th>
<th>Price</th>
<th>Quantity</th>
</tr>
@elseif($array_item[0]->FormUsed=="number-form")
<tr>
<th>Number</th>
<th>Price</th>
<th>Quantity</th>
</tr>
@else
@endif
@if($array_item[0]->FormUsed=="jersey-and-shorts-form")
<tr>
<td> @if($array_item[0]->Name != '') {{ $array_item[0]->Name }} @else -- @endif </td>
<td>{{ $array_item[0]->Number }}</td>
<td>{{ $array_item[0]->JerseySize }}</td>
<td>{{ $array_item[0]->ShortsSize }}</td>
<td>{{ $array_item[0]->Price }}</td>
<td>{{ $array_item[0]->Quantity }}</td>
</tr>
@elseif($array_item[0]->FormUsed=="tshirt-form")
<tr>
<td>{{ $array_item[0]->Size }}</td>
<td>{{ $array_item[0]->Price }}</td>
<td>{{ $array_item[0]->Quantity }}</td>
<!-- <td><a href="{{ url('admin/orders/download/tshirt' . '/' . $array_item[0]->DesignCode . '/' . $array_item[0]->Id )}}" class="btn btn-xs btn-primary"><i class="fa fa-download"></i> Download Print File</a></td> -->
</tr>
@elseif($array_item[0]->FormUsed=="quantity-form")
<tr>
<td>{{ $array_item[0]->Price }}</td>
<td>{{ $array_item[0]->Quantity }}</td>
</tr>
@elseif($array_item[0]->FormUsed=="name-number-form")
<tr>
<td>{{ $array_item[0]->Name }}</td>
<td>{{ $array_item[0]->Number }}</td>
<td>{{ $array_item[0]->Price }}</td>
<td>{{ $array_item[0]->Quantity }}</td>
</tr>
@elseif($array_item[0]->FormUsed=="name-number-size-form")
<tr>
<td>{{ $array_item[0]->Name }}</td>
<td>{{ $array_item[0]->Number }}</td>
<td>{{ $array_item[0]->Size }}</td>
<td>{{ $array_item[0]->Price }}</td>
<td>{{ $array_item[0]->Quantity }}</td>
</tr>
@elseif($array_item[0]->FormUsed=="number-form")
<tr>
<td>{{ $array_item[0]->Number }}</td>
<td>{{ $array_item[0]->Price }}</td>
<td>{{ $array_item[0]->Quantity }}</td>
</tr>
@else
@endif
</table>
</div>
</div>
</div>

View File

@@ -49,7 +49,7 @@
</li>
@endif
@if(Auth::user()->role == "store_owner")
<li class="treeview menu-open {{ Request::is('user/store-items', 'user/store-settings') ? 'active' : '' }}">
<li class="treeview menu-open {{ Request::is('user/store-items', 'user/store-settings', 'user/store-orders') ? 'active' : '' }}">
<a href="#">
<i class="fa fa-cog"></i> <span>Team Store</span>
<span class="pull-right-container">

View File

@@ -0,0 +1,112 @@
@extends('user-layouts.user_template')
@section('content')
<style>
.previewImage{
height: 150px;
width: 95%;
overflow:hidden;
object-fit: contain;
}
</style>
<div class="content-wrapper" style="min-height: 916px;">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Store Order
<!-- <small>Control panel</small> -->
</h1>
<ol class="breadcrumb">
<li><a href="{{ url ('user') }}"><i class="fa fa-home"></i> Home</a></li>
<li class="active">Team Store</li>
<li class="active">Store Orders</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">
Store Order List
</h3>
</div>
<div class="box-body">
<div class="row">
<div class="col-md-3">
<div class="form-group">
<label class="control-label">Select Date From: <span class="required">*</span></label>
<input type="text" name="min" class="form-control datepicker-reports" id="min" placeholder="Select Date" required autocomplete="off"/>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="control-label">Select Date To: <span class="required">*</span></label>
<input type="text" name="max" class="form-control datepicker-reports" id="max" placeholder="Select Date" required autocomplete="off"/>
</div>
</div>
<div class="col-md-12">
<table class="table table-bordered" id="tbl_store_orders">
<thead>
<tr>
<th>Invoice No.</th>
<th>Product Name</th>
<th>Price</th>
<th>Quantity</th>
<th>#</th>
<th>Date Ordered</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tbody>
@foreach($array_store_orders as $item_order)
<tr>
<td>{{ $item_order->InvoiceNumber }}</td>
<td>{{ $item_order->ProductName }}</td>
<td>{{ $item_order->Price . ' ' . $item_order->Currency }}</td>
<td>{{ $item_order->Quantity }} </td>
<td>{{ date('Y/m/d', strtotime($item_order->DateCreated)) }}</td>
<td>{{ date('F j, Y g:i a', strtotime($item_order->DateCreated)) }}</td>
<td class="text-center">
<a href="#" data-pid="{{ $item_order->ProductId }}" data-id="{{ $item_order->Id }}" data-ck="{{ $item_order->CartKey }}" class="btn btn-default btn-xs btn-order-item-details">View Details</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
<div class="box-footer">
<!-- <button type="submit" class="btn btn-primary btn-custom-save">Save</button> -->
</div>
<div>
</div>
</div>
</section>
<!-- /.content -->
</div>
<!-- Modal -->
<div class="modal fade" id="modal_store_order_details" role="dialog">
<div class="modal-dialog modal-lg">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Order Details</h4>
</div>
<div class="modal-body">
<div id="modal_store_order_details_body_content">
<p> Loading content <i class="fa fa-spinner fa-spin"></i> </p>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -35,28 +35,17 @@
<h3 class="box-title">
Item List
</h3>
<div class="box-tools pull-right">
<a href="{{ url('user/store-items/add-item') }}" type="button" class="btn btn-primary btn-sm">
<i class="fa fa-plus"></i> Add new Item
</a>
<!-- <div class="btn-group">
<button type="button" class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i></button>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
</ul>
</div>
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button> -->
</div>
</div>
<!-- <form role="form" id="frm-change-password"> -->
<div class="box-body">
<div class="row">
<div class="col-md-12">
<div class="well">
<a href="{{ url('user/store-items/add-item') }}" type="button" class="btn btn-primary">
<i class="fa fa-plus"></i> Add new Item
</a>
</div>
</div>
<!-- BEGIN PRODUCTS -->
@foreach($product_array as $i => $product)
@@ -69,7 +58,7 @@
<div class="col-md-3 col-sm-6">
<div class="thumbnail">
<a href="{{ url('user/store-items/item') }}/{{ $product->ProductURL }}">
<img style="height:200px" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $filename }}" alt="{{ $product->ProductName }}" >
<img style="height:200px" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $filename . '?t=' . time() }}" alt="{{ $product->ProductName }}" >
</a>
<hr class="line">
<div class="pull-right">

View File

@@ -1,60 +1,5 @@
@extends('user-layouts.user_template')
@section('content')
<style>
@media screen and (min-width: 768px){
.container .jumbotron, .container-fluid .jumbotron {
padding-right: 15px;
padding-left: 15px;
}
}
.container .jumbotron, .container-fluid .jumbotron{
border-radius: 0px;
}
/* .jumbotron {
padding-top: 20px;
padding-bottom: 20px;
background-image: url("{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->StoreUrl . '/' . $store_array[0]->StoreBanner }}");
background-color: #f3f3f3;
background-position: center;
background-size: cover;
width: 100%;
height: 128px;
} */
.store-name{
background-color: #ffffff;
position: absolute;
padding: 10px;
}
@media (min-width: 200px) {
.jumbotron { height: 50px; }
}
@media (min-width: 400px) {
.jumbotron { height: 57px; }
}
@media (min-width: 768px) {
.jumbotron { height: 100px; }
}
@media (min-width: 992px) {
.jumbotron {
height: 128px;
/* width: 1140px; */
}
}
.product-name-holder{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
<div class="content-wrapper" style="min-height: 916px;">
<!-- Content Header (Page header) -->
<section class="content-header">
@@ -69,60 +14,107 @@
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="box box-primary">
<section class="content container-fluid">
<div class="row">
<div class="col-md-12">
<div class="box">
<form class="form-horizontal" id="frm_edit_store" enctype="multipart/form-data">
<div class="box-header with-border">
<h3 class="box-title">
Current Setting
</h3>
<h4 class="box-title">Edit Store</h4>
</div>
<div class="box-body">
<div class="row">
<div class="col-md-6">
<form role="form">
<div class="box-body">
<div class="form-group">
<label>Store Name <button type="button" class="btn btn-link btn-sm"><i class="fa fa-edit"></i> Edit</button></label>
<p>{{ $store_array[0]->StoreName }}</p>
</div>
<div class="form-group">
<label>Store Password <button type="button" class="btn btn-link btn-sm"><i class="fa fa-edit"></i> Edit</button></label>
@if($store_array[0]->Password != null)
<div class="badge">Yes</div>
@else
<p>
<div class="badge">No Password</div>
</p>
@endif
</div>
<div class="form-group">
<label>Store Banner <button type="button" class="btn btn-link btn-sm"><i class="fa fa-edit"></i> Edit</button></label>
<div>
<img src="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->StoreUrl . '/' . $store_array[0]->StoreBanner }}" class="img img-responsive">
</div>
</div>
<div class="form-group">
<label>Store Logo <button type="button" class="btn btn-link btn-sm"><i class="fa fa-edit"></i> Edit</button></label>
<div>
<img src="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->StoreUrl . '/' . $store_array[0]->StoreLogo }}" width="150px">
</div>
</div>
<div id="edit_store_msg"></div>
<div class="col-lg-8 col-sm-8">
<div class="form-group">
<label class="col-sm-4 control-label">Store Name</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="store_name" value="{{ $store_array[0]->StoreName }}" name="store_name" placeholder="Store Name" reqiured="required" />
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">Store URL</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="store_url" value="{{ $store_array[0]->StoreUrl }}" name="store_url" placeholder="Store URL" reqiured="required" />
<input type="hidden" class="form-control" value="{{ $store_array[0]->StoreUrl }}" name="orig_store_url" reqiured="required" />
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">With Password</label>
<div class="col-sm-8">
<input type="checkbox" @if($store_array[0]->Password != null) checked @endif id="with_password_opt" name="set_store_password" data-toggle="toggle" data-width="100px" data-on="<i class='fa fa-check-circle'></i> Yes" data-off="<i class='fa fa-ban'></i> No" data-size="small">
</div>
</div>
<div class="form-group store-password-field" style="display: @if($store_array[0]->Password != null) block; @else none; @endif">
<label class="col-sm-4 control-label">Password</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="store_password" value="{{ $store_array[0]->Password }}" placeholder="Store Password" reqiured="required" />
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">Store Logo</label>
<div class="col-sm-8">
<input type="file" data-use-id="img_store_logo" class="form-control upload_img" name="store_logo" placeholder="Store Logo" reqiured="required" />
<input type="hidden" class="form-control" value="{{ $store_array[0]->StoreLogo }}" name="orig_store_logo" reqiured="required" />
<small><i style="color: red;">Size: H:300px - W:300px</i></small>
</div>
</div>
<div class="form-group" >
<label class="col-sm-4 control-label"></label>
<div class="col-sm-8">
<p>Store Logo Preview:</p>
<div class="store-logo-holder">
<a href="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo }}?v={{ time() }}" class="img_store_logo_href" data-toggle="lightbox">
<img class="img_store_logo_img" id="img_store_logo" src="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo }}?v={{ time() }}" style="max-width: 100%; max-height: 100%; ">
</a>
</div>
<!-- /.box-body -->
</form>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">Store Banner</label>
<div class="col-sm-8">
<input type="file" class="form-control upload_img" data-use-id="img_store_banner" name="store_banner" placeholder="Store Banner" reqiured="required" />
<input type="hidden" class="form-control" value="{{ $store_array[0]->StoreBanner }}" name="orig_store_banner" reqiured="required" />
<small><i style="color: red;">Size: H:1140px - W:128px</i></small>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label"></label>
<div class="col-sm-8">
<p>Store Banner Preview:</p>
<div class="store-banner-holder">
<a href="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner }}?v={{ time() }}" class="img_store_banner_href" data-toggle="lightbox">
<img class="img_store_banner_img" id="img_store_banner" src="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner }}?v={{ time() }}" style="max-width: 100%; max-height: 100%;">
</a>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">Store Status</label>
<div class="col-sm-8">
<select class="form-control" name="store_status">
<option @if($store_array[0]->IsActive == "false") selected @endif>Private</option>
<option @if($store_array[0]->IsActive == "true") selected @endif >Public</option>
</select>
</div>
</div>
</div>
</div>
<div class="box-footer">
<button type="submit" class="btn btn-primary">Submit</button>
<div class="col-sm-8">
<div class="form-group">
<label class="col-sm-4 control-label">&nbsp;</label>
<div class="col-sm-8">
<button type="submit" id="btn_update_store" class="btn btn-primary">Save Changes</button>
<a href="{{ url('user') }}" type="button" class="btn btn-default">Cancel</a>
</div>
</div>
</div>
</div>
<div>
</div>
</form>
</div><!-- box -->
</div>
</section>
</div>
</section>
<!-- /.content -->
</div>
@endsection

View File

@@ -8,6 +8,9 @@
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<meta name="csrf_token" content="{{ csrf_token() }}" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<!-- Bootstrap 3.3.6 -->
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/bootstrap/css/bootstrap.min.css')}}">
<!-- Font Awesome -->
@@ -29,6 +32,16 @@
<link rel="stylesheet" href="{{asset('/public/bower_components/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css')}}">
<!-- Select2 -->
<link href="{{asset('/public/bower_components/AdminLTE/plugins/select2/select2.min.css')}}" rel="stylesheet" />
<!-- ekko-lightbox -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.css" rel="stylesheet">
<!-- bootstrap-toggle -->
<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">
<!-- DataTables -->
<link rel="stylesheet" href="{{ asset('/public/bower_components/AdminLTE/plugins/datatables.net-bs/css/dataTables.bootstrap.min.css') }}">
<!-- datepicker -->
<link rel="stylesheet" href="{{ asset('/public/bower_components/AdminLTE/plugins/datepicker/datepicker3.css') }}">
<!-- jquery-ui -->
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link href="{{asset('/public/designer/css/build.css')}}" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
@@ -373,102 +386,180 @@
.funkyradio input[type="radio"]:empty,
.funkyradio input[type="checkbox"]:empty {
display: none;
display: none;
}
.funkyradio input[type="radio"]:empty ~ label,
.funkyradio input[type="checkbox"]:empty ~ label {
position: relative;
line-height: 2.5em;
text-indent: 3.25em;
margin-top: 2em;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
position: relative;
line-height: 2.5em;
text-indent: 3.25em;
margin-top: 2em;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.funkyradio input[type="radio"]:empty ~ label:before,
.funkyradio input[type="checkbox"]:empty ~ label:before {
position: absolute;
display: block;
top: 0;
bottom: 0;
left: 0;
content: '';
width: 2.5em;
background: #D1D3D4;
border-radius: 0 0 0 3px;
position: absolute;
display: block;
top: 0;
bottom: 0;
left: 0;
content: '';
width: 2.5em;
background: #D1D3D4;
border-radius: 0 0 0 3px;
}
.funkyradio input[type="radio"]:hover:not(:checked) ~ label,
.funkyradio input[type="checkbox"]:hover:not(:checked) ~ label {
color: #888;
color: #888;
}
.funkyradio input[type="radio"]:hover:not(:checked) ~ label:before,
.funkyradio input[type="checkbox"]:hover:not(:checked) ~ label:before {
content: '\2714';
text-indent: .9em;
color: #C2C2C2;
content: '\2714';
text-indent: .9em;
color: #C2C2C2;
}
.funkyradio input[type="radio"]:checked ~ label,
.funkyradio input[type="checkbox"]:checked ~ label {
color: #777;
color: #777;
}
.funkyradio input[type="radio"]:checked ~ label:before,
.funkyradio input[type="checkbox"]:checked ~ label:before {
content: '\2714';
text-indent: .9em;
color: #333;
background-color: #ccc;
content: '\2714';
text-indent: .9em;
color: #333;
background-color: #ccc;
}
.funkyradio input[type="radio"]:focus ~ label:before,
.funkyradio input[type="checkbox"]:focus ~ label:before {
box-shadow: 0 0 0 3px #999;
box-shadow: 0 0 0 3px #999;
}
.funkyradio-default input[type="radio"]:checked ~ label:before,
.funkyradio-default input[type="checkbox"]:checked ~ label:before {
color: #333;
background-color: #ccc;
color: #333;
background-color: #ccc;
}
.funkyradio-primary input[type="radio"]:checked ~ label:before,
.funkyradio-primary input[type="checkbox"]:checked ~ label:before {
color: #fff;
background-color: #337ab7;
color: #fff;
background-color: #337ab7;
}
.funkyradio-success input[type="radio"]:checked ~ label:before,
.funkyradio-success input[type="checkbox"]:checked ~ label:before {
color: #fff;
background-color: #5cb85c;
color: #fff;
background-color: #5cb85c;
}
.funkyradio-danger input[type="radio"]:checked ~ label:before,
.funkyradio-danger input[type="checkbox"]:checked ~ label:before {
color: #fff;
background-color: #d9534f;
color: #fff;
background-color: #d9534f;
}
.funkyradio-warning input[type="radio"]:checked ~ label:before,
.funkyradio-warning input[type="checkbox"]:checked ~ label:before {
color: #fff;
background-color: #f0ad4e;
color: #fff;
background-color: #f0ad4e;
}
.funkyradio-info input[type="radio"]:checked ~ label:before,
.funkyradio-info input[type="checkbox"]:checked ~ label:before {
color: #fff;
background-color: #5bc0de;
color: #fff;
background-color: #5bc0de;
}
.store-logo-holder {
width: 200px;
height:200px;
border: 1px solid #e2e2e2;
padding:2px;
text-align: center;
position: relative;
}
#img_store_logo {
position: absolute;
margin: auto;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.store-banner-holder {
width: 100%;
height:100px;
border: 1px solid #e2e2e2;
padding:2px;
text-align: center;
position: relative;
}
#img_store_banner {
position: absolute;
margin: auto;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.error{
color: red;
}
.store-logo{
width: 200px;
height:200px;
margin: auto;
padding:2px;
text-align: center;
position: relative;
}
@media ( min-width: 768px ) {
.grid-divider {
position: relative;
padding: 0;
}
.grid-divider>[class*='col-'] {
position: static;
}
.grid-divider>[class*='col-']:nth-child(n+2):before {
content: "";
border-left: 1px solid #DDD;
position: absolute;
top: 0;
bottom: 0;
}
.col-padding {
padding: 0 15px;
}
}
</style>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-136108155-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-136108155-1');
</script>
</head>
<body id="bodyId_" class="sidebar-mini wysihtml5-supported skin-black">
@@ -521,9 +612,130 @@
<script src="{{asset('/public/designer/js/jquery.priceformat.min.js')}}"></script>
<!-- jquery-ui js -->
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<!-- ekko-lightbox -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.js"></script>
<!-- bootstrap-toggle -->
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>
<!-- DataTables -->
<script src="{{ asset('/public/bower_components/AdminLTE/plugins/datatables.net/js/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('/public/bower_components/AdminLTE/plugins/datatables.net-bs/js/dataTables.bootstrap.min.js') }}"></script>
<script src="https://cdn.datatables.net/buttons/1.5.6/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.6/js/buttons.flash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.6/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.6/js/buttons.print.min.js"></script>
<!-- datepicker -->
<script src="{{asset('/public/bower_components/AdminLTE/plugins/datepicker/bootstrap-datepicker.js')}}"></script>
<!-- jquery-ui -->
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$( document ).ready(function() {
$.fn.dataTable.ext.search.push(
function (settings, data, dataIndex) {
var min = $('#min').datepicker("getDate");
var max = $('#max').datepicker("getDate");
var startDate = new Date(data[4]);
if (min == null && max == null) { return true; }
if (min == null && startDate <= max) { return true;}
if(max == null && startDate >= min) {return true;}
if (startDate <= max && startDate >= min) { return true; }
return false;
}
);
$("#min").datepicker({ onSelect: function () { table.draw(); }, changeMonth: true, changeYear: true });
$("#max").datepicker({ onSelect: function () { table.draw(); }, changeMonth: true, changeYear: true });
var table = $('#tbl_store_orders').DataTable({
dom: 'Bfrtip',
buttons: [
{
extend: 'csv',
exportOptions: {
columns: [ 0, 1, 2, 3, 5 ]
},
className : "btn btn-default",
text: "<i class=\"fa fa-table\"></i> CSV"
},
{
extend: 'excel',
exportOptions: {
columns: [ 0, 1, 2, 3, 5 ]
},
className : "btn btn-default",
text: "<i class=\"fa fa-file-excel-o\"></i> Excel"
},
{
extend: 'pdf',
exportOptions: {
columns: [ 0, 1, 2, 3, 5 ]
},
className : "btn btn-default",
text: "<i class=\"fa fa-file-pdf-o\"></i> PDF"
},
{
extend: 'print',
exportOptions: {
columns: [ 0, 1, 2, 3, 5 ]
},
className : "btn btn-default",
text : "<i class=\"fa fa-print\"></i> Print"
}
],
columnDefs: [
{ targets: 4, type: 'date', visible: false },
{ targets: 5, type: 'date' }
]
});
// Event listener to the two range filtering inputs to redraw on input
$('#min, #max').change(function () {
table.draw();
});
$(document).on('a click', '.btn-order-item-details', function(e){
e.preventDefault();
var getCK = $(this).data('ck');
var getPid = $(this).data('pid');
var getId = $(this).data('id');
$.ajax({
data: {
ck: getCK,
pid: getPid,
id: getId
},
type: 'POST',
url : "{{ url('user/post/show-store-order-details') }}",
dataType: 'json',
beforeSend:function(xhr){
var token = $('meta[name="csrf_token"]').attr('content');
if (token) {
return xhr.setRequestHeader('X-CSRF-TOKEN', token);
}
xhr.setRequestHeader( 'X-Requested-With', 'XMLHttpRequest');
},
success:function(result) {
if(result.success){
$('#modal_store_order_details_body_content').html(result.payment_details_response);
}
}
});
$('#modal_store_order_details').modal('show');
});
$(document).on('a click', '.btn-add-thumbnail', function(e){
e.preventDefault();
$('#modal_add_thumbnail').modal('show');
});
var tr_sortable = $('#sortable');
@@ -531,14 +743,16 @@
revert: 100,
placeholder: 'placeholder'
});
$('.select2').select2();
tr_sortable.disableSelection();
$('#btn_save_thumbnail_sorting').on('click', function(e) {
e.preventDefault();
var sortable_data = tr_sortable.sortable('serialize');
// div_response . text ( 'Save' );
console.log(sortable_data);
// console.log(sortable_data);
$.ajax({
data: sortable_data,
type: 'POST',
@@ -582,49 +796,78 @@
var imagesPreview = function(input) {
if (input.files) {
var filesAmount = input.files.length;
$('#main_thumbnail_uploader').css({
"display" : "none"
});
if (input.files) {
var filesAmount = input.files.length;
$('#main_thumbnail_uploader').css({
"display" : "none"
});
$('#upload_thumbnail_preview').css({
"display" : ""
});
for (i = 0; i < filesAmount; i++) {
var reader = new FileReader();
$('#upload_thumbnail_preview').css({
"display" : ""
});
for (i = 0; i < filesAmount; i++) {
var reader = new FileReader();
if(i == 0){
reader.onload = function(event) {
$('#main-thumbnail').attr('src', event.target.result);
$( ".small-preview-thumb" ).prepend('<li class="col-sm-3 col-xs-3"> ' +
'<a class="text-center thumbnail a_thumbnail active"> ' +
'<img class="img img-responsive product-center image-thumbnails" style="height: 90px;" src="'+event.target.result+'"/> ' +
'</a> ' +
'</li>');
if(i == 0){
reader.onload = function(event) {
$('#main-thumbnail').attr('src', event.target.result);
$( ".small-preview-thumb" ).prepend('<li class="col-sm-3 col-xs-3"> ' +
'<a class="text-center thumbnail a_thumbnail active"> ' +
'<img class="img img-responsive product-center image-thumbnails" style="height: 90px;" src="'+event.target.result+'"/> ' +
'</a> ' +
'</li>');
}
}else{
reader.onload = function(event) {
$( ".small-preview-thumb" ).prepend('<li>' +
'<a class="text-center thumbnail a_thumbnail"> ' +
'<img class="img img-responsive product-center image-thumbnails" style="height: 90px;" src="'+event.target.result+'"/> ' +
'</a> ' +
'</li>');
}
}
}else{
reader.readAsDataURL(input.files[i]);
}
}
};
// for add Image ( View Item Details)
var imagesPreview1 = function(input) {
if (input.files) {
var filesAmount = input.files.length;
$( ".small-preview-thumb" ).html('');
for (i = 0; i < filesAmount; i++) {
var reader = new FileReader();
reader.onload = function(event) {
$( ".small-preview-thumb" ).prepend('<li class="col-sm-3 col-xs-3"> ' +
$( ".small-preview-thumb" ).fadeIn(500, function(){
$(this).append('<li class="col-sm-3 col-xs-3"> ' +
'<a class="text-center thumbnail a_thumbnail"> ' +
'<img class="img img-responsive product-center image-thumbnails" style="height: 90px;" src="'+event.target.result+'"/> ' +
'</a> ' +
'</li>');
});
}
}
reader.readAsDataURL(input.files[i]);
reader.readAsDataURL(input.files[i]);
}
}
}
};
$('#imgupload').on('change', function() {
imagesPreview(this);
});
$('#upload_images').on('change', function() {
imagesPreview1(this);
});
$('#clear_frm_add_new_images').click(function(){
$('#frm_add_new_images')[0].reset();
$( ".small-preview-thumb" ).html('');
});
$('.price_format').priceFormat({
prefix: '$ '
});
@@ -658,7 +901,6 @@
}else{
$('#lst-cities').append('<option value="'+key+'" class="dynamic-city">'+ key + '</option>');
}
});
}else{
@@ -705,6 +947,7 @@
required: true
}
},
messages: {},
errorPlacement: function(error, element) {
var placement = $(element).data('error');
@@ -875,6 +1118,9 @@
},
item_privacy: {
required: true
},
available_size: {
required: true
}
},
@@ -936,6 +1182,29 @@
},
submitHandler: submitFormAddItem
});
$("#frm_add_new_images").validate({
rules: {
upload_images :{
required: true
}
},
messages: {},
errorPlacement: function(error, element) {
var placement = $(element).data('error');
if (placement) {
$(placement).append(error)
}else {
error.insertAfter(element);
}
},
submitHandler: submitFormAddNewImage
});
$("#frm_verification_code").validate({
rules: {
@@ -1002,6 +1271,36 @@
submitHandler: submitSellDesignForm
});
$(document).on('button click', '.btn-delete-item-image', function(e){
e.preventDefault();
var thumb_filename = $(this).data('filename');
var thumb_id = $(this).data('id');
// console.log(thumb_id);
$.ajax({ //create an ajax request to load_page.php
type: "POST",
url: "{{ url('user/post/delete-image-thumb') }}",
data: {
thumb_filename : thumb_filename,
thumb_id : thumb_id
},
dataType: 'json',
beforeSend: function(xhr) {
var token = $('meta[name="csrf_token"]').attr('content');
if (token) {
return xhr.setRequestHeader('X-CSRF-TOKEN', token);
}
xhr.setRequestHeader( 'X-Requested-With', 'XMLHttpRequest');
},
success: function(response){
// console.log(response);
$('#'+response.delete_row).fadeOut(300, function(){
$(this).remove();
});
}
});
});
$(document).on('button click', '#chk-currentpass', function(){
if($(this).is(':checked')){
@@ -1163,10 +1462,129 @@
return false;
}
});
$(document).on('click', '[data-toggle="lightbox"]', function(event) {
event.preventDefault();
$(this).ekkoLightbox({
alwaysShowClose: true,
});
});
$('#with_password_opt').change(function() {
if($(this).prop('checked')){
$('.store-password-field').css({
'display': 'block'
});
}else{
$('.store-password-field').css({
'display': 'none'
});
}
});
$("#frm_edit_store").validate({
rules: {
store_name: {
required: true
},
store_url: {
required: true
},
store_password: {
required: '#with_password_opt:checked'
},
// store_logo: {
// required: true
// },
// store_banner: {
// required: true
// },
store_status: {
required: true
},
},
messages: {},
errorPlacement: function(error, element) {
var placement = $(element).data('error');
if (placement) {
$(placement).append(error);
}else {
error.insertAfter(element);
}
},
submitHandler: submitFormEditStore
});
$("#store_name").on('keyup',function(){
var getsportName = $(this).val();
getsportName = getsportName.replace(/\s+/g, '-').toLowerCase(); //new object assigned to var str
$("#store_url").val(getsportName);
});
$(".upload_img").change(function() {
var $id = $(this).data('use-id');
readURL(this, $id);
});
}); //end document ready
// function
// function
function submitFormEditStore(){
$.ajax({
type: "POST",
url: "{{ url('user/store-settings/update') }}",
data: new FormData($('#frm_edit_store')[0]),
processData: false,
contentType: false,
dataType: 'json',
beforeSend: function(xhr){
$("#btn_update_store").attr('disabled', true);
$("#btn_update_store").html('<i class="fa fa-spinner fa-spin"></i> Saving...');
var token = $('meta[name="csrf_token"]').attr('content');
if (token) {
return xhr.setRequestHeader('X-CSRF-TOKEN', token);
}
},
success: function (response) {
// console.log(response);
if(response.success){
$('#edit_store_msg').html('<div class="alert alert-success alert-dismissible"> ' +
'<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> ' +
'<h4><i class="icon fa fa-check"></i> Success!</h4> ' +
'<p>'+response.message+'</p> ' +
'</div>').fadeIn().delay(5000).fadeOut();
}else{
$('#edit_store_msg').html('<div class="alert alert-danger alert-dismissible"> ' +
'<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> ' +
'<h4><i class="icon fa fa-ban"></i> Error!</h4> ' +
'<p>'+response.message+'</p> ' +
'</div>').fadeIn().delay(5000).fadeOut();
}
$("html, body").animate({ scrollTop: 0 }, "slow");
$("#btn_update_store").attr('disabled', false);
$("#btn_update_store").html('Save Changes');
if(response.clearform){
var form = $('#frm_edit_store')
form.validate().resetForm();
form[0].reset();
// $("#with_password_opt").prop("checked", false);
$('.img_store_logo_href').attr('href', "{{ config('site_config.images_directory') . 'teamstore/store-logo-placeholder.jpg' }}");
$('.img_store_logo_img').attr('src', "{{ config('site_config.images_directory') . 'teamstore/store-logo-placeholder.jpg' }}");
$('.img_store_banner_href').attr('href', "{{ config('site_config.images_directory') . 'teamstore/store-banner-placeholder.jpg' }}");
$('.img_store_banner_img').attr('src', "{{ config('site_config.images_directory') . 'teamstore/store-banner-placeholder.jpg' }}");
}
}
});
return false;
}
function getCities(arr, q){
var sd = [];
arr.find(function(element) {
@@ -1395,7 +1813,44 @@
}
});
return false;
}
}
function submitFormAddNewImage(){
$.ajax({
type : 'POST',
url : "{{ url('user/store-items/save-new-item-image') }}",
data : new FormData($('#frm_add_new_images')[0]),
processData: false,
contentType: false,
beforeSend:function(xhr){
$("#new_item_image_response_msg").fadeOut();
$("#btn_submit_new_item_image").html('Please wait &nbsp; <i class="fa fa-spinner fa-spin"></i>');
$("#btn_submit_new_item_image").prop("disabled", true);
var token = $('meta[name="csrf_token"]').attr('content');
if (token) {
return xhr.setRequestHeader('X-CSRF-TOKEN', token);
}
xhr.setRequestHeader( 'X-Requested-With', 'XMLHttpRequest');
},
success : function(response){
if(response.success){
alert('New item is successfully added.');
location.reload();
}else{
$("#new_item_image_response_msg").html("");
$("#new_item_image_response_msg").fadeIn(1000, function(){
$("#new_item_image_response_msg").html(response.message);
$("#btn_submit_new_item_image").prop("disabled", false);
$("#btn_submit_new_item_image").html('Submit');
});
}
}
});
return false;
}
function submitFormVerificationCode(){
var data = $("#frm_verification_code").serialize();
@@ -1481,7 +1936,23 @@
}
});
return false;
}
}
function readURL(input, id) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function(e) {
$('#'+id).attr('src', e.target.result);
// for lightbox
$('.'+id+'_href').attr('href', e.target.result);
$('.'+id+'_img').attr('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
}
}
</script>
</body>

View File

@@ -27,8 +27,8 @@
<div class="col-md-7">
<div class="box box-primary">
<div class="box-header with-border">
<a href="{{ url('designer/edit') }}/{{ $array_client_designs[0]->DesignCode }}" type="button" class="btn btn-default pull-right" style="margin-left: 5px;"><i class="fa fa-edit"></i> Edit Design</a>
<button type="button" data-dd="{{ $array_client_designs[0]->DesignCode }}" data-port="{{ $array_cat_name[0]->Port }}" class="btn btn-warning pull-right" id="btn-reload-thumbnails"><i class="fa fa-refresh"></i> Reload Image Thumbnails</button>
<!-- <a href="{{ url('designer/edit') }}/{{ $array_client_designs[0]->DesignCode }}" type="button" class="btn btn-default pull-right" style="margin-left: 5px;"><i class="fa fa-edit"></i> Edit Design</a>
<button type="button" data-dd="{{ $array_client_designs[0]->DesignCode }}" data-port="{{ $array_cat_name[0]->Port }}" class="btn btn-warning pull-right" id="btn-reload-thumbnails"><i class="fa fa-refresh"></i> Reload Image Thumbnails</button> -->
</div>
<div class="box-body custom-box-body">
<div class="row">

View File

@@ -27,7 +27,7 @@
<div class="col-md-7">
<div class="box box-primary">
<div class="box-header with-border">
<button type="button" class="btn btn-default pull-right" data-toggle="modal" data-target="#myModal"><i class="fa fa-image"></i> Re-arrange thumbnail</button>
<button type="button" class="btn btn-default pull-right" data-toggle="modal" data-target="#myModal">Re-arrange / Delete thumbnail</button>
</div>
<div class="box-body custom-box-body">
<div class="row">
@@ -36,7 +36,7 @@
<div class="col-md-12 text-center">
@foreach($thumbnails_array as $thumbnail)
@if($thumbnail->ImageClass == 'active')
<img style="height:400px" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $thumbnail->Image }}" id="main-thumbnail">
<img style="height:400px" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $thumbnail->Image . '?t=' . time() }}" id="main-thumbnail">
@endif
@endforeach
</div>
@@ -44,11 +44,21 @@
<div class="row">
<div class="col-md-12">
<ul class="hide-bullets">
<li class="col-sm-3 col-xs-4">
<a class="thumbnail btn-add-thumbnail" style="border-bottom-left-radius: 0px; border-botomt-right-radius: 0px; margin-bottom: -28px; cursor: pointer;">
<!-- <span class="close">&times;</span> -->
<img class="img img-responsive product-center " style="height: 65.45px;" src="{{ asset('/public/images/add-new-img.svg') }}"/>
<!-- <p class="center">Add Image</p> -->
<p class="text-center">
Add Image
</p>
</a>
</li>
@foreach($thumbnails_array as $thumbnail)
<li class="col-sm-3 col-xs-4">
<a class="thumbnail a_thumbnail {{ $thumbnail->ImageClass }}" style="border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; margin-bottom: -28px;">
<!-- <span class="close">&times;</span> -->
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $thumbnail->Image }}"/>
<img class="img img-responsive product-center image-thumbnails" style="height: 59.45px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $thumbnail->Image . '?t=' . time() }}"/>
</a>
<div class="funkyradio">
<div class="funkyradio-primary">
@@ -107,6 +117,27 @@
<label>Item Price</label>
<input id="item_price" name="item_price" class="form-control price_format" type="text" value="{{ $product_array[0]->ProductPrice }}" data-error="#err-price" />
</div>
<div class="form-group">
<label>Item Form</label>
<select class="form-control" name="itemForm">
<option value="jersey-and-shorts-form" @if($product_array[0]->ProductForm == "jersey-and-shorts-form") selected @endif>Jersey and Shorts Form</option>
<option value="tshirt-form" @if($product_array[0]->ProductForm == "tshirt-form") selected @endif>T-Shirt Form</option>
<option value="quantity-form" @if($product_array[0]->ProductForm == "quantity-form") selected @endif>Quantity Form</option>
<option value="name-number-form" @if($product_array[0]->ProductForm == "name-number-form") selected @endif>Name and Number Form</option>
<option value="name-number-size-form" @if($product_array[0]->ProductForm == "name-number-size-form") selected @endif>Name, Number and Size Form</option>
<option value="number-form" @if($product_array[0]->ProductForm == "number-form") selected @endif>Number Only Form</option>
</select>
</div>
<div class="form-group">
<label>Available Size</label>
<select class="form-control select2" data-error="#err_available_size" data-placeholder="Select Size" name="available_size[]" multiple="multiple" required>
<option value="toddler" @if(in_array("toddler", $available_size)) selected @endif>Toddler</option>
<option value="youth" @if(in_array("youth", $available_size)) selected @endif>Youth</option>
<option value="adult" @if(in_array("adult", $available_size)) selected @endif>Adult</option>
<option value="none" @if(in_array("none", $available_size)) selected @endif>None</option>
</select>
<span id="err_available_size"></span>
</div>
<div class="form-group">
<label>Item Privacy</label>
<select class="form-control" name="item_privacy">
@@ -136,7 +167,7 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Modal Header</h4>
<h4 class="modal-title">Item Images</h4>
</div>
<div class="modal-body">
<table class="table table-bordered table-condensed">
@@ -152,10 +183,10 @@
<tr id="{{ 'item-' . $thumbnail->Id }}">
<td class="text-center" style="width: 50px"><i class="fa fa-bars"></i></td>
<td><img class="img img-responsive product-center" style="height: 59.45px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $thumbnail->Image }}"/></td>
<td><img class="img img-responsive product-center" style="height: 59.45px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $thumbnail->Image . '?t=' . time() }}"/></td>
<td class="text-center">
<button class="btn btn-default btn-xs btn-edit-clipart" data-id="#"><i class="fa fa-edit"></i></button>
<button class="btn btn-default btn-xs btn-delete-clipart" data-id="#"><i class="fa fa-trash"></i></button>
<!-- <button class="btn btn-default btn-xs btn-edit-clipart" data-id="#"><i class="fa fa-edit"></i></button> -->
<button class="btn btn-default btn-sm btn-delete-item-image" data-id="{{ $thumbnail->Id }}" data-filename="{{ $thumbnail->Image }}" title="Delete Image"><i class="fa fa-trash"></i></button>
</td>
</tr>
@endforeach
@@ -173,4 +204,47 @@
</div>
<div class="modal fade" id="modal_add_thumbnail" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<form id="frm_add_new_images">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Add Image</h4>
</div>
<div class="modal-body">
<div class="row grid-divider">
<div class="col-sm-4">
<div class="col-padding">
<h3>Select Image(s)</h3>
<div class="form-group">
<input type="hidden" name="_id" value="{{ $product_array[0]->Id }}" />
<input type="file" class="form-control" id="upload_images" name="upload_images[]" multiple accept="image/*" />
</div>
<div class="form-group">
<button type="button" id="clear_frm_add_new_images" class="btn btn-default btn-block">Clear</button>
</div>
</div>
</div>
<div class="col-sm-8">
<div class="col-padding">
<h3>Preview</h3>
<div class="col-md-12">
<ul class="hide-bullets small-preview-thumb">
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" id="btn_submit_new_item_image" class="btn btn-primary">Submit</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</form>
</div>
</div>
</div>
@endsection