added new form for store item
This commit is contained in:
@@ -496,6 +496,36 @@ class TeamStoreController extends Controller {
|
||||
}
|
||||
|
||||
}
|
||||
}elseif($product_form == "number-jersey-shorts-form"){
|
||||
|
||||
$order_number = $post['order_number'];
|
||||
$order_jersey_size = $post['order_jersey_size'];
|
||||
$order_shorts_size = $post['order_shorts_size'];
|
||||
|
||||
foreach($order_number as $key => $val){
|
||||
|
||||
if($order_jersey_size[$key] == "none" || $order_shorts_size[$key] == "none"){
|
||||
$final_price = $ProductPrice / 2;
|
||||
}else{
|
||||
$final_price = $ProductPrice;
|
||||
}
|
||||
|
||||
$items[] = array(
|
||||
'ProductId' => $product_id,
|
||||
'StoreURL' => $store_url,
|
||||
'StoreId' => $store_id,
|
||||
'FormUsed' => $product_form,
|
||||
'CartKey' => $cartKey,
|
||||
'DesignCode' => $design_code,
|
||||
'ProductURL' => $ProductURL,
|
||||
'ProductName' => $product_name,
|
||||
'Number' => $order_number[$key],
|
||||
'JerseySize' => $order_jersey_size[$key],
|
||||
'ShortsSize' => $order_shorts_size[$key],
|
||||
'Price' => $final_price,
|
||||
'Quantity' => 1
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$i = $m->insertToCart($items);
|
||||
|
||||
@@ -475,13 +475,21 @@
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="jersey-and-shorts-quantity-form")
|
||||
@elseif($item->FormUsed=="jersey-and-shorts-quantity-form")
|
||||
<tr>
|
||||
<th>Jersey Size</th>
|
||||
<th>Shorts Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="number-jersey-shorts-form")
|
||||
<tr>
|
||||
<td><b>Number</b></td>
|
||||
<td><b>Jersey Size</b></td>
|
||||
<td><b>Shorts Size</b></td>
|
||||
<td><b>Price</b></td>
|
||||
<td><b>Quantity</b></td>
|
||||
</tr>
|
||||
@else
|
||||
|
||||
|
||||
@@ -558,6 +566,14 @@
|
||||
<td>{{ $sub_item->Price }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="number-jersey-shorts-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Number }}</td>
|
||||
<td>{{ $sub_item->JerseySize }}</td>
|
||||
<td>{{ $sub_item->ShortsSize }}</td>
|
||||
<td>{{ $sub_item->Price }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
</tr>
|
||||
@else
|
||||
|
||||
@endif
|
||||
|
||||
@@ -188,6 +188,15 @@
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@elseif($item->FormUsed=="number-jersey-shorts-form")
|
||||
<tr>
|
||||
<th>Number</th>
|
||||
<th>Jersey Size</th>
|
||||
<th>Shorts Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@else
|
||||
|
||||
@endif
|
||||
@@ -267,7 +276,15 @@
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><span class="glyphicon glyphicon-remove"></span></a></td>
|
||||
</tr>
|
||||
|
||||
@elseif($item->FormUsed=="number-jersey-shorts-form")
|
||||
<tr>
|
||||
<td>{{ $sub_item->Number }}</td>
|
||||
<td>{{ $sub_item->JerseySize }}</td>
|
||||
<td>{{ $sub_item->ShortsSize }}</td>
|
||||
<td>{{ $sub_item->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $sub_item->Quantity }}</td>
|
||||
<td><a class="btn btn-xs btn-link pull-right" href="{{ url('removeitem') }}/{{ $sub_item->Id }}"><span class="glyphicon glyphicon-remove"></span></a></td>
|
||||
</tr>
|
||||
@else
|
||||
|
||||
@endif
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
<div class="panel-design-details" id="orderListPanel">
|
||||
<table class="table" id="tableRow" style="font-size:12px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">Number</th>
|
||||
<th class="col-md-4">Jersey Size</th>
|
||||
<th class="col-md-4">Shorts Size</th>
|
||||
<th class="text-center"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="orderTableBody">
|
||||
<tr class="table-tr-0">
|
||||
<td>
|
||||
<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>
|
||||
@endfor
|
||||
<option value="00">00</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<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->SizeDisplay }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</td>
|
||||
<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->SizeDisplay }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</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" 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 id="addnew-btn-tbl-row">
|
||||
</div>
|
||||
</div>
|
||||
@@ -101,7 +101,7 @@
|
||||
<option value="number-form">Number Only Form</option>
|
||||
<option value="name-size-form">Name and Size Form</option>
|
||||
<option value="jersey-and-shorts-quantity-form">Jersey, Shorts and Quantity Form</option>
|
||||
|
||||
<option value="number-jersey-shorts-form">Number, Jersey and Shorts Form</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -84,6 +84,36 @@
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
</tr>
|
||||
@elseif($array_item[0]->FormUsed=="name-name2-size-form")
|
||||
<tr>
|
||||
<th>Gamer Tag</th>
|
||||
<th>Name</th>
|
||||
<th>Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
</tr>
|
||||
@elseif($array_item[0]->FormUsed=="name-size-form")
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
</tr>
|
||||
@elseif($array_item[0]->FormUsed=="jersey-and-shorts-quantity-form")
|
||||
<tr>
|
||||
<th>Jersey Size</th>
|
||||
<th>Shorts Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
</tr>
|
||||
@elseif($array_item[0]->FormUsed=="number-jersey-shorts-form")
|
||||
<tr>
|
||||
<th>Number</th>
|
||||
<th>Jersey Size</th>
|
||||
<th>Shorts Size</th>
|
||||
<th>Price</th>
|
||||
<th>Quantity</th>
|
||||
</tr>
|
||||
@else
|
||||
|
||||
@endif
|
||||
@@ -134,6 +164,37 @@
|
||||
<td>{{ $array_item[0]->Price }}</td>
|
||||
<td>{{ $array_item[0]->Quantity }}</td>
|
||||
</tr>
|
||||
|
||||
@elseif($array_item[0]->FormUsed=="name-name2-size-form")
|
||||
<tr>
|
||||
<td>{{ $array_item[0]->Name }}</td>
|
||||
<td>{{ $array_item[0]->Name2 }}</td>
|
||||
<td>{{ $array_item[0]->Size }}</td>
|
||||
<td>{{ $array_item[0]->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $array_item[0]->Quantity }}</td>
|
||||
</tr>
|
||||
@elseif($array_item[0]->FormUsed=="name-size-form")
|
||||
<tr>
|
||||
<td>{{ $array_item[0]->Name }}</td>
|
||||
<td>{{ $array_item[0]->Size }}</td>
|
||||
<td>{{ $array_item[0]->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $array_item[0]->Quantity }}</td>
|
||||
</tr>
|
||||
@elseif($array_item[0]->FormUsed=="jersey-and-shorts-quantity-form")
|
||||
<tr>
|
||||
<td>{{ $array_item[0]->JerseySize}}</td>
|
||||
<td>{{ $array_item[0]->ShortsSize}}</td>
|
||||
<td>{{ $array_item[0]->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $array_item[0]->Quantity }}</td>
|
||||
</tr>
|
||||
@elseif($array_item[0]->FormUsed=="number-jersey-shorts-form")
|
||||
<tr>
|
||||
<td>{{ $array_item[0]->Number }}</td>
|
||||
<td>{{ $array_item[0]->JerseySize }}</td>
|
||||
<td>{{ $array_item[0]->ShortsSize }}</td>
|
||||
<td>{{ $array_item[0]->Price . ' ' . $store_array[0]->StoreCurrency }}</td>
|
||||
<td>{{ $array_item[0]->Quantity }}</td>
|
||||
</tr>
|
||||
@else
|
||||
|
||||
@endif
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
<option value="number-form" @if($product_array[0]->ProductForm == "number-form") selected @endif>Number Only Form</option>
|
||||
<option value="name-size-form" @if($product_array[0]->ProductForm == "name-size-form") selected @endif>Name and Size Form</option>
|
||||
<option value="jersey-and-shorts-quantity-form" @if($product_array[0]->ProductForm == "jersey-and-shorts-quantity-form") selected @endif>Jersey, Shorts and Quantity Form</option>
|
||||
|
||||
<option value="number-jersey-shorts-form" @if($product_array[0]->ProductForm == "number-jersey-shorts-form") selected @endif>Number, Jersey and Shorts Form</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
Reference in New Issue
Block a user