Merge pull request #3 from franknstayn/local_dev

Local dev
This commit is contained in:
franknstayn
2019-11-14 19:45:29 +08:00
committed by GitHub
16 changed files with 453 additions and 1392 deletions

View File

@@ -958,279 +958,4 @@ class DesignerController extends Controller {
return view("designer.buy_form")->with('jersey_sizes', $jersey_sizes)
->with('shorts_sizes', $shorts_sizes);
}
public function addNewRow(Request $request){
$post = $request->all();
$TeamStoreModel = new TeamStoreModel;
$newDesignerModel = new DesignerModel;
$trCount = $post['itemCount'];
$tempCode = $post['tempCode'];
$avalable_sizes = $post['avalable_sizes'];
$x = explode(",", $avalable_sizes );
foreach($x as $s){
$h[] = $TeamStoreModel->getSizesByBracket($s);
}
foreach($h as $d){
foreach($d as $g){
$sizes_array[] = $g;
}
}
?>
<tr class="<?php echo 'table-tr-' . $trCount ?>">
<td>
<input type="text" name="order_names[]" id="order_names" class="form-control input-sm inputName roster-input" placeholder="Name" >
</td>
<td>
<select class="form-control input-sm roster-input" name="order_number[]" id="order_number">
<option value="none">none</option>
<?php
for($i = 0; $i <= 99; $i++){
echo '<option value="'.$i.'">'.$i.'</option>';
}
?>
<option value="00">00</option>
</select>
</td>
<td>
<select class="form-control input-sm order-size roster-input" name="order_jersey_size[]" id="<?php echo 'order_jersey_size_' . $trCount ?>" data-row-number="<?php echo $trCount ?>">
<option value="none">none</option>
<?php
foreach($sizes_array as $j_size){
echo '<option value="'.$j_size->Size.'">'.$j_size->Size.'</option>';
}
?>
</select>
</td>
<td style="border-right: 1px solid #ddd;">
<select class="form-control input-sm order-size roster-input" name="order_shorts_size[]" id="<?php echo 'order_shorts_size_' . $trCount ?>" data-row-number="<?php echo $trCount ?>">
<option value="none">none</option>
<?php
foreach($sizes_array as $s_size){
echo '<option value="'.$s_size->Size.'">'.$s_size->Size.'</option>';
}
?>
</select>
</td>
<td id="action-column" class="text-center roster-action-column" style="padding: 4px !important; border-top: none">
<span class="tr-remove-btn">
<button type="button" class="btn btn-danger btn-sm removeRow btn-roster-action"removeRow data-toggle="tooltip" title="Remove"><i class="fa fa-remove" aria-hidden="true"></i></button>
</span>
</td>
</tr>
<tr id="addnew-btn-tbl-row">
<td colspan="4" ><button type="button" id="addNewRow" class="btn btn-link btn-sm pull-left" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i> Add Row</button></td>
<!-- <td colspan="2" ><button type="button" class="btn btn-link btn-sm pull-right" data-toggle="tooltip" title="Add Another">Manage List</button></td> -->
<td style="padding: 4px !important; border-top: none"></td>
</tr>
<?php
}
public function addNewRowNameAndNumber(Request $request){
$post = $request->all();
$trCount = $post['itemCount'];
$tempCode = $post['tempCode'];
$newDesignerModel = new DesignerModel;
$jersey_sizes = $newDesignerModel->getAvailableSizes($tempCode, 'JERSEY');
$shorts_sizes = $newDesignerModel->getAvailableSizes($tempCode, 'SHORTS');
?>
<tr class="<?php echo 'table-tr-' . $trCount ?>">
<td>
<input type="text" name="order_names[]" id="order_names" class="form-control input-sm inputName roster-input" placeholder="Name" >
</td>
<td>
<select class="form-control input-sm roster-input" name="order_number[]" id="order_number">
<option value="none">none</option>
<?php
for($i = 0; $i <= 99; $i++){
echo '<option value="'.$i.'">'.$i.'</option>';
}
?>
<option value="00">00</option>
</select>
</td>
<td id="action-column" class="text-center roster-action-column" style="padding: 4px !important; border-top: none">
<span class="tr-remove-btn">
<button type="button" class="btn btn-danger btn-sm removeRow-name-and-number btn-roster-action" data-toggle="tooltip" title="Remove"><i class="fa fa-remove" aria-hidden="true"></i></button>
</span>
</td>
</tr>
<tr id="addnew-btn-tbl-row">
<td colspan="4" ><button type="button" id="addNewRow_name_and_number" class="btn btn-link btn-sm pull-left" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i> Add Row</button></td>
<!-- <td colspan="2" ><button type="button" class="btn btn-link btn-sm pull-right" data-toggle="tooltip" title="Add Another">Manage List</button></td> -->
<td style="padding: 4px !important; border-top: none"></td>
</tr>
<?php
}
public function addNewRowNameNumberAndSize(Request $request){
$post = $request->all();
$trCount = $post['itemCount'];
$tempCode = $post['tempCode'];
$newDesignerModel = new DesignerModel;
$jersey_sizes = $newDesignerModel->getAvailableSizes($tempCode, 'JERSEY');
$shorts_sizes = $newDesignerModel->getAvailableSizes($tempCode, 'SHORTS');
?>
<tr class="<?php echo 'table-tr-' . $trCount ?>">
<td>
<input type="text" name="order_names[]" id="order_names" class="form-control input-sm inputName roster-input" placeholder="Name" >
</td>
<td>
<select class="form-control input-sm roster-input" name="order_number[]" id="order_number">
<option value="none">none</option>
<?php
for($i = 0; $i <= 99; $i++){
echo '<option value="'.$i.'">'.$i.'</option>';
}
?>
<option value="00">00</option>
</select>
</td>
<td>
<select class="form-control input-sm order-size roster-input" name="order_size[]" id="<?php echo 'order_size_' . $trCount ?>" data-row-number="<?php echo $trCount ?>">
<?php
foreach($jersey_sizes as $j_size){
echo '<option value="'.$j_size.'">'.$j_size.'</option>';
}
?>
</select>
</td>
<td id="action-column" class="text-center roster-action-column" style="padding: 4px !important; border-top: none">
<span class="tr-remove-btn">
<button type="button" class="btn btn-danger btn-sm removeRow-name-and-number btn-roster-action" data-toggle="tooltip" title="Remove"><i class="fa fa-remove" aria-hidden="true"></i></button>
</span>
</td>
</tr>
<tr id="addnew-btn-tbl-row">
<td colspan="4" ><button type="button" id="addNewRow_name_and_number" class="btn btn-link btn-sm pull-left" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i> Add Row</button></td>
<!-- <td colspan="2" ><button type="button" class="btn btn-link btn-sm pull-right" data-toggle="tooltip" title="Add Another">Manage List</button></td> -->
<td style="padding: 4px !important; border-top: none"></td>
</tr>
<?php
}
public function addRowNumber(Request $request){
$post = $request->all();
$trCount = $post['itemCount'];
$tempCode = $post['tempCode'];
// $product_array = $m->selectTeamStoreProducts('ProductURL', $productURL);
$newDesignerModel = new DesignerModel;
$jersey_sizes = $newDesignerModel->getAvailableSizes($tempCode, 'JERSEY');
$shorts_sizes = $newDesignerModel->getAvailableSizes($tempCode, 'SHORTS');
?>
<tr class="<?php echo 'table-tr-' . $trCount ?>">
<td>
<select class="form-control input-sm roster-input" name="order_number[]" id="order_number">
<option value="none">none</option>
<?php
for($i = 0; $i <= 99; $i++){
echo '<option value="'.$i.'">'.$i.'</option>';
}
?>
<option value="00">00</option>
</select>
</td>
<td id="action-column" class="text-center roster-action-column" style="padding: 4px !important; border-top: none">
<span class="tr-remove-btn">
<button type="button" class="btn btn-danger btn-sm removeRow-name-and-number btn-roster-action" data-toggle="tooltip" title="Remove"><i class="fa fa-remove" aria-hidden="true"></i></button>
</span>
</td>
</tr>
<tr id="addnew-btn-tbl-row">
<td colspan="4" ><button type="button" id="addNewRow_number" class="btn btn-link btn-sm pull-left" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i> Add Row</button></td>
<!-- <td colspan="2" ><button type="button" class="btn btn-link btn-sm pull-right" data-toggle="tooltip" title="Add Another">Manage List</button></td> -->
<td style="padding: 4px !important; border-top: none"></td>
</tr>
<?php
}
public function addGamerField(Request $request){
$post = $request->all();
$trCount = $post['itemCount'];
$tempCode = $post['tempCode'];
$product_url = $post['product_url'];
$m = new TeamStoreModel;
$product_array = $m->selectTeamStoreProducts('ProductURL', $product_url);
$x = explode(",", $product_array[0]->AvailableSizes );
foreach($x as $s){
$h[] = $m->getSizesByBracket($s);
}
foreach($h as $d){
foreach($d as $g){
$sizes_array[] = $g;
}
}
?>
<tr class="<?php echo 'table-tr-' . $trCount ?>">
<td>
<input type="text" name="order_names[]" id="order_names" class="form-control input-sm inputName roster-input" placeholder="Gamer Tag" >
</td>
<td>
<input type="text" name="order_names2[]" id="order_names2" class="form-control input-sm inputName roster-input" placeholder="Name">
</td>
<td>
<select class="form-control input-sm order-size roster-input" name="order_size[]" id="<?php echo 'order_size_' . $trCount ?>" data-row-number="<?php echo $trCount ?>">
<?php
foreach($sizes_array as $size){
echo '<option value="'.$size->Size.'">'.$size->Size.'</option>';
}
?>
</select>
</td>
<td id="action-column" class="text-center roster-action-column" style="padding: 4px !important; border-top: none">
<span class="tr-remove-btn">
<button type="button" class="btn btn-danger btn-sm removeRow-gamer-field btn-roster-action" data-toggle="tooltip" title="Remove"><i class="fa fa-remove" aria-hidden="true"></i></button>
</span>
</td>
</tr>
<tr id="addnew-btn-tbl-row">
<td colspan="4" ><button type="button" id="addNewRow_gamer_field" class="btn btn-link btn-sm pull-left" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i> Add Row</button></td>
<!-- <td colspan="2" ><button type="button" class="btn btn-link btn-sm pull-right" data-toggle="tooltip" title="Add Another">Manage List</button></td> -->
<td style="padding: 4px !important; border-top: none"></td>
</tr>
<?php
}
}

