diff --git a/app/Http/Controllers/designer/DesignerController.php b/app/Http/Controllers/designer/DesignerController.php index d804228..f288f24 100644 --- a/app/Http/Controllers/designer/DesignerController.php +++ b/app/Http/Controllers/designer/DesignerController.php @@ -996,5 +996,102 @@ class DesignerController extends Controller { all(); + $trCount = $post['itemCount']; + $tempCode = $post['tempCode']; + + $newDesignerModel = new DesignerModel; + $jersey_sizes = $newDesignerModel->getAvailableSizes($tempCode, 'JERSEY'); + $shorts_sizes = $newDesignerModel->getAvailableSizes($tempCode, 'SHORTS'); + + ?> + + + + + + + + + + + + + + + + + + + + + all(); + $trCount = $post['itemCount']; + $tempCode = $post['tempCode']; + + $newDesignerModel = new DesignerModel; + $jersey_sizes = $newDesignerModel->getAvailableSizes($tempCode, 'JERSEY'); + $shorts_sizes = $newDesignerModel->getAvailableSizes($tempCode, 'SHORTS'); + + ?> + + + + + + + + + + + + + + + + + + + + + + + + + session()->get('cartkey'); + $paypal_model = new PayPalModel; + $last_id = $paypal_model->getLastIdPaymentDetails(); + $invoice_num = str_pad($last_id[0]->Id, 4,'0',STR_PAD_LEFT); + $cartKey = $request->session()->get('cartkey'); $items = $m->myCart($cartKey); $getSubtotal = $m->getSubtotal($cartKey); @@ -76,6 +82,8 @@ class PaypalController extends Controller { $order_subtotal = $getSubtotal[0]->Subtotal; $order_grandtotal = $getSubtotal[0]->Subtotal; + $tax = $order_grandtotal * 0.10; + $order_items = array(); foreach($items as $key => $item){ @@ -98,25 +106,30 @@ class PaypalController extends Controller { $order_items[$key]->setCurrency('USD'); $order_items[$key]->setQuantity($item->Quantity); // $order_items[$key]->setDescription($descriptions); + // $order_items[$key]->setTax(10); $order_items[$key]->setPrice($item->Price); + } - + $item_list = PayPal::ItemList(); $item_list->setItems($order_items); + $amount_details = PayPal::Details(); $amount_details->setSubtotal($order_subtotal); + $amount_details->setTax($tax); $amount = PayPal::Amount(); $amount->setCurrency('USD'); $amount->setDetails($amount_details); - $amount->setTotal($order_grandtotal); + $amount->setTotal($order_grandtotal + $tax); $transaction = PayPal::Transaction(); $transaction->setAmount($amount); $transaction->setItemList($item_list); - $transaction->setDescription('Your transaction description'); - $transaction->setInvoiceNumber(date('Y') . '-' . uniqid()); + + // $transaction->setDescription('Your transaction description'); + $transaction->setInvoiceNumber(date('Ymd') . '-' . $invoice_num); $redirectUrls = PayPal:: RedirectUrls(); $redirectUrls->setReturnUrl(route('getDone')); @@ -188,22 +201,48 @@ class PaypalController extends Controller { // } $obj = json_decode($executePayment); + + $line2 = null; + + //details $total = $obj->transactions[0]->amount->total; + $sub_total = $obj->transactions[0]->amount->details->subtotal; + $tax = $obj->transactions[0]->amount->details->tax; + $currency = $obj->transactions[0]->amount->currency; $invoice_number = $obj->transactions[0]->invoice_number; - // var_dump($obj->transactions[0]->amount); + //shipping address details + $recipient_name = $obj->transactions[0]->item_list->shipping_address->recipient_name; + $line1 = $obj->transactions[0]->item_list->shipping_address->line1; + if(isset($obj->transactions[0]->item_list->shipping_address->line2)){ + $line2 = $obj->transactions[0]->item_list->shipping_address->line2; + } + $city = $obj->transactions[0]->item_list->shipping_address->city; + $state = $obj->transactions[0]->item_list->shipping_address->state; + $postal_code = $obj->transactions[0]->item_list->shipping_address->postal_code; + $country_code = $obj->transactions[0]->item_list->shipping_address->country_code; + + // payer info + $payment_method = $obj->payer->payment_method; + $email = $obj->payer->payer_info->email; + $first_name = $obj->payer->payer_info->first_name; + $last_name = $obj->payer->payer_info->last_name; + $_payer_id = $obj->payer->payer_info->payer_id; + /// end paypal codes $paypal_model = new PayPalModel; $m = new TeamStoreModel; $cartKey = $request->session()->get('cartkey'); $userId = Auth::user()->id; + $user_email = Auth::user()->email; $items = $m->myCart($cartKey); // item from cart_tmp $getSubtotal = $m->getSubtotal($cartKey); $payment_details = array( + 'UserId' => $userId, 'CartKey' => $cartKey, 'PaymentId' => $id, @@ -211,39 +250,66 @@ class PaypalController extends Controller { 'PayerId' => $payer_id, 'InvoiceNumber' => $invoice_number, 'Currency' => $currency, - 'Total' => $total + 'Total' => $total, + 'SubTotal' => $sub_total, + 'Tax' => $tax, + 'Payer_Email' => $email, + 'Payer_Firstname' => $first_name, + 'Payer_Lastname' => $last_name, + 'PaymentMethod' =>$payment_method + ); - $i = $paypal_model->insertToPaypalDetails($payment_details); - - // var_dump($i); - - // foreach($items as $key => $val){ - // $orders[] = array( - // 'Order' => $val->Order, - // 'ProductId' => $val->ProductId, - // 'CartKey' => $val->CartKey, - // 'ProductURL' => $val->ProductURL, - // 'TeamName' => $val->TeamName, - // 'Name' => $val->Name, - // 'Number' => $val->Number, - // 'Size' => $val->Size, - // 'Price' => $val->Price, - // 'Quantity' => $val->Quantity, - // ); - // } + $p_id = $paypal_model->insertToPaypalDetails($payment_details); + + $shipping_address = array( + 'PaymentDetail_Id' => $p_id, + 'recipient_name' => $recipient_name, + 'line1' => $line1, + 'line2' => $line2, + 'city' => $city, + 'state' => $state, + 'postal_code' => $postal_code, + 'country_code' => $country_code, + ); + // iinsert shipping address + $paypal_model->insertShippingAddress($shipping_address); + + // insert order from cart_tmp to orders table + $l = $paypal_model->insertToOrders($cartKey); // insert to orders table + + //email sending + $newUserModel = new UserModel; + $order_item_array = $newUserModel->selectOrderItem($cartKey); + $item_goup_array = $newUserModel->itemGroup($cartKey); + $item_thumbs = $newUserModel->selectDisplayItemThumb(); + $array_payment_details = $newUserModel->selectPaymentDetails('CartKey', $cartKey); - var_dump($items); + $data = array( + 'order_item_array' => $order_item_array, + 'item_goup_array' => $item_goup_array, + 'img_thumb' => $item_thumbs, + 'array_payment_details' => $array_payment_details, + 'receiver' => $user_email, + 'subject' => 'Order Details', + ); + + Mail::send('emails.orders', $data, function($message) use ($data) { + + $message->from('no-reply@crewsportswear.com', 'CREW Sportswear'); + $message->cc('orders@crewsportswear.com', 'Orders From CREW Sportswear'); + $message->to($data['receiver'])->subject('Order Details'); - // $paypal_model->insertToOrders($items); // insert to orders table + }); + // end email sending + + $request->session()->forget('cartkey'); // clear session for cartkey - - // $request->session()->forget('cartkey'); // clear session for cartkey - - // return view('paypal.get_done') - // ->with('currency', $currency) - // ->with('total', $total); + // redirect to thank you page. + return view('paypal.get_done') + ->with('currency', $currency) + ->with('total', $total); } diff --git a/app/Http/Controllers/teamstore/TeamStoreController.php b/app/Http/Controllers/teamstore/TeamStoreController.php index 260b15a..cf695f8 100644 --- a/app/Http/Controllers/teamstore/TeamStoreController.php +++ b/app/Http/Controllers/teamstore/TeamStoreController.php @@ -293,6 +293,50 @@ class TeamStoreController extends Controller { 'Price' => $ProductPrice, 'Quantity' => $post['quantity'] ); + + + }elseif($product_form == "name-number-form"){ + + $order_names = $post['order_names']; + $order_number = $post['order_number']; + + foreach($order_names as $key => $val){ + $items[] = array( + 'ProductId' => $product_id, + 'StoreURL' => $store_url, + 'FormUsed' => $product_form, + 'CartKey' => $cartKey, + 'DesignCode' => $design_code, + 'ProductURL' => $ProductURL, + 'ProductName' => $product_name, + 'Name' => $order_names[$key], + 'Number' => $order_number[$key], + 'Price' => $ProductPrice, + 'Quantity' => 1 + ); + } + }elseif($product_form == "name-number-size-form"){ + + $order_names = $post['order_names']; + $order_number = $post['order_number']; + $order_size = $post['order_size']; + + foreach($order_names as $key => $val){ + $items[] = array( + 'ProductId' => $product_id, + 'StoreURL' => $store_url, + 'FormUsed' => $product_form, + 'CartKey' => $cartKey, + 'DesignCode' => $design_code, + 'ProductURL' => $ProductURL, + 'ProductName' => $product_name, + 'Name' => $order_names[$key], + 'Size' => $order_size[$key], + 'Number' => $order_number[$key], + 'Price' => $ProductPrice, + 'Quantity' => 1 + ); + } } @@ -320,12 +364,13 @@ class TeamStoreController extends Controller { $items = $m->myCart($cartKey); $getSubtotal = $m->getSubtotal($cartKey); - $items_group = $m->myCartGroup($cartKey); - - // var_dump($items_group); + $items_group = $m->myCartGroup($cartKey); + $item_thumbs = $m->selectDisplayCartThumb(); + return view('sublayouts.cart') ->with('item_group', $items_group) ->with('row', $items) + ->with('img_thumb', $item_thumbs) ->with('getSubtotal', $getSubtotal); } diff --git a/app/Http/Controllers/user/UserController.php b/app/Http/Controllers/user/UserController.php index 086a946..1463930 100644 --- a/app/Http/Controllers/user/UserController.php +++ b/app/Http/Controllers/user/UserController.php @@ -200,7 +200,7 @@ class UserController extends Controller { public function orders(){ $m = new UserModel; $userId = Auth::user()->id; - $array_payment_details = $m->selectPaymentDetails($userId); + $array_payment_details = $m->selectPaymentDetails('UserId', $userId); // var_dump($array_payment_details); @@ -438,5 +438,18 @@ class UserController extends Controller { )); } } + + public function orderDetails($ck){ + $newUserModel = new UserModel; + $order_item_array = $newUserModel->selectOrderItem($ck); + $item_goup_array = $newUserModel->itemGroup($ck); + $item_thumbs = $newUserModel->selectDisplayItemThumb(); + $array_payment_details = $newUserModel->selectPaymentDetails('CartKey', $ck); + return view('user-layouts.order_details') + ->with('array_payment_details', $array_payment_details) + ->with('img_thumb', $item_thumbs) + ->with('item_goup_array', $item_goup_array) + ->with('order_item_array', $order_item_array); + } } diff --git a/app/Http/routes.php b/app/Http/routes.php index 56907a0..16c2161 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -50,6 +50,9 @@ Route::get('/designer/edit/{designCode}', 'designer\DesignerController@editDesig // 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/save-roster', 'designer\DesignerController@saveRoster'); Route::group(['middleware' => ['auth']], function() { @@ -103,6 +106,7 @@ Route::group(['middleware' => 'normaluser'], function () { Route::get('user/profile/change-password', 'user\UserController@changePassword'); Route::post('user/profile/update-password', 'user\UserController@updatePassword'); Route::get('user/orders', 'user\UserController@orders'); + Route::get('user/orders/view/{ck}', 'user\UserController@orderDetails'); Route::get('user/my-designs', 'user\UserController@myDesigns'); Route::get('user/my-designs/view/{id}', 'user\UserController@viewDesign'); Route::post('user/my-designs/update', 'user\UserController@updateDesignDetails'); diff --git a/app/Models/paypal/PayPalModel.php b/app/Models/paypal/PayPalModel.php index 2f254d9..e0bb226 100644 --- a/app/Models/paypal/PayPalModel.php +++ b/app/Models/paypal/PayPalModel.php @@ -7,15 +7,37 @@ class PayPalModel extends Model { function insertToPaypalDetails($data){ - $i = DB::table('payment_details')->insert($data); + $i = DB::table('payment_details')->insertGetId($data); + return $i; + } + + + function insertToOrders($ck){ + + // $i = DB::table('orders')->insert($data); + $pdo = DB::connection()->getPdo(); + + $query = $pdo->prepare("INSERT INTO orders SELECT * FROM cart_tmp where CartKey = '$ck'"); + $i = $query->execute(); + return $i; } + function insertShippingAddress($data){ - function insertToOrders($data){ - - $i = DB::table('orders')->insert($data); + $i = DB::table('shipping_addresses')->insert($data); return $i; } + function getLastIdPaymentDetails(){ + + $i = DB::table('payment_details') + ->orderby('Id', 'DESC') + ->take(1) + ->get(); + // var_dump($i); + return $i; + } + + } diff --git a/app/Models/teamstore/TeamStoreModel.php b/app/Models/teamstore/TeamStoreModel.php index c25692e..90b899b 100644 --- a/app/Models/teamstore/TeamStoreModel.php +++ b/app/Models/teamstore/TeamStoreModel.php @@ -79,6 +79,14 @@ class TeamStoreModel extends Model { return $i; } + function selectDisplayCartThumb(){ + + $i = DB::table('teamstore_product_thumbnails') + ->where('ImageClass', 'active') + ->get(); + return $i; + } + function myCart($cartKey){ // echo $cartKey; if($cartKey != ""){ @@ -103,15 +111,9 @@ class TeamStoreModel extends Model { function myCartGroup($cartKey){ if($cartKey != ""){ $pdo = DB::connection()->getPdo(); - $query = $pdo->prepare("SELECT *, COUNT(Id) AS qty, SUM(Price) AS total_price FROM cart_tmp WHERE CartKey = :ck GROUP BY ProductId"); + $query = $pdo->prepare("SELECT *, COUNT(Id) AS qty, SUM(Price) AS total_price, SUM(Quantity) AS total_qty FROM cart_tmp WHERE CartKey = :ck GROUP BY ProductId"); $query->execute([':ck'=>$cartKey]); $row = $query->fetchAll(\PDO::FETCH_OBJ); - // $i = DB::table('cart_tmp')->() - // ->where('CartKey', $cartKey) - // ->groupby('ProductId') - // ->get(); - - // // var_dump($i); return $row; } } diff --git a/app/Models/user/UserModel.php b/app/Models/user/UserModel.php index 8d69561..b2281fb 100644 --- a/app/Models/user/UserModel.php +++ b/app/Models/user/UserModel.php @@ -65,9 +65,9 @@ class UserModel extends Model { return $i; } - function selectPaymentDetails($userid){ + function selectPaymentDetails($field, $val){ - $i = DB::table('payment_details')->where('UserId', $userid) + $i = DB::table('payment_details')->where($field, $val) ->get(); return $i; @@ -134,4 +134,28 @@ class UserModel extends Model { return $i; } + + function selectOrderItem($ck){ + $i = DB::table('orders') + ->where('CartKey', $ck) + ->get(); + return $i; + } + + function itemGroup($cartKey){ + $pdo = DB::connection()->getPdo(); + $query = $pdo->prepare("SELECT *, COUNT(Id) AS qty, SUM(Price) AS total_price, SUM(Quantity) AS total_qty FROM orders WHERE CartKey = :ck GROUP BY ProductId"); + $query->execute([':ck'=>$cartKey]); + $row = $query->fetchAll(\PDO::FETCH_OBJ); + return $row; + + } + + function selectDisplayItemThumb(){ + + $i = DB::table('teamstore_product_thumbnails') + ->where('ImageClass', 'active') + ->get(); + return $i; + } } diff --git a/public/images/cliparts/1-5c8a38a52e116.svg b/public/images/cliparts/1-5c8a38a52e116.svg new file mode 100644 index 0000000..e944499 --- /dev/null +++ b/public/images/cliparts/1-5c8a38a52e116.svg @@ -0,0 +1,13 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + + + diff --git a/public/images/cliparts/10-5c8a40782b51b.svg b/public/images/cliparts/10-5c8a40782b51b.svg new file mode 100644 index 0000000..324d499 --- /dev/null +++ b/public/images/cliparts/10-5c8a40782b51b.svg @@ -0,0 +1,12 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + + diff --git a/public/images/cliparts/11-5c8a40bfc431d.svg b/public/images/cliparts/11-5c8a40bfc431d.svg new file mode 100644 index 0000000..9646ed6 --- /dev/null +++ b/public/images/cliparts/11-5c8a40bfc431d.svg @@ -0,0 +1,15 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + + + + + diff --git a/public/images/cliparts/12-5c8a4167db731.svg b/public/images/cliparts/12-5c8a4167db731.svg new file mode 100644 index 0000000..f0f8d12 --- /dev/null +++ b/public/images/cliparts/12-5c8a4167db731.svg @@ -0,0 +1,12 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + + diff --git a/public/images/cliparts/13-5c8a41a7beb12.svg b/public/images/cliparts/13-5c8a41a7beb12.svg new file mode 100644 index 0000000..548a946 --- /dev/null +++ b/public/images/cliparts/13-5c8a41a7beb12.svg @@ -0,0 +1,11 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + diff --git a/public/images/cliparts/14-5c8a41c04c119.svg b/public/images/cliparts/14-5c8a41c04c119.svg new file mode 100644 index 0000000..1386775 --- /dev/null +++ b/public/images/cliparts/14-5c8a41c04c119.svg @@ -0,0 +1,12 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + + diff --git a/public/images/cliparts/15-5c8a41f36fa9e.svg b/public/images/cliparts/15-5c8a41f36fa9e.svg new file mode 100644 index 0000000..565a268 --- /dev/null +++ b/public/images/cliparts/15-5c8a41f36fa9e.svg @@ -0,0 +1,12 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + + diff --git a/public/images/cliparts/16-5c8a4215bd198.svg b/public/images/cliparts/16-5c8a4215bd198.svg new file mode 100644 index 0000000..ab68987 --- /dev/null +++ b/public/images/cliparts/16-5c8a4215bd198.svg @@ -0,0 +1,12 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + + diff --git a/public/images/cliparts/17-5c8a4248c495d.svg b/public/images/cliparts/17-5c8a4248c495d.svg new file mode 100644 index 0000000..90cb9b8 --- /dev/null +++ b/public/images/cliparts/17-5c8a4248c495d.svg @@ -0,0 +1,11 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + diff --git a/public/images/cliparts/2-5c8a39b47a79f.svg b/public/images/cliparts/2-5c8a39b47a79f.svg new file mode 100644 index 0000000..221b66c --- /dev/null +++ b/public/images/cliparts/2-5c8a39b47a79f.svg @@ -0,0 +1,12 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + + diff --git a/public/images/cliparts/3-5c8a3b34f37f1.svg b/public/images/cliparts/3-5c8a3b34f37f1.svg new file mode 100644 index 0000000..d6ea068 --- /dev/null +++ b/public/images/cliparts/3-5c8a3b34f37f1.svg @@ -0,0 +1,11 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + diff --git a/public/images/cliparts/4-5c8a3b994a538.svg b/public/images/cliparts/4-5c8a3b994a538.svg new file mode 100644 index 0000000..832aed4 --- /dev/null +++ b/public/images/cliparts/4-5c8a3b994a538.svg @@ -0,0 +1,11 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + diff --git a/public/images/cliparts/5-5c8a3bc631a9c.svg b/public/images/cliparts/5-5c8a3bc631a9c.svg new file mode 100644 index 0000000..9c8ebfb --- /dev/null +++ b/public/images/cliparts/5-5c8a3bc631a9c.svg @@ -0,0 +1,11 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + diff --git a/public/images/cliparts/6-5c8a3c2ee9978.svg b/public/images/cliparts/6-5c8a3c2ee9978.svg new file mode 100644 index 0000000..20754a7 --- /dev/null +++ b/public/images/cliparts/6-5c8a3c2ee9978.svg @@ -0,0 +1,12 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + + diff --git a/public/images/cliparts/7-5c8a3ca74ea7d.svg b/public/images/cliparts/7-5c8a3ca74ea7d.svg new file mode 100644 index 0000000..edfc2c5 --- /dev/null +++ b/public/images/cliparts/7-5c8a3ca74ea7d.svg @@ -0,0 +1,11 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + diff --git a/public/images/cliparts/8-5c8a3cd9d61a1.svg b/public/images/cliparts/8-5c8a3cd9d61a1.svg new file mode 100644 index 0000000..a0b112b --- /dev/null +++ b/public/images/cliparts/8-5c8a3cd9d61a1.svg @@ -0,0 +1,12 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + + diff --git a/public/images/cliparts/9-5c8a3e9bd86d8.svg b/public/images/cliparts/9-5c8a3e9bd86d8.svg new file mode 100644 index 0000000..491fdaf --- /dev/null +++ b/public/images/cliparts/9-5c8a3e9bd86d8.svg @@ -0,0 +1,11 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + diff --git a/public/images/cliparts/hersey-logo1-01-5c81181a7e7b8.svg b/public/images/cliparts/hersey-logo1-01-5c81181a7e7b8.svg new file mode 100644 index 0000000..006ef84 --- /dev/null +++ b/public/images/cliparts/hersey-logo1-01-5c81181a7e7b8.svg @@ -0,0 +1,12 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + + diff --git a/public/images/cliparts/hersey-logo2-01-5c81182035793.svg b/public/images/cliparts/hersey-logo2-01-5c81182035793.svg new file mode 100644 index 0000000..c87dcf0 --- /dev/null +++ b/public/images/cliparts/hersey-logo2-01-5c81182035793.svg @@ -0,0 +1,12 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + + diff --git a/public/images/cliparts/hersey-logo3-01-5c811828bed19.svg b/public/images/cliparts/hersey-logo3-01-5c811828bed19.svg new file mode 100644 index 0000000..895d145 --- /dev/null +++ b/public/images/cliparts/hersey-logo3-01-5c811828bed19.svg @@ -0,0 +1,11 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + diff --git a/public/images/cliparts/hersey-logo4-01-5c839d097f904.svg b/public/images/cliparts/hersey-logo4-01-5c839d097f904.svg new file mode 100644 index 0000000..c1b2b1e --- /dev/null +++ b/public/images/cliparts/hersey-logo4-01-5c839d097f904.svg @@ -0,0 +1,12 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + + diff --git a/public/images/cliparts/hersey-logo5-01-5c839d13f2411.svg b/public/images/cliparts/hersey-logo5-01-5c839d13f2411.svg new file mode 100644 index 0000000..a24f6e4 --- /dev/null +++ b/public/images/cliparts/hersey-logo5-01-5c839d13f2411.svg @@ -0,0 +1,11 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + diff --git a/public/images/cliparts/hersey-logo6-01-5c839d1d9ce8a.svg b/public/images/cliparts/hersey-logo6-01-5c839d1d9ce8a.svg new file mode 100644 index 0000000..e8cfad3 --- /dev/null +++ b/public/images/cliparts/hersey-logo6-01-5c839d1d9ce8a.svg @@ -0,0 +1,14 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + + + + diff --git a/public/images/cliparts/hersey-logo7-01-5c839d38d7a9f.svg b/public/images/cliparts/hersey-logo7-01-5c839d38d7a9f.svg new file mode 100644 index 0000000..ad957cb --- /dev/null +++ b/public/images/cliparts/hersey-logo7-01-5c839d38d7a9f.svg @@ -0,0 +1,11 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + + diff --git a/public/images/cliparts/hersey-logo8-01-5c839d410aca2.svg b/public/images/cliparts/hersey-logo8-01-5c839d410aca2.svg new file mode 100644 index 0000000..8231329 --- /dev/null +++ b/public/images/cliparts/hersey-logo8-01-5c839d410aca2.svg @@ -0,0 +1,10 @@ + + + +Created with Fabric.js 1.7.15 + + + + + + diff --git a/public/images/teamstore/agb/banner.png b/public/images/teamstore/agb/banner.png new file mode 100644 index 0000000..9e4ec22 Binary files /dev/null and b/public/images/teamstore/agb/banner.png differ diff --git a/public/images/teamstore/agb/logo.png b/public/images/teamstore/agb/logo.png new file mode 100644 index 0000000..82333df Binary files /dev/null and b/public/images/teamstore/agb/logo.png differ diff --git a/public/images/teamstore/batasole/banner.png b/public/images/teamstore/batasole/banner.png new file mode 100644 index 0000000..9a6ae58 Binary files /dev/null and b/public/images/teamstore/batasole/banner.png differ diff --git a/public/images/teamstore/batasole/logo.png b/public/images/teamstore/batasole/logo.png new file mode 100644 index 0000000..fb9d5ab Binary files /dev/null and b/public/images/teamstore/batasole/logo.png differ diff --git a/public/images/teamstore/centurions/banner.png b/public/images/teamstore/centurions/banner.png new file mode 100644 index 0000000..de6ad5d Binary files /dev/null and b/public/images/teamstore/centurions/banner.png differ diff --git a/public/images/teamstore/centurions/logo.png b/public/images/teamstore/centurions/logo.png new file mode 100644 index 0000000..62a99a1 Binary files /dev/null and b/public/images/teamstore/centurions/logo.png differ diff --git a/public/images/teamstore/ice/banner.png b/public/images/teamstore/ice/banner.png new file mode 100644 index 0000000..678665d Binary files /dev/null and b/public/images/teamstore/ice/banner.png differ diff --git a/public/images/teamstore/ice/logo.old.png b/public/images/teamstore/ice/logo.old.png new file mode 100644 index 0000000..f43702d Binary files /dev/null and b/public/images/teamstore/ice/logo.old.png differ diff --git a/public/images/teamstore/ice/logo.png b/public/images/teamstore/ice/logo.png new file mode 100644 index 0000000..530f984 Binary files /dev/null and b/public/images/teamstore/ice/logo.png differ diff --git a/public/images/teamstore/limitless/banner.png b/public/images/teamstore/limitless/banner.png new file mode 100644 index 0000000..9b13efb Binary files /dev/null and b/public/images/teamstore/limitless/banner.png differ diff --git a/public/images/teamstore/limitless/logo.png b/public/images/teamstore/limitless/logo.png new file mode 100644 index 0000000..5c078fd Binary files /dev/null and b/public/images/teamstore/limitless/logo.png differ diff --git a/public/images/teamstore/tdba/banner.png b/public/images/teamstore/tdba/banner.png new file mode 100644 index 0000000..93093c3 Binary files /dev/null and b/public/images/teamstore/tdba/banner.png differ diff --git a/public/images/teamstore/tdba/logo.png b/public/images/teamstore/tdba/logo.png new file mode 100644 index 0000000..3539f41 Binary files /dev/null and b/public/images/teamstore/tdba/logo.png differ diff --git a/public/images/teamstore/wcb/banner.png b/public/images/teamstore/wcb/banner.png new file mode 100644 index 0000000..cc70434 Binary files /dev/null and b/public/images/teamstore/wcb/banner.png differ diff --git a/public/images/teamstore/wcb/logo.png b/public/images/teamstore/wcb/logo.png new file mode 100644 index 0000000..3ec538a Binary files /dev/null and b/public/images/teamstore/wcb/logo.png differ diff --git a/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/L.svg b/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/L.svg new file mode 100644 index 0000000..99bc632 --- /dev/null +++ b/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/L.svg @@ -0,0 +1,435 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/M.svg b/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/M.svg new file mode 100644 index 0000000..913ff75 --- /dev/null +++ b/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/M.svg @@ -0,0 +1,504 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/S.svg b/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/S.svg new file mode 100644 index 0000000..55c9c2a --- /dev/null +++ b/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/S.svg @@ -0,0 +1,493 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/XL.svg b/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/XL.svg new file mode 100644 index 0000000..064036b --- /dev/null +++ b/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/XL.svg @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/YL.svg b/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/YL.svg new file mode 100644 index 0000000..5912e27 --- /dev/null +++ b/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/YL.svg @@ -0,0 +1,361 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/YM.svg b/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/YM.svg new file mode 100644 index 0000000..be56bd7 --- /dev/null +++ b/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/YM.svg @@ -0,0 +1,431 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/YS.svg b/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/YS.svg new file mode 100644 index 0000000..1f0071e --- /dev/null +++ b/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/YS.svg @@ -0,0 +1,500 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/YXL.svg b/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/YXL.svg new file mode 100644 index 0000000..7bd1707 --- /dev/null +++ b/public/images/uniform-templates/TEMP-00040/JERSEY/SIZES/YXL.svg @@ -0,0 +1,456 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/views/emails/orders.blade.php b/resources/views/emails/orders.blade.php new file mode 100644 index 0000000..2953e60 --- /dev/null +++ b/resources/views/emails/orders.blade.php @@ -0,0 +1,520 @@ + + + + + + Order Details + + + + + + + + + + + + diff --git a/resources/views/sublayouts/cart.blade.php b/resources/views/sublayouts/cart.blade.php index c32e0b8..64d9db2 100644 --- a/resources/views/sublayouts/cart.blade.php +++ b/resources/views/sublayouts/cart.blade.php @@ -63,12 +63,17 @@
- + @foreach($img_thumb as $img) + @if($img->ProductId == $item->ProductId) + + @endif + @endforeach +

{{ $item->ProductName }}

-

Total Price: ${{ $item->total_price }} • Row(s): {{ $item->qty }}

+

Total Price: ${{ $item->total_price * $item->total_qty }} • Row(s): {{ $item->qty }}

@@ -97,6 +102,26 @@ + + @elseif($item->FormUsed=="name-number-form") + + + + + + + + + @elseif($item->FormUsed=="name-number-size-form") + + + + + + + + + @else @endif @@ -128,7 +153,23 @@ - + @elseif($item->FormUsed=="name-number-form") + + + + + + + + @elseif($item->FormUsed=="name-number-size-form") + + + + + + + + @else @endif diff --git a/resources/views/teamstore-layout/main.blade.php b/resources/views/teamstore-layout/main.blade.php index 18a0de6..e353ba3 100644 --- a/resources/views/teamstore-layout/main.blade.php +++ b/resources/views/teamstore-layout/main.blade.php @@ -112,6 +112,14 @@ } }); + $('#myCarousel').on('slid.bs.carousel', function (e) { + var id = $('.item.active').data('slide-number'); + // $('#carousel-text').html($('#slide-content-'+id).html()); + // console.log(id) + $('.a_thumbnail').removeClass('active'); + $('#carousel-selector-'+id).addClass('active'); + }); + $('.input-number').focusin(function(){ $(this).data('oldValue', $(this).val()); }); @@ -227,20 +235,28 @@ $(this).val($(this).val().toUpperCase()); }); - $('.image-thumbnails').click(function(){ - // console.log($(this)) - // console.log($(this).attr('src')) - $('#main-thumbnail').attr('src', $(this).attr('src')); + // $('.image-thumbnails').click(function(){ + // // console.log($(this)) + // // console.log($(this).attr('src')) + // $('#main-thumbnail').attr('src', $(this).attr('src')); + // $('.a_thumbnail').removeClass('active'); + // $(this).parent().addClass('active'); + // }); + + $('[id^=carousel-selector-]').click( function(){ + var id = this.id.substr(this.id.lastIndexOf("-") + 1); + var id = parseInt(id); + $('#myCarousel').carousel(id); $('.a_thumbnail').removeClass('active'); - $(this).parent().addClass('active'); + $(this).addClass('active'); }); $(document).on('button click', '.removeRow', function(){ - var str = $(this).closest('tr').attr('class'); - var trCount = $('#tableRow tbody').children('tr').length; - - if(trCount == 2){ + var str = $(this).closest('tr').attr('class'); + var trCount = $('#tableRow tbody').children('tr').length; + + if(trCount == 2){ return false; } @@ -250,6 +266,40 @@ } $('.'+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(''); + } + $('.'+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(''); + } + $('.'+str).remove(); + }); + + + $("#frm-order-list").validate({ @@ -352,6 +402,88 @@ }); }); + + $(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(''); + $('#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(''); + $('#addnew-btn-tbl-row').remove(); + $('#tableRow tbody').append(response); + $('#orderListPanel').scrollTop($('#orderListPanel')[0].scrollHeight); + $('.inputName').keyup(function() { + this.value = this.value.toLocaleUpperCase(); + }); + } + }); + + }); + }); //end document ready function myCart(){ diff --git a/resources/views/teamstore-sublayouts/forms/jersey-and-shorts-form.blade.php b/resources/views/teamstore-sublayouts/forms/jersey-and-shorts-form.blade.php index cc8efda..7674e40 100644 --- a/resources/views/teamstore-sublayouts/forms/jersey-and-shorts-form.blade.php +++ b/resources/views/teamstore-sublayouts/forms/jersey-and-shorts-form.blade.php @@ -10,7 +10,7 @@
-

{{ $product_array[0]->ProductName }}

+

{{ $product_array[0]->ProductName }}

$ {{ $product_array[0]->ProductPrice }}

diff --git a/resources/views/teamstore-sublayouts/forms/name-number-form.blade.php b/resources/views/teamstore-sublayouts/forms/name-number-form.blade.php new file mode 100644 index 0000000..c828fde --- /dev/null +++ b/resources/views/teamstore-sublayouts/forms/name-number-form.blade.php @@ -0,0 +1,90 @@ + +
+
+ +

{{ $product_array[0]->ProductName }}

$ {{ $product_array[0]->ProductPrice }}

+
+
+
+
+
+ + + + + + + + +
+
NameNumberPriceQuantity
NameNumberSizePriceQuantity
{{ $sub_item->Quantity }}
{{ $sub_item->Name }}{{ $sub_item->Number }}{{ $sub_item->Price }}{{ $sub_item->Quantity }}
{{ $sub_item->Name }}{{ $sub_item->Number }}{{ $sub_item->Size }}{{ $sub_item->Price }}{{ $sub_item->Quantity }}
+ + + + + + + + + + + + + + + + +
NameNumber
+ + + + + + + + +
+
+ +
+
+ + +
+
+
+
+
+ + +
+
+
+
+

+ {{ $product_array[0]->ProductDescription }} +

+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/resources/views/teamstore-sublayouts/forms/name-number-size-form.blade.php b/resources/views/teamstore-sublayouts/forms/name-number-size-form.blade.php new file mode 100644 index 0000000..d0726b4 --- /dev/null +++ b/resources/views/teamstore-sublayouts/forms/name-number-size-form.blade.php @@ -0,0 +1,99 @@ + +
+
+ +

{{ $product_array[0]->ProductName }}

$ {{ $product_array[0]->ProductPrice }}

+
+
+
+
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
NameNumberSize
+ + + + + + + + + + +
+
+ +
+
+ +
+
+
+
+
+
+ + +
+
+
+
+

+ {{ $product_array[0]->ProductDescription }} +

+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/resources/views/teamstore-sublayouts/forms/quantity-form.blade.php b/resources/views/teamstore-sublayouts/forms/quantity-form.blade.php index a891fc9..927a49e 100644 --- a/resources/views/teamstore-sublayouts/forms/quantity-form.blade.php +++ b/resources/views/teamstore-sublayouts/forms/quantity-form.blade.php @@ -10,7 +10,7 @@
-

{{ $product_array[0]->ProductName }}

+

{{ $product_array[0]->ProductName }}

$ {{ $product_array[0]->ProductPrice }}

diff --git a/resources/views/teamstore-sublayouts/forms/tshirt-form.blade.php b/resources/views/teamstore-sublayouts/forms/tshirt-form.blade.php index c228646..499e0fd 100644 --- a/resources/views/teamstore-sublayouts/forms/tshirt-form.blade.php +++ b/resources/views/teamstore-sublayouts/forms/tshirt-form.blade.php @@ -10,7 +10,7 @@
-

{{ $product_array[0]->ProductName }}

+

{{ $product_array[0]->ProductName }}

$ {{ $product_array[0]->ProductPrice }}

diff --git a/resources/views/teamstore-sublayouts/index.blade.php b/resources/views/teamstore-sublayouts/index.blade.php index f260834..66535da 100644 --- a/resources/views/teamstore-sublayouts/index.blade.php +++ b/resources/views/teamstore-sublayouts/index.blade.php @@ -81,6 +81,9 @@ padding-bottom: 20px; background-image: url("{{asset('public/images/teamstore') . '/' . $store_array[0]->StoreUrl . '/' . $store_array[0]->StoreBanner }}"); background-color: #f3f3f3; + background-position: center; + background-size: cover; + width: 100%; height: 128px; } @@ -91,6 +94,22 @@ padding: 10px; } + + @media (min-width: 200px) { + .jumbotron { height: 50px; } + } + + @media (min-width: 400px) { + .jumbotron { height: 57px; } + } + + @media (min-width: 768px) { + .jumbotron { height: 100px; } + } + + @media (min-width: 992px) { + .jumbotron { height: 128px; } + }
@@ -105,7 +124,7 @@
-

FEATURED PRODUCT

+

FEATURED PRODUCTS

@@ -122,8 +141,10 @@
- {{ $product->ProductName }} -

{{ $product->ProductName }}

+ + {{ $product->ProductName }} + +

{{ $product->ProductName }}

+ + +

    + @define $j = 0 @foreach($thumbnails_array as $thumbnail)
  • - +
  • + @define $j++ @endforeach
diff --git a/resources/views/teamstore-sublayouts/stores.blade.php b/resources/views/teamstore-sublayouts/stores.blade.php index ab9dbcd..c40999d 100644 --- a/resources/views/teamstore-sublayouts/stores.blade.php +++ b/resources/views/teamstore-sublayouts/stores.blade.php @@ -3,21 +3,33 @@
@@ -25,16 +37,16 @@
-
-