diff --git a/app/Http/Controllers/MainController.php b/app/Http/Controllers/MainController.php
index 93275a5..a3fcd8e 100644
--- a/app/Http/Controllers/MainController.php
+++ b/app/Http/Controllers/MainController.php
@@ -7,6 +7,7 @@ use Illuminate\Http\Request;
use App\Models\MainModel;
// use Illuminate\Support\Facades\Request;
use Analytics;
+use Session;
class MainController extends Controller {
@@ -105,7 +106,21 @@ class MainController extends Controller {
// }
}
+
+ //call this from blade view
+ public static function getCountCart(){
+ $m = new MainModel;
+
+ if(Session::get('cartkey')){
+ $cartKey = Session::get('cartkey');
+
+ echo $i = $m->cartCount($cartKey);
+
+ }else{
+ echo 0;
+ }
+ }
public function countCart(Request $request){
diff --git a/app/Http/Controllers/paypal/PaypalController.php b/app/Http/Controllers/paypal/PaypalController.php
index 800ef1d..7d33257 100644
--- a/app/Http/Controllers/paypal/PaypalController.php
+++ b/app/Http/Controllers/paypal/PaypalController.php
@@ -59,7 +59,8 @@ class PaypalController extends Controller {
if(Auth::guest()){
- Session::flash('msg', 'Please login your account to proceed.');
+ $message = 'Please Sign in to your account to proceed.';
+ Session::flash('msg', $message);
return Redirect::back();
}
@@ -111,9 +112,16 @@ class PaypalController extends Controller {
$order_subtotal = $updated_getSubtotal[0]->Subtotal;
$order_grandtotal = $updated_getSubtotal[0]->Subtotal;
- $tax = $order_grandtotal * 0.10;
-
+ // $tax_value = 0.10;
+ if($grouped_item[0]->StoreId == 76){
+ $tax_value = 0;
+ }else{
+ $tax_value = 0.10;
+ }
+
+ $tax = $order_grandtotal * $tax_value;
+
foreach($updated_items as $key => $item){
// $descriptions = "Name: " . $item->Name . " Number: " . $item->Number . " Size: " . $item->Size;"?"
diff --git a/app/Http/Controllers/teamstore/TeamStoreController.php b/app/Http/Controllers/teamstore/TeamStoreController.php
index 7f583dc..e0d8dc2 100644
--- a/app/Http/Controllers/teamstore/TeamStoreController.php
+++ b/app/Http/Controllers/teamstore/TeamStoreController.php
@@ -50,25 +50,34 @@ class TeamStoreController extends Controller {
foreach ($product_array as $p => $pr_arr) {
$thumbnails_array = $m->getProductThumbnails($pr_arr->Id);
- foreach ($thumbnails_array as $t => $thumb) {
-
- if($thumb->ImageClass == 'custom'){
- $displayThumbnails = $thumb->Image;
- break;
+ if(!empty($thumbnails_array)){
+ foreach ($thumbnails_array as $t => $thumb) {
+
+ if($thumb->ImageClass == 'custom'){
+ $displayThumbnails = $thumb->Image;
+ break;
+ }
+
+ if($thumb->ImageClass == 'active'){
+ $displayThumbnails = $thumb->Image;
+ break;
+ }
}
- if($thumb->ImageClass == 'active'){
- $displayThumbnails = $thumb->Image;
- break;
- }
- }
+ $thumbnails[] = array(
+ 'folder' => $store_array[0]->ImageFolder,
+ 'product_id' => $pr_arr->Id,
+ 'thumb' => $displayThumbnails
+
+ );
- $thumbnails[] = array(
- 'folder' => $store_array[0]->ImageFolder,
- 'product_id' => $pr_arr->Id,
- 'thumb' => $displayThumbnails
-
- );
+ }else{
+ $thumbnails[] = array(
+ 'folder' => $store_array[0]->ImageFolder,
+ 'product_id' => $pr_arr->Id,
+ 'thumb' => "product-image-placeholder.png"
+ );
+ }
}
// var_dump($thumbnails);
@@ -100,7 +109,6 @@ class TeamStoreController extends Controller {
// var_dump(array_unique($arr_teamstore));
$m = new TeamStoreModel;
-
$q = $request->input('q');
$sort = $request->input('s');
@@ -139,9 +147,6 @@ class TeamStoreController extends Controller {
->with('stores_array', $stores_array)
->with('keyword', $q)
->with('filter', $sort);
-
-
-
}
public function checkTeamStorePassword(Request $request)
@@ -168,11 +173,21 @@ class TeamStoreController extends Controller {
$teams_array = array();
$store_array = $m->selectTeamStore('StoreUrl', $teamStoreURL);
$product_array = $m->selectTeamStoreProducts('ProductURL', $productURL);
- // var_dump($product_array);
+
$thumbnails_array = $m->getThumbnails($product_array[0]->Id);
$teams_array = $m->getTeams($product_array[0]->Id);
// $sizes_array = $m->getSizes();
+ if(empty($thumbnails_array)){
+
+ $data = (object) array(
+ 'Image' => 'product-image-placeholder.png',
+ 'ImageClass' => 'active'
+ );
+
+
+ $thumbnails_array[] = $data;
+ }
$x = explode(",", $product_array[0]->AvailableSizes );
diff --git a/app/Http/Controllers/user/UserController.php b/app/Http/Controllers/user/UserController.php
index 250f997..a87e0c8 100644
--- a/app/Http/Controllers/user/UserController.php
+++ b/app/Http/Controllers/user/UserController.php
@@ -289,27 +289,37 @@ class UserController extends Controller {
foreach ($product_array as $p => $pr_arr) {
$thumbnails_array = $newTeamStoreModel->getProductThumbnails($pr_arr->Id);
- foreach ($thumbnails_array as $t => $thumb) {
+
+ if(!empty($thumbnails_array)){
+ foreach ($thumbnails_array as $t => $thumb) {
- if($thumb->ImageClass == 'custom'){
- $displayThumbnails = $thumb->Image;
- break;
+ if($thumb->ImageClass == 'custom'){
+ $displayThumbnails = $thumb->Image;
+ break;
+ }
+
+ if($thumb->ImageClass == 'active'){
+ $displayThumbnails = $thumb->Image;
+ break;
+ }
}
+
+ $thumbnails[] = array(
+ 'folder' => $store_array[0]->ImageFolder,
+ 'product_id' => $pr_arr->Id,
+ 'thumb' => $displayThumbnails
+ );
- if($thumb->ImageClass == 'active'){
- $displayThumbnails = $thumb->Image;
- break;
- }
+ }else{
+ $thumbnails[] = array(
+ 'folder' => $store_array[0]->ImageFolder,
+ 'product_id' => $pr_arr->Id,
+ 'thumb' => "product-image-placeholder.png"
+ );
}
-
- $thumbnails[] = array(
- 'folder' => $store_array[0]->ImageFolder,
- 'product_id' => $pr_arr->Id,
- 'thumb' => $displayThumbnails
- );
+
}
-
- // var_dump($thumbnails);
+
return view('user-layouts.store_items')->with('store_array', $store_array)
->with('product_array', $product_array)
->with('thumbnails', $thumbnails);
@@ -322,8 +332,10 @@ class UserController extends Controller {
$product_array = $newTeamStoreModel->selectTeamStoreProducts('ProductURL', $url);
$thumbnails_array = $newTeamStoreModel->getThumbnails($product_array[0]->Id);
+ $available_size = explode(",", $product_array[0]->AvailableSizes);
// var_dump($product_array);
return view('user-layouts.view-store-item')->with('product_array', $product_array)
+ ->with('available_size', $available_size)
->with('thumbnails_array', $thumbnails_array);
@@ -339,7 +351,9 @@ class UserController extends Controller {
'ProductName' => $post['itemName'],
'ProductPrice' => str_replace('$ ', '', $post['item_price']),
'ProductDescription' => $post['itemDescription'],
- 'PrivacyStatus' => $post['item_privacy']
+ 'PrivacyStatus' => $post['item_privacy'],
+ 'ProductForm' => $post['itemForm'],
+ 'AvailableSizes' => implode(",", $post['available_size'])
);
$i = $newTeamStoreModel->updateStoreItem($data, $item_url);
@@ -731,13 +745,75 @@ class UserController extends Controller {
));
}
+
+ function saveNewItemImage(Request $request){
+ $post = $request->all();
+ $UserModel = new UserModel;
+ $getYear = date('y');
+ $id = $post['_id'];
+
+ $getActiveDisplay = $UserModel->selectDisplayItemThumbById($id);
+ for($i = 0; $i < count($post['upload_images']); $i++){
+ $rawName = date('Ymd') . "-" . time().'-'.$request->file('upload_images')[$i]->getClientOriginalName();
+ $imageExt = $request->file('upload_images')[$i]->getClientOriginalExtension();
+ $custom_file_name = str_replace(' ','-',strtolower($rawName));
+ $custom_file_name = preg_replace("/\.[^.\s]{3,4}$/", "", $custom_file_name);
+ $NewImageName = $custom_file_name.'.'.$imageExt;
+ $thumbnail = $NewImageName;
+
+ if($i == 0 && empty($getActiveDisplay)){
+ $imageClass = "active";
+ }else{
+ $imageClass = null;
+ }
+
+ $thumbs = $data = array(
+ 'ProductId' => $id,
+ 'Image' => $thumbnail,
+ 'ImageClass' =>$imageClass
+ );
+
+ $u = $UserModel->insertNewProductThumbnails($thumbs);
+ // Storage::disk('sftp')->put($thumbnail, fopen($request->file('imgupload')[$i], 'r+')); live
+ Storage::disk('localdir')->put($thumbnail, fopen($request->file('upload_images')[$i], 'r+'));
+
+ }
+
+
+ return response()->json(array(
+ 'success' => true,
+ 'message' => 'success'
+ ));
+
+ }
+
+ function deleteImageThumb(Request $request){
+ $file = $request->thumb_filename;
+ $id = $request->thumb_id;
+ $UserModel = new UserModel;
+
+ $storagePath = Storage::disk('localdir')->getDriver()->getAdapter()->getPathPrefix();
+ if(file_exists($storagePath.$file)) {
+ unlink($storagePath.$file);
+ }
+
+ $i = $UserModel->deleteImageThumb('Id', $id);
+
+ return response()->json(array(
+ 'success' => true,
+ 'message' => 'success',
+ 'delete_row' => 'item-' . $id
+ ));
+
+ }
+
function updateActiveThumbnail(Request $request){
$post = $request->all();
$UserModel = new UserModel;
$i = $UserModel->updateActiveThumb($post['id'], $post['product_id']);
- var_dump($i);
+ // var_dump($i);
}
@@ -756,4 +832,152 @@ class UserController extends Controller {
'message' => 'success'
));
}
+
+ function storeSettingUpdate(Request $request){
+ $post = $request->all();
+ $UserModel = new UserModel;
+
+ $store_id = Auth::user()->store_id;
+ $store_name = $post['store_name'];
+ $store_url = $post['store_url'];
+ $orig_store_url = $post['orig_store_url'];
+
+
+ if($post['store_status'] == "Public"){
+ $store_status = "true";
+ }else{
+ $store_status = "false";
+ }
+
+ if(isset($post['set_store_password'])){
+ $store_password = $post['store_password'];
+ }else{
+ $store_password = null;
+ }
+
+ if($request->file('store_logo') != null){
+ $store_logo_name = 'logo.'. $request->file('store_logo')->getClientOriginalExtension();
+ }else{
+ $store_logo_name = $post['orig_store_logo'];
+ }
+
+ if($request->file('store_banner') != null){
+ $store_banner_name = 'banner.'. $request->file('store_banner')->getClientOriginalExtension();
+ }else{
+ $store_banner_name = $post['orig_store_banner'];
+ }
+
+
+ if($orig_store_url != $store_url){
+
+ $check_store_url = array(
+ 'StoreUrl' => $store_url
+ );
+
+ $validator = Validator::make($check_store_url, [
+ 'StoreUrl' => 'unique:teamstores'
+ ],
+ [
+ 'StoreUrl.unique' => 'The Store URL has already been taken.',
+ ]);
+
+
+ if ($validator->fails())
+ {
+ $errors = "";
+
+ foreach($validator->errors()->all() as $error){
+ $errors .= "
".$error."";
+ }
+
+ return response()->json(array(
+ 'success' => false,
+ 'clearform' => false,
+ 'message' => $errors
+ ));
+ }
+
+
+
+ }
+
+ $data = array(
+ 'StoreUrl' => $store_url,
+ // 'ImageFolder' => $store_url,
+ 'Password' => $store_password,
+ 'HashId' => md5($store_url),
+ 'StoreName' => $store_name,
+ 'StoreLogo' => $store_logo_name,
+ 'StoreBanner' => $store_banner_name,
+ 'IsActive' => $store_status
+ );
+
+ // var_dump($data);
+
+
+ $res = $UserModel->updateTeamstore($store_id, $data);
+ // var_dump($res);
+ // if($res){
+ if($request->file('store_logo') != null){
+ Storage::disk('uploads')->put('/teamstore/'. $orig_store_url . '/' . $store_logo_name, fopen($request->file('store_logo'), 'r+'));
+ }
+
+ if($request->file('store_banner') != null){
+ Storage::disk('uploads')->put('/teamstore/'. $orig_store_url . '/' . $store_banner_name, fopen($request->file('store_banner'), 'r+'));
+ }
+
+ return response()->json(array(
+ 'success' => true,
+ 'clearform' => false,
+ 'message'=>'Store is successfully updated.'
+ ));
+
+ // }else{
+ // return response()->json(array(
+ // 'success' => false,
+ // 'clearform' => true,
+ // 'message' => 'Something went wrong. Please refresh the page and try again.'
+ // ));
+ // }
+
+ }
+
+ function storeOrders(){
+ $UserModel = new UserModel;
+ $newTeamStoreModel = new TeamStoreModel;
+ $store_id = Auth::user()->store_id;
+
+ $array_store_orders = $UserModel->selectStoreOrders($store_id);
+ $store_array = $newTeamStoreModel->selectTeamStore('Id', $store_id);
+
+ return view('user-layouts.store-orders')
+ ->with('store_array', $store_array)
+ ->with('array_store_orders', $array_store_orders);
+ }
+
+ function showStoreOrderDetails(Request $request){
+
+ $post = $request->all();
+ $UserModel = new UserModel;
+ $array_payment_details = $UserModel->selectPaymentDetails('CartKey', $post['ck']);
+ $array_shipping_add = $UserModel->selectShippingAddress('PaymentDetail_Id', $array_payment_details[0]->Id);
+
+ $array_thumbnail_display = $UserModel->selectDisplayItemThumbById($post['pid']);
+ $array_item = $UserModel->selectOrder('Id', $post['id']);
+
+ $handle_order_detail_body = view('user-layouts.order-details-body')
+ ->with('array_payment_details', $array_payment_details)
+ ->with('array_shipping_add', $array_shipping_add)
+ ->with('array_thumbnail_display', $array_thumbnail_display)
+ ->with('array_item', $array_item)
+ ->render();
+
+
+ return response()->json(array(
+ 'success' => true,
+ 'payment_details_response' => $handle_order_detail_body,
+ 'thumb' => $array_thumbnail_display,
+ 'item' => $array_item
+ ));
+ }
}
diff --git a/app/Http/routes.php b/app/Http/routes.php
index c88d2ca..8099ef2 100644
--- a/app/Http/routes.php
+++ b/app/Http/routes.php
@@ -117,6 +117,7 @@ Route::group(['middleware' => 'normaluser'], function () {
Route::get('user/store-items/item/{url}', 'user\UserController@viewStoreItem');
Route::post('user/store-items/update', 'user\UserController@storeItemUpdate');
Route::get('user/store-settings', 'user\UserController@storeSetting');
+ Route::post('user/store-settings/update', 'user\UserController@storeSettingUpdate');
Route::get('user/email-verify', 'user\UserController@emailVerify');
Route::post('user/post/resend-verification', 'user\UserController@resendVericationCode');
Route::post('user/post/verify-code', 'user\UserController@verifyCode');
@@ -124,12 +125,18 @@ Route::group(['middleware' => 'normaluser'], function () {
Route::post('user/store-items/save-new-item', 'user\UserController@saveNewItem');
Route::post('user/update-active-thumbnail', 'user\UserController@updateActiveThumbnail');
Route::post('user/post/save-thumbnail-ordering', 'user\UserController@saveThumbnailOrdering');
+ Route::post('user/post/show-store-order-details', 'user\UserController@showStoreOrderDetails');
+ Route::post('user/post/delete-image-thumb', 'user\UserController@deleteImageThumb');
+ Route::post('user/store-items/save-new-item-image', 'user\UserController@saveNewItemImage');
Route::get('user/my-designs/sell-design/{designCode}', 'user\UserController@sellDesign');
Route::post('user/my-designs/addstoreitem', 'user\UserController@saveNewStoreItem');
Route::get('user/my-designs/buy-design/{designCode}', 'user\UserController@buyDesign');
+
+ Route::get('user/store-orders', 'user\UserController@storeOrders');
+
});
diff --git a/app/Models/designer/DesignerModel.php b/app/Models/designer/DesignerModel.php
index d9e0b96..6c4486a 100644
--- a/app/Models/designer/DesignerModel.php
+++ b/app/Models/designer/DesignerModel.php
@@ -41,7 +41,7 @@ class DesignerModel extends Model {
function selectDefaultTemplateColor($templateCode){
$pdo = DB::connection()->getPdo();
- $query = $pdo->prepare("SELECT NULL AS RGBIndex, RGBColor AS default_Color FROM template_body_colors WHERE TemplateCode = '$templateCode' UNION SELECT TrimNumber, RGBColor AS default_Color FROM template_trim_colors WHERE TemplateCode = '$templateCode'");
+ $query = $pdo->prepare("SELECT NULL AS RGBIndex, RGBColor AS default_Color, DisplayName FROM template_body_colors WHERE TemplateCode = '$templateCode' UNION SELECT TrimNumber, RGBColor AS default_Color, DisplayName FROM template_trim_colors WHERE TemplateCode = '$templateCode'");
$query->execute();//$query->execute(array($bindings ));
// $row=$query->fetch(\PDO::FETCH_OBJ);
@@ -51,9 +51,11 @@ class DesignerModel extends Model {
}else{
$IndexName = $row->RGBIndex;
}
- $arr_default_mainColor[] = array($IndexName => $row->default_Color);
+ $arr_default_mainColor[] = array(
+ $IndexName => $row->default_Color,
+ 'h4_Trim_' . $IndexName => $row->DisplayName,
+ );
}
- // var_dump($arr_default_mainColor);
return $arr_default_mainColor;
}
diff --git a/app/Models/user/UserModel.php b/app/Models/user/UserModel.php
index 810f468..c8e3b37 100644
--- a/app/Models/user/UserModel.php
+++ b/app/Models/user/UserModel.php
@@ -153,6 +153,22 @@ class UserModel extends Model {
return $i;
}
+ function selectOrder($field, $value){
+ $i = DB::table('orders')
+ ->where($field, $value)
+ ->get();
+ return $i;
+ }
+
+ function selectStoreOrders($store_id){
+ $i = DB::table('orders')->select('orders.*', 'payment_details.InvoiceNumber', 'payment_details.Currency')
+ ->leftjoin('payment_details', 'payment_details.CartKey','=','orders.CartKey')
+ ->where('orders.StoreId', $store_id)
+ ->orderby('orders.DateCreated', 'DESC')
+ ->get();
+ return $i;
+ }
+
function itemGroup($cartKey){
$pdo = DB::connection()->getPdo();
$query = $pdo->prepare("SELECT *, COUNT(Id) AS qty, Price * SUM(Quantity) AS total_price FROM orders WHERE CartKey = :ck GROUP BY ProductId");
@@ -181,6 +197,22 @@ class UserModel extends Model {
return $i;
}
+ function selectDisplayItemThumbById($id){
+
+ $i = DB::table('teamstore_product_thumbnails')
+ ->where('ProductId', $id)
+ ->where('ImageClass', 'active')
+ ->get();
+ return $i;
+ }
+
+ function deleteImageThumb($field, $id){
+ $i = DB::table('teamstore_product_thumbnails')
+ ->where($field, $id)
+ ->delete();
+ return $i;
+ }
+
function selectItemsStoreId($ck){
$i = DB::table('cart_tmp')
@@ -238,4 +270,20 @@ class UserModel extends Model {
$i = DB::table('teamstore_product_thumbnails')->where('Id', $id)
->update(['Ordering' => $order]);
}
+
+ function updateTeamstore($id, $data){
+
+ $i = DB::table('teamstores')
+ ->where("Id", $id)
+ ->update($data);
+ return $i;
+ }
+
+ function selectShippingAddress($field, $value){
+
+ $i = DB::table('shipping_addresses')
+ ->where($field, $value)
+ ->get();
+ return $i;
+ }
}
\ No newline at end of file
diff --git a/config/filesystems.php b/config/filesystems.php
index d8ec2b6..5068fd8 100644
--- a/config/filesystems.php
+++ b/config/filesystems.php
@@ -82,6 +82,10 @@ return [
'timeout' => 10
],
+ 'uploads' => [
+ 'driver' => 'local',
+ 'root' => 'C:\\wamp\\www\\uploads\\images\\',
+ ],
],
];
diff --git a/config/site_config.php b/config/site_config.php
index 0c917e8..6fa0393 100644
--- a/config/site_config.php
+++ b/config/site_config.php
@@ -16,14 +16,7 @@ return [
// 'company_name' => env('COMPANY_NAME','Acme Inc'),
// 'company_email' => env('COMPANY_email','contact@acme.inc'),
- // 'prod_private_server_ip' => env('https://crewsportswear.app', 'https://crewsportswear.app'),
- 'prod_private_server_ip' => env('http://localhost', 'http://localhost'), // local
-
- 'designer_location' => env('http://localhost/plain-tshirt/', 'http://localhost/plain-tshirt/'),
-
- 'images_directory' => env('http://localhost/crewsportswear/public/images/', 'http://localhost/crewsportswear/public/images/'),
-
- 'uploads' => env('http://localhost/uploads/images', 'http://localhost/uploads/images/'), // local
-
+ 'prod_private_server_ip' => env('http://localhost', 'http://localhost'),
+ 'uploads' => env('http://localhost/uploads/images/', 'http://localhost/uploads/images/'), // local
];
\ No newline at end of file
diff --git a/public/bower_components/AdminLTE/plugins/datatables.net-bs/.bower.json b/public/bower_components/AdminLTE/plugins/datatables.net-bs/.bower.json
new file mode 100644
index 0000000..23e1b84
--- /dev/null
+++ b/public/bower_components/AdminLTE/plugins/datatables.net-bs/.bower.json
@@ -0,0 +1,48 @@
+{
+ "name": "datatables.net-bs",
+ "description": "DataTables for jQuery with styling for [Bootstrap](http://getbootstrap.com/)",
+ "main": [
+ "js/dataTables.bootstrap.js",
+ "css/dataTables.bootstrap.css"
+ ],
+ "keywords": [
+ "filter",
+ "sort",
+ "DataTables",
+ "jQuery",
+ "table",
+ "Bootstrap"
+ ],
+ "dependencies": {
+ "jquery": ">=1.7",
+ "datatables.net": ">=1.10.9"
+ },
+ "moduleType": [
+ "globals",
+ "amd",
+ "node"
+ ],
+ "ignore": [
+ "composer.json",
+ "datatables.json",
+ "package.json"
+ ],
+ "authors": [
+ {
+ "name": "SpryMedia Ltd",
+ "homepage": "https://datatables.net"
+ }
+ ],
+ "homepage": "https://datatables.net",
+ "license": "MIT",
+ "version": "2.1.1",
+ "_release": "2.1.1",
+ "_resolution": {
+ "type": "version",
+ "tag": "2.1.1",
+ "commit": "c9aedb3c531795574d69203688888a6c16e02265"
+ },
+ "_source": "https://github.com/DataTables/Dist-DataTables-Bootstrap.git",
+ "_target": "^2.1.1",
+ "_originalSource": "datatables.net-bs"
+}
\ No newline at end of file
diff --git a/public/bower_components/AdminLTE/plugins/datatables.net-bs/License.txt b/public/bower_components/AdminLTE/plugins/datatables.net-bs/License.txt
new file mode 100644
index 0000000..379a7e7
--- /dev/null
+++ b/public/bower_components/AdminLTE/plugins/datatables.net-bs/License.txt
@@ -0,0 +1,20 @@
+Copyright SpryMedia Limited and other contributors
+http://datatables.net
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
\ No newline at end of file
diff --git a/public/bower_components/AdminLTE/plugins/datatables.net-bs/Readme.md b/public/bower_components/AdminLTE/plugins/datatables.net-bs/Readme.md
new file mode 100644
index 0000000..54acee4
--- /dev/null
+++ b/public/bower_components/AdminLTE/plugins/datatables.net-bs/Readme.md
@@ -0,0 +1,50 @@
+# DataTables for jQuery with styling for [Bootstrap](http://getbootstrap.com/)
+
+This package contains distribution files required to style [DataTables library](https://datatables.net) for [jQuery](http://jquery.com/) with styling for [Bootstrap](http://getbootstrap.com/).
+
+DataTables is a table enhancing library which adds features such as paging, ordering, search, scrolling and many more to a static HTML page. A comprehensive API is also available that can be used to manipulate the table. Please refer to the [DataTables web-site](//datatables.net) for a full range of documentation and examples.
+
+
+## Installation
+
+### Browser
+
+For inclusion of this library using a standard `
+
+
+
+
+
@include('layout.navbar')
diff --git a/resources/views/designer/designer.blade.php b/resources/views/designer/designer.blade.php
index 2fac186..3ffffce 100644
--- a/resources/views/designer/designer.blade.php
+++ b/resources/views/designer/designer.blade.php
@@ -197,6 +197,15 @@
}
+
+
+
@@ -267,6 +276,14 @@
@endif
+
+ @if($template->Type == "Hoodie" && $template->Side == "Front" && $template->TemplateFormat == "svg")
+
+ @endif
+ @if($template->Type == "Hoodie" && $template->Side == "Back" && $template->TemplateFormat == "svg")
+
+ @endif
+
@@ -444,7 +461,8 @@
@else
Trim {{ $i }}
@endif
-
+
+
- Base Color
- Pattern
@@ -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);
- }
- });
- }
diff --git a/resources/views/layout/main.blade.php b/resources/views/layout/main.blade.php
index 036b045..cac54a4 100644
--- a/resources/views/layout/main.blade.php
+++ b/resources/views/layout/main.blade.php
@@ -64,6 +64,15 @@
text-transform: uppercase;
}
+
+
+
@@ -87,7 +96,6 @@
+
@@ -80,7 +90,6 @@