View File

@@ -234,84 +234,44 @@ class TeamStoreController extends Controller {
public function addNewRow(Request $request)
{
$post = $request->all();
$itemCount = $post['itemCount'];
$cssValue = $post['jersey_chk'];
$product_id = $post['product_id'];
$classname = "row" . $itemCount;
$TeamStoreModel = new TeamStoreModel;
$m = new TeamStoreModel;
$teams_array = array();
$teams_array = $m->getTeams($product_id);
$sizes_array = $m->getSizes();
?>
<tr class="<?php echo $classname; ?>">
<td class="td-hide" style="<?php echo $cssValue; ?>">
<input type="text" class="form-control input-sm capitalizeText cls-uniformName" name="uniformName[]" placeholder="i.e John Doe" data-error="#err-uniformName<?php echo $itemCount ?>" required >
<span id="err-uniformName<?php echo $itemCount ?>" style="color: #dd4b39"></span>
</td>
<td>
<select class="form-control input-sm cls-uniformTeam" name="uniformTeam[]" data-error="#err-uniformTeam<?php echo $itemCount ?>" require>
<option value="">Select Team</option>
<?php
$item = $TeamStoreModel->selectTeamStoreProductByIdHash($post['p_id']);
$x = explode(",", $item[0]->AvailableSizes);
foreach($teams_array as $team){
?><option value="<?php echo $team->Team ?>"><?php echo $team->Team ?></option><?php
foreach($x as $s){
$h[] = $TeamStoreModel->getSizesByBracket($s);
}
?>
<option value="others">Others</option>
</select>
<span id="err-uniformTeam<?php echo $itemCount ?>" style="color: #dd4b39"></span>
</td>
<td>
<div id="selectOptionNumber1">
<select class="form-control input-sm cls-uniformNumber" name="uniformNumber[]" data-error="#err-uniformNumber<?php echo $itemCount ?>" require >
<option value="">Select Number</option>
<?php
for($i = 0 ; $i < 100 ; $i++){
?><option value="<?php echo $i ?>"><?php echo $i ?></option><?php
foreach($h as $d){
foreach($d as $g){
$sizes_array[] = $g;
}
?>
</select>
<span id="err-uniformNumber<?php echo $itemCount ?>" style="color: #dd4b39"></span>
</div>
</td>
<td>
<div id="fetchSizes">
<select class="form-control input-sm cls-uniformSize" name="uniformSize[]" data-error="#err-uniformSize<?php echo $itemCount ?>" require>
<option value="">Select Size</option>
<?php
foreach($sizes_array as $size){
?><option value="<?php echo $size->Size ?>"><?php echo $size->Size ?></option><?php
}
?>
</select>
<span id="err-uniformSize<?php echo $itemCount ?>" style="color: #dd4b39"></span>
</div>
</td>
<td class="text-center">
<span class="changeToRemoveBtn">
<button type="button" class="btn btn-danger btn-sm removeRow" data-toggle="tooltip" title="Remove"><i class="fa fa-remove" aria-hidden="true"></i></button>
</span>
</td>
</tr>
<tr id="addnew-btn-tbl-row">
<td colspan="5" ><button type="button" id="addNewRow" class="btn btn-success btn-sm pull-right" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i> Add Row</button></td>
</tr>
<?php
if($item[0]->ProductAvailableQty != null){
$soldQty = $m->getSoldQty($product_array[0]->Id);
$availableQty = $item[0]->ProductAvailableQty - $soldQty[0]->SoldQty;
}else{
// echo 'no qty';
$availableQty = null;
}
$handle_form = view('teamstore-sublayouts.forms.' . $item[0]->ProductForm )
->with('sizes_array', $sizes_array)
->with('availableQty', $availableQty)
->render();
return $handle_form;
}
public function addToCart(Request $request)
{
$post = $request->all();
$m = new TeamStoreModel;
$product_id = $post['product_id'];
$store_url = $post['store_url'];
$store_id = $post['store_id'];
$hash_product_id = $post['p_id'];
if($request->session()->has('cartkey')){
$cartKey = $request->session()->get('cartkey');
@@ -320,13 +280,20 @@ class TeamStoreController extends Controller {
$cartKey = $cartKey = $request->session()->get('cartkey');
}
$product_array = $m->selectTeamStoreProducts('Id', $product_id);
$product_array = $m->selectTeamStoreProductByIdHash($hash_product_id);
$product_id = $product_array[0]->Id;
$TeamStoreId = $product_array[0]->TeamStoreId;
$ProductPrice = $product_array[0]->ProductPrice;
$ProductURL = $product_array[0]->ProductURL;
$product_form = $product_array[0]->ProductForm;
$design_code = $product_array[0]->DesignCode;
$product_name = $product_array[0]->ProductName;
$teamstore_array = $m->selectTeamStore('Id', $TeamStoreId);
$store_url = $teamstore_array[0]->StoreUrl;
$store_id = $teamstore_array[0]->Id;
if($product_form == "jersey-and-shorts-form"){
$order_names = $post['order_names'];
$order_number = $post['order_number'];
@@ -476,6 +443,27 @@ class TeamStoreController extends Controller {
'Quantity' => 1
);
}
}elseif($product_form == "name-size"){
$order_names = $post['order_names'];
$order_size = $post['order_size'];
foreach($order_names as $key => $val){
$items[] = array(
'ProductId' => $product_id,
'StoreURL' => $store_url,
'StoreId' => $store_id,
'FormUsed' => $product_form,
'CartKey' => $cartKey,
'DesignCode' => $design_code,
'ProductURL' => $ProductURL,
'ProductName' => $product_name,
'Name' => $order_names[$key],
'Size' => $order_size[$key],
'Price' => $ProductPrice,
'Quantity' => 1
);
}
}
$i = $m->insertToCart($items);

View File

@@ -49,12 +49,6 @@ Route::get('/designer/edit/{designCode}', 'designer\DesignerController@editDesig
//end edit routes//
// CUSTOMIZER DISPLAY
Route::post('/designer/a/add-new-row', 'designer\DesignerController@addNewRow');
Route::post('/designer/a/add-new-row-name-and-number', 'designer\DesignerController@addNewRowNameAndNumber');
Route::post('/designer/a/add-new-row-name-number-size', 'designer\DesignerController@addNewRowNameNumberAndSize');
Route::post('/designer/a/add-new-row-number', 'designer\DesignerController@addRowNumber');
Route::post('/designer/a/add-new-row-gamer-field', 'designer\DesignerController@addGamerField');
Route::post('/designer/a/save-roster', 'designer\DesignerController@saveRoster');
//END CUSTOMIZER DISPLAY
@@ -82,10 +76,11 @@ Route::get('/teamstore', 'teamstore\TeamStoreController@storelist'); // old
Route::get('/teamstore/{storename}', 'teamstore\TeamStoreController@index');
Route::get('/teamstore/{storename}/product/{producurl}', 'teamstore\TeamStoreController@productDetails');
Route::post('/teamstore/q/addnewrow', 'teamstore\TeamStoreController@addNewRow');
// Route::post('/teamstore/q/addnewrow', 'teamstore\TeamStoreController@addNewRow');
Route::post('/teamstore/q/add-to-cart', 'teamstore\TeamStoreController@addToCart');
Route::get('/teamstore/q/clearsession', 'teamstore\TeamStoreController@clearSession');
Route::post('/teamstore/q/add-voucher', 'teamstore\TeamStoreController@addVoucher');
Route::post('/teamstore/q/add-new-row', 'teamstore\TeamStoreController@addNewRow');
// });
Route::post('/teamstore/checkpassword', 'teamstore\TeamStoreController@checkTeamStorePassword');

View File

@@ -23,7 +23,15 @@ class TeamStoreModel extends Model {
return $i;
}
function selectTeamStore($field, $teamstoreURL) // display all data from database
function selectTeamStoreProductByIdHash($id)
{
$i = DB::table('teamstore_products')
->where(DB::raw('md5(Id)') , $id)
->get();
return $i;
}
function selectTeamStore($field, $teamstoreURL)
{
$i = DB::table('teamstores')
->where($field, $teamstoreURL)

View File

@@ -316,103 +316,15 @@
}
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ removing of rows @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
$(document).on('button click', '.removeRow', function(){
var str = $(this).closest('tr').attr('class');
var trCount = $('#tableRow tbody').children('tr').length;
if(trCount == 2){
return false;
}
if(trCount == 3){
$('#addnew-btn-tbl-row').remove();
$('.tr-remove-btn').html('<button type="button" id="addNewRow" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>');
}
$('.'+str).remove();
});
$(document).on('button click', '.removeRow-name-and-number', function(){
var str = $(this).closest('tr').attr('class');
var trCount = $('#tableRow tbody').children('tr').length;
if(trCount == 2){
return false;
}
if(trCount == 3){
$('#addnew-btn-tbl-row').remove();
$('.tr-remove-btn').html('<button type="button" id="addNewRow_name_and_number" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>');
}
$('.'+str).remove();
});
$(document).on('button click', '.removeRow-name-number-size', function(){
var str = $(this).closest('tr').attr('class');
var trCount = $('#tableRow tbody').children('tr').length;
if(trCount == 2){
return false;
}
if(trCount == 3){
$('#addnew-btn-tbl-row').remove();
$('.tr-remove-btn').html('<button type="button" id="addNewRow_name_number_size" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>');
}
$('.'+str).remove();
});
$(document).on('button click', '.removeRow-number', function(){
var str = $(this).closest('tr').attr('class');
var trCount = $('#tableRow tbody').children('tr').length;
if(trCount == 2){
return false;
}
if(trCount == 3){
$('#addnew-btn-tbl-row').remove();
$('.tr-remove-btn').html('<button type="button" id="addNewRow_number" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>');
}
$('.'+str).remove();
});
$(document).on('button click', '.removeRow-gamer-field', function(){
var str = $(this).closest('tr').attr('class');
var trCount = $('#tableRow tbody').children('tr').length;
if(trCount == 2){
return false;
}
if(trCount == 3){
$('#addnew-btn-tbl-row').remove();
$('.tr-remove-btn').html('<button type="button" id="addNewRow_gamer_field" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>');
}
$('.'+str).remove();
});
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ end removing of rows @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ adding of rows @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
$(document).on('button click', '#addNewRow', function(){
var TemplateCode = $('#template_code').val();
var avalable_sizes = $('#avalable_sizes').val();
// console.log(TemplateCode)
var orderCounterValue = $('#orderCounterValue').val();
var numi = document.getElementById('orderCounterValue');
var num = (document.getElementById('orderCounterValue').value -1) + 2;
numi.value = num;
var p_id = $('#p_id').val();
$.ajax({ //create an ajax request to load_page.php
type: "POST",
url: "{{ url('/designer/a/add-new-row') }}",
data:{
itemCount : num,
tempCode : TemplateCode,
avalable_sizes : avalable_sizes
url: "{{ url('/teamstore/q/add-new-row') }}",
data: {
p_id : p_id
},
dataType: "html", //expect html to be returned
@@ -424,173 +336,22 @@
}
xhr.setRequestHeader( 'X-Requested-With', 'XMLHttpRequest');
},
success: function(response){
var className = "row" + (num - 1);
var d = new Date();
var n = d.getTime();
var parser = new DOMParser();
var doc = parser.parseFromString(response, "text/html");
var elem = doc.getElementById("orderTableBody");
var currentClassName = elem.getElementsByTagName('tr')[0].className;
elem.getElementsByClassName(currentClassName)[0].classList.remove(currentClassName); // remove current Classname
elem.getElementsByTagName('tr')[0].classList.add("table-tr-" + Math.ceil(Math.random() * 999999) + n); // add random classname
$('#tableRow tbody').append(elem.innerHTML);
$('#addnew-btn-tbl-row').html('')
$('#addnew-btn-tbl-row').append('<button type="button" id="addNewRow" class="btn btn-success btn-sm pull-left" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i> Add Row</button>');
$('.tr-remove-btn').html('<button type="button" class="btn btn-danger btn-sm removeRow btn-roster-action" data-toggle="tooltip" title="Remove"><i class="fa fa-remove" aria-hidden="true"></i></button>');
$('#addnew-btn-tbl-row').remove();
$('#tableRow tbody').append(response);
$('#orderListPanel').scrollTop($('#orderListPanel')[0].scrollHeight);
$('.inputName').keyup(function() {
this.value = this.value.toLocaleUpperCase();
});
}
});
});
$(document).on('button click', '#addNewRow_name_and_number', function(){
var TemplateCode = $('#template_code').val();
// console.log(TemplateCode)
var orderCounterValue = $('#orderCounterValue').val();
var numi = document.getElementById('orderCounterValue');
var num = (document.getElementById('orderCounterValue').value -1) + 2;
numi.value = num;
$.ajax({ //create an ajax request to load_page.php
type: "POST",
url: "{{ url('/designer/a/add-new-row-name-and-number') }}",
data:{
itemCount : num,
tempCode : TemplateCode
},
dataType: "html", //expect html to be returned
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){
var className = "row" + (num - 1);
$('.tr-remove-btn').html('<button type="button" class="btn btn-danger btn-sm removeRow-name-and-number btn-roster-action" data-toggle="tooltip" title="Remove"><i class="fa fa-remove" aria-hidden="true"></i></button>');
$('#addnew-btn-tbl-row').remove();
$('#tableRow tbody').append(response);
$('#orderListPanel').scrollTop($('#orderListPanel')[0].scrollHeight);
$('.inputName').keyup(function() {
this.value = this.value.toLocaleUpperCase();
});
}
});
});
$(document).on('button click', '#addNewRow_name_number_size', function(){
var TemplateCode = $('#template_code').val();
// console.log(TemplateCode)
var orderCounterValue = $('#orderCounterValue').val();
var numi = document.getElementById('orderCounterValue');
var num = (document.getElementById('orderCounterValue').value -1) + 2;
numi.value = num;
$.ajax({ //create an ajax request to load_page.php
type: "POST",
url: "{{ url('/designer/a/add-new-row-name-number-size') }}",
data:{
itemCount : num,
tempCode : TemplateCode
},
dataType: "html", //expect html to be returned
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){
var className = "row" + (num - 1);
$('.tr-remove-btn').html('<button type="button" class="btn btn-danger btn-sm removeRow-name-number-size btn-roster-action" data-toggle="tooltip" title="Remove"><i class="fa fa-remove" aria-hidden="true"></i></button>');
$('#addnew-btn-tbl-row').remove();
$('#tableRow tbody').append(response);
$('#orderListPanel').scrollTop($('#orderListPanel')[0].scrollHeight);
$('.inputName').keyup(function() {
this.value = this.value.toLocaleUpperCase();
});
}
});
});
$(document).on('button click', '#addNewRow_gamer_field', function(){
var TemplateCode = $('#template_code').val();
var product_url = $('#product_url').val();
// console.log(TemplateCode)
var orderCounterValue = $('#orderCounterValue').val();
var numi = document.getElementById('orderCounterValue');
var num = (document.getElementById('orderCounterValue').value -1) + 2;
numi.value = num;
$.ajax({ //create an ajax request to load_page.php
type: "POST",
url: "{{ url('/designer/a/add-new-row-gamer-field') }}",
data:{
itemCount : num,
tempCode : TemplateCode,
product_url : product_url
},
dataType: "html", //expect html to be returned
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){
var className = "row" + (num - 1);
$('.tr-remove-btn').html('<button type="button" class="btn btn-danger btn-sm removeRow-gamer-field btn-roster-action" data-toggle="tooltip" title="Remove"><i class="fa fa-remove" aria-hidden="true"></i></button>');
$('#addnew-btn-tbl-row').remove();
$('#tableRow tbody').append(response);
$('#orderListPanel').scrollTop($('#orderListPanel')[0].scrollHeight);
$('.inputName').keyup(function() {
this.value = this.value.toLocaleUpperCase();
});
}
});
});
$(document).on('button click', '#addNewRow_number', function(){
var TemplateCode = $('#template_code').val();
// console.log(TemplateCode)
var orderCounterValue = $('#orderCounterValue').val();
var numi = document.getElementById('orderCounterValue');
var num = (document.getElementById('orderCounterValue').value -1) + 2;
numi.value = num;
$.ajax({ //create an ajax request to load_page.php
type: "POST",
url: "{{ url('/designer/a/add-new-row-number') }}",
data:{
itemCount : num,
tempCode : TemplateCode
},
dataType: "html", //expect html to be returned
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){
var className = "row" + (num - 1);
$('.tr-remove-btn').html('<button type="button" class="btn btn-danger btn-sm removeRow-number btn-roster-action" data-toggle="tooltip" title="Remove"><i class="fa fa-remove" aria-hidden="true"></i></button>');
$('#addnew-btn-tbl-row').remove();
$('#tableRow tbody').append(response);
$('#orderListPanel').scrollTop($('#orderListPanel')[0].scrollHeight);
$('.inputName').keyup(function() {
this.value = this.value.toLocaleUpperCase();
@@ -601,6 +362,17 @@
});
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ end adding of rows @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ removing of rows @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
$(document).on('button click', '.removeRow', function(){
var str = $(this).closest('tr').attr('class');
var trCount = $('#tableRow tbody').children('tr').length;
if(trCount <= 2){
$('#addnew-btn-tbl-row').html('');
$('.tr-remove-btn').html('<button type="button" id="addNewRow" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>');
}
$('.'+str).remove();
});
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ end removing of rows @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
}); //end document ready
</script>
</body>

View File

@@ -1,34 +1,7 @@
<style>
tbody#orderTableBody>tr>td {
padding: 0px !important;
}
.panel-design-details{
max-height: 300px;
overflow: auto;
}
</style>
<div class="panel panel-default">
<div class="panel-heading">
<h1>{{ $product_array[0]->ProductName }}</h1> <p class="price">{{ $product_array[0]->ProductPrice }} <small> {{ $store_array[0]->StoreCurrency }} </small></p>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-12">
<form id="frm-order-list">
<input type="hidden" value="1" id="orderCounterValue" name="orderCounterValue" />
<input type="hidden" value="{{ $product_array[0]->Id }}" id="product_id" name="product_id" />
<input type="hidden" name="product_price" id="product_price" value="{{ $product_array[0]->ProductPrice }}">
<input type="hidden" name="price_holder" id="price_holder" value="{{ $product_array[0]->ProductPrice }}">
<input type="hidden" name="template_code" id="template_code" value="{{ $product_array[0]->TemplateCode }}">
<input type="hidden" name="avalable_sizes" id="avalable_sizes" value="{{ $product_array[0]->AvailableSizes }}">
<input type="hidden" name="store_url" id="store_url" value="{{ $store_array[0]->StoreUrl }}">
<input type="hidden" name="store_id" id="store_id" value="{{ $store_array[0]->Id }}">
<div class="panel-design-details" id="orderListPanel">
<div class="panel-design-details" id="orderListPanel">
<table class="table" id="tableRow" style="font-size:12px;">
<thead>
<tr>
<!-- <th>#</th> -->
<th class="col-md-4">Name</th>
<th class="col-md-2">Number</th>
<th class="col-md-3">Jersey Size</th>
@@ -37,13 +10,12 @@
</tr>
</thead>
<tbody id="orderTableBody">
<tr class="table-tr-1">
<tr class="table-tr-0">
<td>
<input type="text" name="order_names[]" id="order_names" class="form-control input-sm inputName roster-input" placeholder="Name">
<input type="text" name="order_names[]" class="form-control input-sm inputName roster-input" placeholder="Name">
</td>
<td>
<!-- <input type="text" name="order_numbers[]" id="order_numbers" class="form-control input-sm inputName" placeholder="Number"> -->
<select class="form-control input-sm roster-input" name="order_number[]" id="order_number">
<select class="form-control input-sm roster-input" name="order_number[]">
<option value="none">none</option>
@for($i = 0; $i <= 99; $i++)
<option value="{{ $i }}">{{ $i }}</option>
@@ -52,15 +24,15 @@
</select>
</td>
<td>
<select class="form-control input-sm order-size roster-input" name="order_jersey_size[]" id="order_jersey_size_1" data-row-number="1">
<select class="form-control input-sm order-size roster-input" name="order_jersey_size[]" data-row-number="1">
<option value="none">none</option>
@foreach($sizes_array as $size)
<option value="{{ $size->Size }}">{{ $size->Size }}</option>
@endforeach
</select>
</td>
<td style="border-right: 1px solid #ddd;">
<select class="form-control input-sm order-size roster-input" name="order_shorts_size[]" id="order_shorts_size_1" data-row-number="1">
<td>
<select class="form-control input-sm order-size roster-input" name="order_shorts_size[]" style="border-right: 1px solid #ccc;" data-row-number="1">
<option value="none">none</option>
@foreach($sizes_array as $size)
<option value="{{ $size->Size }}">{{ $size->Size }}</option>
@@ -75,35 +47,6 @@
</tr>
</tbody>
</table>
</div>
<!-- <hr class="hr-design"> -->
<div id="displayqty"></div>
<br>
@if($product_array[0]->ProductPrice > 0)
<button class="btn btn-primary pull-right" type="submit" id="btn-add-to-cart"><span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span> Add to Cart</button>
@endif
</form>
</div>
</div>
<div class="spacer-top"></div>
<div class="row">
<div class="col-md-12">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#productDescription" aria-controls="productDescription" role="tab" data-toggle="tab">Desciption</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="productDescription">
<div class="row">
<div class="col-md-12">
<p>
{{ $product_array[0]->ProductDescription }}
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="addnew-btn-tbl-row">
</div>
</div>

View File

@@ -1,31 +1,4 @@
<style>
tbody#orderTableBody>tr>td {
padding: 0px !important;
}
.panel-design-details{
max-height: 300px;
overflow: auto;
}
</style>
<div class="panel panel-default">
<div class="panel-heading">
<h1>{{ $product_array[0]->ProductName }}</h1> <p class="price">{{ $product_array[0]->ProductPrice }} <small> {{ $store_array[0]->StoreCurrency }} </small></p>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-12">
<form id="frm-order-list">
<input type="hidden" value="1" id="orderCounterValue" name="orderCounterValue" />
<input type="hidden" value="{{ $product_array[0]->Id }}" id="product_id" name="product_id" />
<input type="hidden" name="product_price" id="product_price" value="{{ $product_array[0]->ProductPrice }}">
<input type="hidden" name="price_holder" id="price_holder" value="{{ $product_array[0]->ProductPrice }}">
<input type="hidden" name="template_code" id="template_code" value="{{ $product_array[0]->TemplateCode }}">
<input type="hidden" name="store_url" id="store_url" value="{{ $store_array[0]->StoreUrl }}">
<input type="hidden" name="store_id" id="store_id" value="{{ $store_array[0]->Id }}">
<input type="hidden" name="product_url" id="product_url" value="{{ $product_array[0]->ProductURL }}">
<div class="panel-design-details" id="orderListPanel">
<div class="panel-design-details" id="orderListPanel">
<table class="table" id="tableRow" style="font-size:12px;">
<thead>
<tr>
@@ -39,13 +12,13 @@
<tbody id="orderTableBody">
<tr class="table-tr-1">
<td>
<input type="text" name="order_names[]" id="order_names" class="form-control input-sm inputName roster-input" placeholder="Gamer Tag">
<input type="text" name="order_names[]" class="form-control input-sm inputName roster-input" placeholder="Gamer Tag">
</td>
<td>
<input type="text" name="order_names2[]" id="order_names2" class="form-control input-sm inputName roster-input" placeholder="Name">
<input type="text" name="order_names2[]" class="form-control input-sm inputName roster-input" placeholder="Name">
</td>
<td>
<select class="form-control input-sm order-size roster-input" name="order_size[]" id="order_jersey_size_1" data-row-number="1">
<select class="form-control input-sm order-size roster-input" name="order_size[]" style="border-right: 1px solid #ccc;" >
@foreach($sizes_array as $size)
<option value="{{ $size->Size }}">{{ $size->Size }}</option>
@endforeach
@@ -53,43 +26,13 @@
</td>
<td id="action-column" class="text-center" style="padding: 4px !important; border-top: none">
<span class="tr-remove-btn">
<button type="button" id="addNewRow_gamer_field" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>
<button type="button" id="addNewRow" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>
</span>
</td>
</tr>
</tbody>
</table>
</div>
<!-- <hr class="hr-design"> -->
<div id="displayqty"></div>
<br>
@if($product_array[0]->ProductPrice > 0)
<button class="btn btn-primary pull-right" type="submit" id="btn-add-to-cart"><span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span> Add to Cart</button>
@endif
</form>
</div>
</div>
<div class="spacer-top"></div>
<div class="row">
<div class="col-md-12">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#productDescription" aria-controls="productDescription" role="tab" data-toggle="tab">Desciption</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="productDescription">
<div class="row">
<div class="col-md-12">
<p>
{{ $product_array[0]->ProductDescription }}
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="addnew-btn-tbl-row">
</div>
</div>

View File

@@ -1,47 +1,19 @@
<style>
tbody#orderTableBody>tr>td {
padding: 0px !important;
}
.panel-design-details{
max-height: 300px;
overflow: auto;
}
</style>
<div class="panel panel-default">
<div class="panel-heading">
<h1>{{ $product_array[0]->ProductName }}</h1> <p class="price">{{ $product_array[0]->ProductPrice }} <small> {{ $store_array[0]->StoreCurrency }} </small></p>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-12">
<form id="frm-order-list">
<input type="hidden" value="1" id="orderCounterValue" name="orderCounterValue" />
<input type="hidden" value="{{ $product_array[0]->Id }}" id="product_id" name="product_id" />
<input type="hidden" name="product_price" id="product_price" value="{{ $product_array[0]->ProductPrice }}">
<input type="hidden" name="price_holder" id="price_holder" value="{{ $product_array[0]->ProductPrice }}">
<input type="hidden" name="template_code" id="template_code" value="{{ $product_array[0]->TemplateCode }}">
<input type="hidden" name="store_url" id="store_url" value="{{ $store_array[0]->StoreUrl }}">
<input type="hidden" name="store_id" id="store_id" value="{{ $store_array[0]->Id }}">
<div class="panel-design-details" id="orderListPanel">
<div class="panel-design-details" id="orderListPanel">
<table class="table" id="tableRow" style="font-size:12px;">
<thead>
<tr>
<!-- <th>#</th> -->
<th class="col-md-6">Name</th>
<th class="col-md-5">Number</th>
<th class="text-center"></th>
</tr>
</thead>
<tbody id="orderTableBody">
<tr class="table-tr-1">
<tr class="table-tr-0">
<td>
<input type="text" name="order_names[]" id="order_names" class="form-control input-sm inputName roster-input" placeholder="Name">
<input type="text" name="order_names[]" class="form-control input-sm inputName roster-input" placeholder="Name">
</td>
<td>
<!-- <input type="text" name="order_numbers[]" id="order_numbers" class="form-control input-sm inputName" placeholder="Number"> -->
<select class="form-control input-sm roster-input" name="order_number[]" id="order_number">
<select class="form-control input-sm roster-input" style="border-right: 1px solid #ccc;" name="order_number[]" id="order_number">
<option value="none">none</option>
@for($i = 0; $i <= 99; $i++)
<option value="{{ $i }}">{{ $i }}</option>
@@ -51,42 +23,13 @@
</td>
<td id="action-column" class="text-center" style="padding: 4px !important; border-top: none">
<span class="tr-remove-btn">
<button type="button" id="addNewRow_name_and_number" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>
<button type="button" id="addNewRow" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>
</span>
</td>
</tr>
</tbody>
</table>
</div>
<!-- <hr class="hr-design"> -->
<div id="displayqty"></div>
<br>
@if($product_array[0]->ProductPrice > 0)
<button class="btn btn-primary pull-right" type="submit" id="btn-add-to-cart"><span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span> Add to Cart</button>
@endif
</form>
</div>
</div>
<div class="spacer-top"></div>
<div class="row">
<div class="col-md-12">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#productDescription" aria-controls="productDescription" role="tab" data-toggle="tab">Desciption</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="productDescription">
<div class="row">
<div class="col-md-12">
<p>
{{ $product_array[0]->ProductDescription }}
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="addnew-btn-tbl-row">
</div>
</div>

View File

@@ -1,30 +1,5 @@
<style>
tbody#orderTableBody>tr>td {
padding: 0px !important;
}
.panel-design-details{
max-height: 300px;
overflow: auto;
}
</style>
<div class="panel panel-default">
<div class="panel-heading">
<h1>{{ $product_array[0]->ProductName }}</h1> <p class="price">{{ $product_array[0]->ProductPrice }} <small> {{ $store_array[0]->StoreCurrency }} </small></p>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-12">
<form id="frm-order-list">
<input type="hidden" value="1" id="orderCounterValue" name="orderCounterValue" />
<input type="hidden" value="{{ $product_array[0]->Id }}" id="product_id" name="product_id" />
<input type="hidden" name="product_price" id="product_price" value="{{ $product_array[0]->ProductPrice }}">
<input type="hidden" name="price_holder" id="price_holder" value="{{ $product_array[0]->ProductPrice }}">
<input type="hidden" name="template_code" id="template_code" value="{{ $product_array[0]->TemplateCode }}">
<input type="hidden" name="store_url" id="store_url" value="{{ $store_array[0]->StoreUrl }}">
<input type="hidden" name="store_id" id="store_id" value="{{ $store_array[0]->Id }}">
<div class="panel-design-details" id="orderListPanel">
<div class="panel-design-details" id="orderListPanel">
<table class="table" id="tableRow" style="font-size:12px;">
<thead>
<tr>
@@ -36,13 +11,12 @@
</tr>
</thead>
<tbody id="orderTableBody">
<tr class="table-tr-1">
<tr class="table-tr-0">
<td>
<input type="text" name="order_names[]" id="order_names" class="form-control input-sm inputName roster-input" placeholder="Name">
</td>
<td>
<!-- <input type="text" name="order_numbers[]" id="order_numbers" class="form-control input-sm inputName" placeholder="Number"> -->
<select class="form-control input-sm roster-input" name="order_number[]" id="order_number">
<select class="form-control input-sm roster-input" name="order_number[]">
<option value="none">none</option>
@for($i = 0; $i <= 99; $i++)
<option value="{{ $i }}">{{ $i }}</option>
@@ -51,7 +25,7 @@
</select>
</td>
<td>
<select class="form-control input-sm order-size roster-input" name="order_size[]" id="order_jersey_size_1" data-row-number="1">
<select class="form-control input-sm order-size roster-input" name="order_size[]" style="border-right: 1px solid #ccc;" data-row-number="1">
@foreach($sizes_array as $size)
<option value="{{ $size->Size }}">{{ $size->Size }}</option>
@endforeach
@@ -59,43 +33,13 @@
</td>
<td id="action-column" class="text-center" style="padding: 4px !important; border-top: none">
<span class="tr-remove-btn">
<button type="button" id="addNewRow_name_number_size" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>
<button type="button" id="addNewRow" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>
</span>
</td>
</tr>
</tbody>
</table>
</div>
<!-- <hr class="hr-design"> -->
<div id="displayqty"></div>
<br>
@if($product_array[0]->ProductPrice > 0)
<button class="btn btn-primary pull-right" type="submit" id="btn-add-to-cart"><span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span> Add to Cart</button>
@endif
</form>
</div>
</div>
<div class="spacer-top"></div>
<div class="row">
<div class="col-md-12">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#productDescription" aria-controls="productDescription" role="tab" data-toggle="tab">Desciption</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="productDescription">
<div class="row">
<div class="col-md-12">
<p>
{{ $product_array[0]->ProductDescription }}
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="addnew-btn-tbl-row">
</div>
</div>

View File

@@ -1,57 +1,20 @@
<style>
tbody#orderTableBody>tr>td {
padding: 0px !important;
}
.panel-design-details{
max-height: 300px;
overflow: auto;
}
</style>
<div class="panel panel-default">
<div class="panel-heading">
<h1>{{ $product_array[0]->ProductName }}</h1> <p class="price">{{ $product_array[0]->ProductPrice }} <small> {{ $store_array[0]->StoreCurrency }} </small></p>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-12">
<form id="frm-order-list">
<input type="hidden" value="1" id="orderCounterValue" name="orderCounterValue" />
<input type="hidden" value="{{ $product_array[0]->Id }}" id="product_id" name="product_id" />
<input type="hidden" name="product_price" id="product_price" value="{{ $product_array[0]->ProductPrice }}">
<input type="hidden" name="price_holder" id="price_holder" value="{{ $product_array[0]->ProductPrice }}">
<input type="hidden" name="template_code" id="template_code" value="{{ $product_array[0]->TemplateCode }}">
<input type="hidden" name="store_url" id="store_url" value="{{ $store_array[0]->StoreUrl }}">
<input type="hidden" name="store_id" id="store_id" value="{{ $store_array[0]->Id }}">
<div class="panel-design-details" id="orderListPanel">
<div class="panel-design-details" id="orderListPanel">
<table class="table" id="tableRow" style="font-size:12px;">
<thead>
<tr>
<!-- <th>#</th> -->
<th class="col-md-5">Name</th>
<th class="col-md-3">Number</th>
<th class="col-md-3">Size</th>
<th class="col-md-6">Name</th>
<th class="col-md-5">Size</th>
<th class="text-center"></th>
</tr>
</thead>
<tbody id="orderTableBody">
<tr class="table-tr-1">
<tr class="table-tr-0">
<td>
<input type="text" name="order_names[]" id="order_names" class="form-control input-sm inputName roster-input" placeholder="Name">
<input type="text" name="order_names[]" class="form-control input-sm inputName roster-input" placeholder="Name">
</td>
<td>
<!-- <input type="text" name="order_numbers[]" id="order_numbers" class="form-control input-sm inputName" placeholder="Number"> -->
<select class="form-control input-sm roster-input" name="order_number[]" id="order_number">
<option value="none">none</option>
@for($i = 0; $i <= 99; $i++)
<option value="{{ $i }}">{{ $i }}</option>
@endfor
<option value="00">00</option>
</select>
</td>
<td>
<select class="form-control input-sm order-size roster-input" name="order_size[]" id="order_jersey_size_1" data-row-number="1">
<select class="form-control input-sm order-size roster-input" style="border-right: 1px solid #ccc;" name="order_size[]" data-row-number="1">
@foreach($sizes_array as $size)
<option value="{{ $size->Size }}">{{ $size->Size }}</option>
@endforeach
@@ -59,43 +22,12 @@
</td>
<td id="action-column" class="text-center" style="padding: 4px !important; border-top: none">
<span class="tr-remove-btn">
<button type="button" id="addNewRow_name_number_size" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>
<button type="button" id="addNewRow" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>
</span>
</td>
</tr>
</tbody>
</table>
</div>
<!-- <hr class="hr-design"> -->
<div id="displayqty"></div>
<br>
@if($product_array[0]->ProductPrice > 0)
<button class="btn btn-primary pull-right" type="submit" id="btn-add-to-cart"><span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span> Add to Cart</button>
@endif
</form>
</div>
</div>
<div class="spacer-top"></div>
<div class="row">
<div class="col-md-12">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#productDescription" aria-controls="productDescription" role="tab" data-toggle="tab">Desciption</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="productDescription">
<div class="row">
<div class="col-md-12">
<p>
{{ $product_array[0]->ProductDescription }}
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="addnew-btn-tbl-row">
</div>
</div>

View File

@@ -1,30 +1,4 @@
<style>
tbody#orderTableBody>tr>td {
padding: 0px !important;
}
.panel-design-details{
max-height: 300px;
overflow: auto;
}
</style>
<div class="panel panel-default">
<div class="panel-heading">
<h1>{{ $product_array[0]->ProductName }}</h1> <p class="price">{{ $product_array[0]->ProductPrice }} <small> {{ $store_array[0]->StoreCurrency }} </small></p>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-12">
<form id="frm-order-list">
<input type="hidden" value="1" id="orderCounterValue" name="orderCounterValue" />
<input type="hidden" value="{{ $product_array[0]->Id }}" id="product_id" name="product_id" />
<input type="hidden" name="product_price" id="product_price" value="{{ $product_array[0]->ProductPrice }}">
<input type="hidden" name="price_holder" id="price_holder" value="{{ $product_array[0]->ProductPrice }}">
<input type="hidden" name="template_code" id="template_code" value="{{ $product_array[0]->TemplateCode }}">
<input type="hidden" name="store_url" id="store_url" value="{{ $store_array[0]->StoreUrl }}">
<input type="hidden" name="store_id" id="store_id" value="{{ $store_array[0]->Id }}">
<div class="panel-design-details" id="orderListPanel">
<div class="panel-design-details" id="orderListPanel">
<table class="table" id="tableRow" style="font-size:12px;">
<thead>
<tr>
@@ -34,10 +8,9 @@
</tr>
</thead>
<tbody id="orderTableBody">
<tr class="table-tr-1">
<tr class="table-tr-0">
<td>
<!-- <input type="text" name="order_numbers[]" id="order_numbers" class="form-control input-sm inputName" placeholder="Number"> -->
<select class="form-control input-sm roster-input" name="order_number[]" id="order_number">
<select class="form-control input-sm roster-input" name="order_number[]" style="border-right: 1px solid #ccc;">
<option value="none">none</option>
@for($i = 0; $i <= 99; $i++)
<option value="{{ $i }}">{{ $i }}</option>
@@ -47,42 +20,13 @@
</td>
<td id="action-column" class="text-center" style="padding: 4px !important; border-top: none">
<span class="tr-remove-btn">
<button type="button" id="addNewRow_number" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>
<button type="button" id="addNewRow" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>
</span>
</td>
</tr>
</tbody>
</table>
</div>
<!-- <hr class="hr-design"> -->
<div id="displayqty"></div>
<br>
@if($product_array[0]->ProductPrice > 0)
<button class="btn btn-primary pull-right" type="submit" id="btn-add-to-cart"><span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span> Add to Cart</button>
@endif
</form>
</div>
</div>
<div class="spacer-top"></div>
<div class="row">
<div class="col-md-12">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#productDescription" aria-controls="productDescription" role="tab" data-toggle="tab">Desciption</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="productDescription">
<div class="row">
<div class="col-md-12">
<p>
{{ $product_array[0]->ProductDescription }}
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="addnew-btn-tbl-row">
</div>
</div>

View File

@@ -1,32 +1,4 @@
<style>
tbody#orderTableBody>tr>td {
padding: 0px !important;
}
.panel-design-details{
max-height: 300px;
overflow: auto;
}
</style>
<div class="panel panel-default">
<div class="panel-heading">
<h1>{{ $product_array[0]->ProductName }}</h1> <p class="price">{{ $product_array[0]->ProductPrice }} <small> {{ $store_array[0]->StoreCurrency }} </small></p>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-12">
<form id="frm-order-list">
<input type="hidden" value="1" id="orderCounterValue" name="orderCounterValue" />
<input type="hidden" value="{{ $product_array[0]->Id }}" id="product_id" name="product_id" />
<input type="hidden" name="product_price" id="product_price" value="{{ $product_array[0]->ProductPrice }}">
<input type="hidden" name="price_holder" id="price_holder" value="{{ $product_array[0]->ProductPrice }}">
<input type="hidden" name="template_code" id="template_code" value="{{ $product_array[0]->TemplateCode }}">
<input type="hidden" name="store_url" id="store_url" value="{{ $store_array[0]->StoreUrl }}">
<input type="hidden" name="store_id" id="store_id" value="{{ $store_array[0]->Id }}">
<!-- <div class="panel-design-details" id="orderListPanel">
</div> -->
<div class="form-group">
<div class="form-group">
<label class="control-label">Quantity <span class="required">*</span></label>
<div class="row">
<div class="col-sm-6">
@@ -54,35 +26,4 @@
</div>
</div>
</div>
<!-- <hr class="hr-design"> -->
<div id="displayqty"></div>
<br>
@if($product_array[0]->ProductPrice > 0)
<button class="btn btn-primary pull-right" type="submit" id="btn-add-to-cart"><span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span> Add to Cart</button>
@endif
</form>
</div>
</div>
<div class="spacer-top"></div>
<div class="row">
<div class="col-md-12">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#productDescription" aria-controls="productDescription" role="tab" data-toggle="tab">Desciption</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="productDescription">
<div class="row">
<div class="col-md-12">
<p>
{{ $product_array[0]->ProductDescription }}
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@@ -1,32 +1,5 @@
<style>
tbody#orderTableBody>tr>td {
padding: 0px !important;
}
.panel-design-details{
max-height: 300px;
overflow: auto;
}
</style>
<div class="panel panel-default">
<div class="panel-heading">
<h1>{{ $product_array[0]->ProductName }}</h1> <p class="price">{{ $product_array[0]->ProductPrice }} <small> {{ $store_array[0]->StoreCurrency }} </small></p>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-12">
<form id="frm-order-list">
<input type="hidden" value="1" id="orderCounterValue" name="orderCounterValue" />
<input type="hidden" value="{{ $product_array[0]->Id }}" id="product_id" name="product_id" />
<input type="hidden" name="product_price" id="product_price" value="{{ $product_array[0]->ProductPrice }}">
<input type="hidden" name="price_holder" id="price_holder" value="{{ $product_array[0]->ProductPrice }}">
<input type="hidden" name="template_code" id="template_code" value="{{ $product_array[0]->TemplateCode }}">
<input type="hidden" name="store_url" id="store_url" value="{{ $store_array[0]->StoreUrl }}">
<input type="hidden" name="store_id" id="store_id" value="{{ $store_array[0]->Id }}">
<!-- <div class="panel-design-details" id="orderListPanel">
</div> -->
<div class="form-group">
<div class="form-group">
<label class="control-label">Size <span class="required">*</span></label>
<div class="row">
<div class="col-sm-6">
@@ -39,8 +12,8 @@
<span id="err-uniformSize" style="color: #dd4b39"></span>
</div>
</div>
</div>
<div class="form-group">
</div>
<div class="form-group">
<label class="control-label">Quantity <span class="required">*</span></label>
<div class="row">
<div class="col-sm-6">
@@ -59,35 +32,4 @@
</div>
</div>
</div>
</div>
<!-- <hr class="hr-design"> -->
<div id="displayqty"></div>
<br>
@if($product_array[0]->ProductPrice > 0)
<button class="btn btn-primary pull-right" type="submit" id="btn-add-to-cart"><span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span> Add to Cart</button>
@endif
</form>
</div>
</div>
<div class="spacer-top"></div>
<div class="row">
<div class="col-md-12">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#productDescription" aria-controls="productDescription" role="tab" data-toggle="tab">Desciption</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="productDescription">
<div class="row">
<div class="col-md-12">
<p>
{{ $product_array[0]->ProductDescription }}
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@@ -149,17 +149,22 @@
border-bottom-width: 0px;
}
.btn-roster-action{
width: 20px;
/* width: 20px;
height: 20px;
border-radius: 10px;
border-radius: 10px; */
}
.btn-group-sm>.btn, .btn-roster-action {
.btn-group-sm>.btn{
padding: 0px 0px;
}
.table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{
vertical-align: unset;
}
.table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{
border: none;
}
.table>thead>tr>th{
border-bottom:none;
}
@@ -189,11 +194,15 @@
/* background:url("{{asset('public/images/icon.png') }}"); */
}
.zoom img {
display: block;
tbody#orderTableBody>tr>td {
padding: 0px !important;
}
.panel-design-details{
max-height: 300px;
overflow: auto;
}
.zoom img::selection { background-color: transparent; }
</style>
<div class="container">
@@ -208,28 +217,19 @@
</div>
</div>
<div class="row">
<!-- BEGIN PRODUCTS -->
<div class="col-md-5 col-sm-5">
<div class="row">
<!-- <div class="col-md-12"> -->
<div class="col-sm-12" id="carousel-bounding-box">
<div class="carousel slide" id="myCarousel" data-interval="false">
<!-- Carousel items -->
<div class="carousel-inner">
@define $i = 0
@foreach($thumbnails_array as $thumbnail)
<!-- @if($thumbnail->ImageClass == 'active')
<img id="main-thumbnail" class="img img-responsive product-center" style="height:287px;" src="http://{{ config('site_config.prod_private_server_ip') }}/images/{{ $thumbnail->Image }}"/>
@endif -->
@if($thumbnail->ImageClass == 'active')
<div class="active item text-center" data-slide-number="{{ $i }}">
<span class="zoom img-zoom">
<img style="height:400px;" src="{{ config('site_config.prod_private_server_ip') }}/images/{{ $thumbnail->Image }}">
<!-- <p class="edge-text">Click to zoom <i class="fa fa-search-plus"></i></p> -->
</span>
</div>
@else
@@ -252,10 +252,11 @@
</a>
</div>
</div>
<!-- </div> -->
</div>
<hr class="line">
<div class="row">
<div class="col-md-12">
<ul class="hide-bullets">
@@ -271,12 +272,51 @@
</ul>
</div>
</div>
</div>
<div class="col-md-7 col-sm-7">
@include('teamstore-sublayouts.forms.'.$product_array[0]->ProductForm)
<div class="panel panel-default">
<div class="panel-heading">
<h1>{{ $product_array[0]->ProductName }}</h1> <p class="price">{{ $product_array[0]->ProductPrice }} <small> {{ $store_array[0]->StoreCurrency }} </small></p>
</div>
<!-- END PRODUCTS -->
<div class="panel-body">
<div class="row">
<div class="col-md-12">
<form id="frm-order-list">
<input type="hidden" value="{{ md5($product_array[0]->Id) }}" name="p_id" id="p_id" />
@include('teamstore-sublayouts.forms.'.$product_array[0]->ProductForm)
@if($product_array[0]->ProductPrice > 0)
<button class="btn btn-primary pull-right" type="submit" id="btn-add-to-cart"><span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span> Add to Cart</button>
@endif
</form>
</div>
</div>
<div class="spacer-top"></div>
<div class="row">
<div class="col-md-12">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#productDescription" aria-controls="productDescription" role="tab" data-toggle="tab">Desciption</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="productDescription">
<div class="row">
<div class="col-md-12">
<p>{{ $product_array[0]->ProductDescription }}</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div> <!-- container -->
</div>
@endsection

View File

@@ -47,7 +47,6 @@
<input type="text" name="max" class="form-control datepicker-reports" id="max" placeholder="Select Date" required autocomplete="off"/>
</div>
</div>
<!-- {{ var_dump($array_store_orders) }} -->
<div class="col-md-12">
<table class="table table-bordered table-condensed nowrap" id="tbl_store_orders">
<thead>

View File

@@ -643,7 +643,7 @@
var min = $('#min').datepicker("getDate");
var max = $('#max').datepicker("getDate");
var startDate = new Date(data[4]);
var startDate = new Date(data[9]);
if (min == null && max == null) { return true; }
if (min == null && startDate <= max) { return true;}
if(max == null && startDate >= min) {return true;}
@@ -654,6 +654,7 @@
$("#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({
scrollX: true,
dom: 'Bfrtip',
@@ -680,6 +681,7 @@
return "ORDER REPORTS";
}
}
//,
// {
// extend: 'pdf',
@@ -711,7 +713,7 @@
],
columnDefs: [
{ targets: 9, type: 'date', visible: false },
{ targets: 19, type: 'date' }
{ targets: 9, type: 'date' }
],
});