added invidual purchase
This commit is contained in:
@@ -611,6 +611,7 @@ class PaypalController extends Controller
|
||||
//throw $th;
|
||||
// echo $e->getCode();
|
||||
echo $e->getData();
|
||||
// var_dump($e->getData());
|
||||
Session::put('cartkeyError', 'Invalid payment.');
|
||||
return Redirect::route('cart');
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php namespace App\Http\Controllers\user;
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\user;
|
||||
|
||||
use App\Http\Requests;
|
||||
use App\Http\Controllers\Controller;
|
||||
@@ -14,9 +16,11 @@ use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
|
||||
class UserController extends Controller {
|
||||
class UserController extends Controller
|
||||
{
|
||||
|
||||
public function index(){
|
||||
public function index()
|
||||
{
|
||||
$m = new UserModel;
|
||||
$userRole = Auth::user()->role;
|
||||
|
||||
@@ -47,10 +51,10 @@ class UserController extends Controller {
|
||||
|
||||
// $post_data = json_encode($post_data, JSON_FORCE_OBJECT);
|
||||
return view('user-layouts.index')->with('data', $post_data);
|
||||
|
||||
}
|
||||
|
||||
public function addressBook(){
|
||||
public function addressBook()
|
||||
{
|
||||
$m = new UserModel;
|
||||
$userId = Auth::user()->id;
|
||||
|
||||
@@ -58,16 +62,16 @@ class UserController extends Controller {
|
||||
|
||||
return view('user-layouts.address_book')
|
||||
->with('array_address_book', $array_address_book);
|
||||
|
||||
}
|
||||
|
||||
public function createAddressBook(){
|
||||
public function createAddressBook()
|
||||
{
|
||||
|
||||
return view('user-layouts.create_address_book');
|
||||
|
||||
}
|
||||
|
||||
public function saveAddressBook(Request $request){
|
||||
public function saveAddressBook(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
$m = new UserModel;
|
||||
|
||||
@@ -88,10 +92,10 @@ class UserController extends Controller {
|
||||
);
|
||||
|
||||
echo $i = $m->insertAddressBook($data);
|
||||
|
||||
}
|
||||
|
||||
public function editAddressBook($id){
|
||||
public function editAddressBook($id)
|
||||
{
|
||||
$m = new UserModel;
|
||||
$userId = Auth::user()->id;
|
||||
|
||||
@@ -103,10 +107,10 @@ class UserController extends Controller {
|
||||
|
||||
return view('user-layouts.edit_address_book')
|
||||
->with('array_address_book', $array_address_book);
|
||||
|
||||
}
|
||||
|
||||
public function updateAddressBook(Request $request){
|
||||
public function updateAddressBook(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
$m = new UserModel;
|
||||
|
||||
@@ -128,10 +132,10 @@ class UserController extends Controller {
|
||||
);
|
||||
|
||||
echo $i = $m->saveUpdateAddressBook($data, $id);
|
||||
|
||||
}
|
||||
|
||||
public function profile(){
|
||||
public function profile()
|
||||
{
|
||||
$m = new UserModel;
|
||||
$userId = Auth::user()->id;
|
||||
|
||||
@@ -140,17 +144,18 @@ class UserController extends Controller {
|
||||
->with('array_profile_info', $array_profile_info);
|
||||
}
|
||||
|
||||
public function editProfile(){
|
||||
public function editProfile()
|
||||
{
|
||||
$m = new UserModel;
|
||||
$userId = Auth::user()->id;
|
||||
|
||||
$array_profile_info = $m->selectProfileInfo($userId);
|
||||
return view('user-layouts.edit_profile')
|
||||
->with('array_profile_info', $array_profile_info);
|
||||
|
||||
}
|
||||
|
||||
public function updateProfile(Request $request){
|
||||
public function updateProfile(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
$m = new UserModel;
|
||||
|
||||
@@ -176,11 +181,13 @@ class UserController extends Controller {
|
||||
return $i;
|
||||
}
|
||||
|
||||
public function changePassword(){
|
||||
public function changePassword()
|
||||
{
|
||||
return view('user-layouts.change_password');
|
||||
}
|
||||
|
||||
public function updatePassword(Request $request){
|
||||
public function updatePassword(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
$m = new UserModel;
|
||||
$c_password = Auth::user()->password;
|
||||
@@ -209,7 +216,8 @@ class UserController extends Controller {
|
||||
return $i;
|
||||
}
|
||||
|
||||
public function orders(){
|
||||
public function orders()
|
||||
{
|
||||
$m = new UserModel;
|
||||
$userId = Auth::user()->id;
|
||||
$array_payment_details = $m->selectPaymentDetails('UserId', $userId);
|
||||
@@ -221,7 +229,8 @@ class UserController extends Controller {
|
||||
}
|
||||
|
||||
|
||||
public function myDesigns(){
|
||||
public function myDesigns()
|
||||
{
|
||||
$m = new UserModel;
|
||||
$userId = Auth::user()->id;
|
||||
|
||||
@@ -230,7 +239,8 @@ class UserController extends Controller {
|
||||
return view('user-layouts.my-design')->with('array_client_designs', $array_client_designs);
|
||||
}
|
||||
|
||||
public function viewDesign($designCode){
|
||||
public function viewDesign($designCode)
|
||||
{
|
||||
$m = new UserModel;
|
||||
$newMainModel = new MainModel;
|
||||
$userId = Auth::user()->id;
|
||||
@@ -250,7 +260,8 @@ class UserController extends Controller {
|
||||
->with('array_cat_name', $array_cat_name);
|
||||
}
|
||||
|
||||
public function updateDesignDetails(Request $request){
|
||||
public function updateDesignDetails(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
$m = new UserModel;
|
||||
|
||||
@@ -264,10 +275,10 @@ class UserController extends Controller {
|
||||
$i = $m->updateClientDesign($client_design_data, $design_code);
|
||||
|
||||
return $i;
|
||||
|
||||
}
|
||||
|
||||
public function store(){
|
||||
public function store()
|
||||
{
|
||||
$m = new UserModel;
|
||||
$userRole = Auth::user()->role;
|
||||
$array_store_info = array();
|
||||
@@ -278,13 +289,11 @@ class UserController extends Controller {
|
||||
$array_store_info = $m->selectStoreInfo($storeId);
|
||||
|
||||
return redirect('store/' . $array_store_info[0]->StoreUrl);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function storeItems(){
|
||||
public function storeItems()
|
||||
{
|
||||
$thumbnails = array();
|
||||
$newUserModel = new UserModel;
|
||||
$newTeamStoreModel = new TeamStoreModel;
|
||||
@@ -318,7 +327,6 @@ class UserController extends Controller {
|
||||
'product_id' => $pr_arr->Id,
|
||||
'thumb' => $displayThumbnails
|
||||
);
|
||||
|
||||
} else {
|
||||
$thumbnails[] = array(
|
||||
'folder' => $store_array[0]->ImageFolder,
|
||||
@@ -326,7 +334,6 @@ class UserController extends Controller {
|
||||
'thumb' => "product-image-placeholder.png"
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return view('user-layouts.store_items')->with('store_array', $store_array)
|
||||
@@ -334,7 +341,8 @@ class UserController extends Controller {
|
||||
->with('thumbnails', $thumbnails);
|
||||
}
|
||||
|
||||
public function viewStoreItem($url){
|
||||
public function viewStoreItem($url)
|
||||
{
|
||||
$product_array = array();
|
||||
$newUserModel = new UserModel;
|
||||
$newTeamStoreModel = new TeamStoreModel;
|
||||
@@ -348,12 +356,11 @@ class UserController extends Controller {
|
||||
->with('available_size', $available_size)
|
||||
->with('thumbnails_array', $thumbnails_array)
|
||||
->with('shipping_cost', $shipping_cost);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function storeItemUpdate(Request $request){
|
||||
public function storeItemUpdate(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
$newTeamStoreModel = new TeamStoreModel;
|
||||
|
||||
@@ -405,11 +412,11 @@ class UserController extends Controller {
|
||||
}
|
||||
|
||||
return redirect('user/profile');
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function resendVericationCode(Request $request){
|
||||
public function resendVericationCode(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
$random_hash = rand(1000, 9999);
|
||||
|
||||
@@ -425,13 +432,11 @@ class UserController extends Controller {
|
||||
|
||||
$message->from('no-reply@crewsportswear.com', 'CREW Sportswear');
|
||||
$message->to($emailDetails['receiver'])->subject('CREW Sportswear Email Verification Code');
|
||||
|
||||
});
|
||||
|
||||
if (count(Mail::failures()) > 0) {
|
||||
|
||||
echo '0';
|
||||
|
||||
} else {
|
||||
$data = array(
|
||||
'EmailAddress' => $post['email'],
|
||||
@@ -444,7 +449,8 @@ class UserController extends Controller {
|
||||
}
|
||||
|
||||
|
||||
public function verifyCode(Request $request){
|
||||
public function verifyCode(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
|
||||
$verification_code = $post['verification_code'];
|
||||
@@ -473,7 +479,6 @@ class UserController extends Controller {
|
||||
'success' => true,
|
||||
'message' => 'Your email is successfully verified.'
|
||||
));
|
||||
|
||||
} else {
|
||||
return response()->json(array(
|
||||
'success' => false,
|
||||
@@ -482,7 +487,8 @@ class UserController extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
public function orderDetails($ck){
|
||||
public function orderDetails($ck)
|
||||
{
|
||||
$newUserModel = new UserModel;
|
||||
$order_item_array = $newUserModel->selectOrderItem($ck);
|
||||
$item_goup_array = $newUserModel->itemGroup($ck);
|
||||
@@ -495,7 +501,8 @@ class UserController extends Controller {
|
||||
->with('order_item_array', $order_item_array);
|
||||
}
|
||||
|
||||
public function sellDesign($designCode){
|
||||
public function sellDesign($designCode)
|
||||
{
|
||||
$m = new UserModel;
|
||||
$newMainModel = new MainModel;
|
||||
$newTeamStoreModel = new TeamStoreModel;
|
||||
@@ -520,7 +527,8 @@ class UserController extends Controller {
|
||||
->with('array_cat_name', $array_cat_name);
|
||||
}
|
||||
|
||||
public function buyDesign($designCode){
|
||||
public function buyDesign($designCode)
|
||||
{
|
||||
$m = new UserModel;
|
||||
$newMainModel = new MainModel;
|
||||
$newTeamStoreModel = new TeamStoreModel;
|
||||
@@ -543,11 +551,11 @@ class UserController extends Controller {
|
||||
->with('array_template_paths', $array_template_paths)
|
||||
// ->with('store_array', $store_array)
|
||||
->with('array_cat_name', $array_cat_name);
|
||||
|
||||
}
|
||||
|
||||
//save item from my design //
|
||||
public function saveNewStoreItem(Request $request){
|
||||
public function saveNewStoreItem(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
$UserModel = new UserModel;
|
||||
$newTeamStoreModel = new TeamStoreModel;
|
||||
@@ -570,16 +578,18 @@ class UserController extends Controller {
|
||||
'ProductURL' => $itemUrl
|
||||
);
|
||||
|
||||
$validator = Validator::make($check_product_url, [
|
||||
$validator = Validator::make(
|
||||
$check_product_url,
|
||||
[
|
||||
'ProductURL' => 'unique:teamstore_products'
|
||||
],
|
||||
[
|
||||
'ProductURL.unique' => 'The Item URL has already been taken.',
|
||||
]);
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
if ($validator->fails())
|
||||
{
|
||||
if ($validator->fails()) {
|
||||
$errors = "";
|
||||
// var_dump(($validator->errors()->all()));
|
||||
foreach ($validator->errors()->all() as $error) {
|
||||
@@ -633,8 +643,6 @@ class UserController extends Controller {
|
||||
);
|
||||
|
||||
$UserModel->insertNewProductThumbnails($thumbs);
|
||||
|
||||
|
||||
}
|
||||
|
||||
$prod_code = array('ProductCode' => $getYear . '-' . str_pad($id, 10, '0', STR_PAD_LEFT));
|
||||
@@ -643,10 +651,10 @@ class UserController extends Controller {
|
||||
return response()->json(array(
|
||||
'success' => true
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
function addStoreItem(){
|
||||
function addStoreItem()
|
||||
{
|
||||
$newTeamStoreModel = new TeamStoreModel;
|
||||
|
||||
$user_role = Auth::user()->role;
|
||||
@@ -657,7 +665,8 @@ class UserController extends Controller {
|
||||
}
|
||||
|
||||
//manually uploading item
|
||||
function saveNewItem(Request $request){
|
||||
function saveNewItem(Request $request)
|
||||
{
|
||||
|
||||
$post = $request->all();
|
||||
// var_dump($post['imgupload']);
|
||||
@@ -684,16 +693,18 @@ class UserController extends Controller {
|
||||
'ProductURL' => $itemUrl
|
||||
);
|
||||
|
||||
$validator = Validator::make($check_product_url, [
|
||||
$validator = Validator::make(
|
||||
$check_product_url,
|
||||
[
|
||||
'ProductURL' => 'unique:teamstore_products'
|
||||
],
|
||||
[
|
||||
'ProductURL.unique' => 'The Item URL has already been taken.',
|
||||
]);
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
if ($validator->fails())
|
||||
{
|
||||
if ($validator->fails()) {
|
||||
$errors = "";
|
||||
// var_dump(($validator->errors()->all()));
|
||||
foreach ($validator->errors()->all() as $error) {
|
||||
@@ -765,10 +776,137 @@ class UserController extends Controller {
|
||||
'success' => true,
|
||||
'message' => 'success'
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
function saveNewItemImage(Request $request){
|
||||
function saveNewItemFromDesigner(Request $request)
|
||||
{
|
||||
|
||||
$post = $request->all();
|
||||
// var_dump($post['imgupload']);
|
||||
$UserModel = new UserModel;
|
||||
$newTeamStoreModel = new TeamStoreModel;
|
||||
$getYear = date('y');
|
||||
|
||||
$store_id = 1; // default merchbay store
|
||||
$store_array = $newTeamStoreModel->selectTeamStore('Id', $store_id);
|
||||
$client_design = $UserModel->selectClientDesignsbyCode($post['designCode']);
|
||||
$userId = Auth::user()->id;
|
||||
|
||||
$templateCode = $client_design[0]->TemplateCode;
|
||||
$designCode = $client_design[0]->DesignCode;
|
||||
$itemName = $client_design[0]->DesignName;
|
||||
$itemDescription = "Sublimated T-Shirt 100% moisture wicking polyester. Imported. Lightweight fabric helps wick away sweat to keep you dry and comfortable.";
|
||||
$itemPrice = "1.00";
|
||||
$itemForm = "tshirt-form";
|
||||
$itemUrl = $store_array[0]->StoreUrl . '-' . $userId . '-' . $client_design[0]->DesignCode;
|
||||
$itemPrivacy = "public";
|
||||
$available_size = "youth,adult";
|
||||
|
||||
|
||||
$product = $newTeamStoreModel->selectTeamStoreProducts('ProductURL', $itemUrl);
|
||||
// var_dump(count($product));
|
||||
if (count($product)) {
|
||||
return response()->json(array(
|
||||
'success' => true,
|
||||
'message' => 'success',
|
||||
"link" => '/store/merchbay-store/product/' . $itemUrl
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
$check_product_url = array(
|
||||
'ProductURL' => $itemUrl
|
||||
);
|
||||
|
||||
$validator = Validator::make(
|
||||
$check_product_url,
|
||||
[
|
||||
'ProductURL' => 'unique:teamstore_products'
|
||||
],
|
||||
[
|
||||
'ProductURL.unique' => 'The Item URL has already been taken.',
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
if ($validator->fails()) {
|
||||
$errors = "";
|
||||
// var_dump(($validator->errors()->all()));
|
||||
foreach ($validator->errors()->all() as $error) {
|
||||
$errors .= "<li>" . $error . "</li>";
|
||||
}
|
||||
|
||||
$message = '
|
||||
<div class="alert alert-danger alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-ban"></i> ERROR:</h4>
|
||||
' . $errors .
|
||||
'</div>';
|
||||
|
||||
return response()->json(array(
|
||||
'success' => false,
|
||||
'message' => $message
|
||||
));
|
||||
}
|
||||
|
||||
$data = array(
|
||||
'TeamStoreId' => $store_id,
|
||||
'ProductName' => $itemName,
|
||||
'ProductPrice' => str_replace('$ ', '', $itemPrice),
|
||||
'ProductDescription' => $itemDescription,
|
||||
'ProductURL' => $itemUrl,
|
||||
'ProductForm' => $itemForm,
|
||||
'AvailableSizes' => $available_size,
|
||||
'PrivacyStatus' => $itemPrivacy,
|
||||
'TemplateCode' => $templateCode,
|
||||
'DesignCode' => $designCode,
|
||||
// 'ShippingCostId' => 1
|
||||
);
|
||||
|
||||
|
||||
$id = $UserModel->insertNewProduct($data); // product item id
|
||||
// echo $id;
|
||||
|
||||
$array_template_paths = $UserModel->selectTemplatePaths('TemplateCode', $templateCode);
|
||||
|
||||
$imageThumbs = array();
|
||||
foreach ($array_template_paths as $key => $path) {
|
||||
$imageThumbs[] = $designCode . "-" . strtolower($path->Side) . "-thumbnail.png";
|
||||
}
|
||||
// var_dump($imageThumbs);
|
||||
// $images = explode(",", $post["imagesThumb"]);
|
||||
|
||||
for ($i = 0; $i < count($imageThumbs); $i++) {
|
||||
$thumbnail = $imageThumbs[$i];
|
||||
|
||||
if ($i == 0) {
|
||||
$imageClass = "active";
|
||||
} else {
|
||||
$imageClass = null;
|
||||
}
|
||||
|
||||
$thumbs = $data = array(
|
||||
'ProductId' => $id,
|
||||
'Image' => $thumbnail,
|
||||
'ImageClass' => $imageClass
|
||||
);
|
||||
|
||||
$UserModel->insertNewProductThumbnails($thumbs);
|
||||
}
|
||||
|
||||
$prod_code = array('ProductCode' => $getYear . '-' . str_pad($id, 10, '0', STR_PAD_LEFT));
|
||||
$i = $UserModel->updateProductCode($prod_code, $id);
|
||||
|
||||
|
||||
return response()->json(array(
|
||||
'success' => true,
|
||||
'message' => 'success',
|
||||
"link" => '/store/merchbay-store/product/' . $itemUrl
|
||||
));
|
||||
}
|
||||
|
||||
function saveNewItemImage(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
$UserModel = new UserModel;
|
||||
$getYear = date('y');
|
||||
@@ -808,10 +946,10 @@ class UserController extends Controller {
|
||||
'success' => true,
|
||||
'message' => 'success'
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
function deleteImageThumb(Request $request){
|
||||
function deleteImageThumb(Request $request)
|
||||
{
|
||||
$file = $request->thumb_filename;
|
||||
$id = $request->thumb_id;
|
||||
$UserModel = new UserModel;
|
||||
@@ -828,10 +966,10 @@ class UserController extends Controller {
|
||||
'message' => 'success',
|
||||
'delete_row' => 'item-' . $id
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
function updateActiveThumbnail(Request $request){
|
||||
function updateActiveThumbnail(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
$UserModel = new UserModel;
|
||||
$i = $UserModel->updateActiveThumb($post['id'], $post['product_id']);
|
||||
@@ -839,7 +977,8 @@ class UserController extends Controller {
|
||||
|
||||
}
|
||||
|
||||
function saveThumbnailOrdering(Request $request){
|
||||
function saveThumbnailOrdering(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
$arrayItems = $post['item'];
|
||||
$order = 1;
|
||||
@@ -856,7 +995,8 @@ class UserController extends Controller {
|
||||
));
|
||||
}
|
||||
|
||||
function saveItemOrdering(Request $request){
|
||||
function saveItemOrdering(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
$arrayItems = $post['order_number'];
|
||||
$order = 1;
|
||||
@@ -875,7 +1015,8 @@ class UserController extends Controller {
|
||||
|
||||
|
||||
|
||||
function storeSettingUpdate(Request $request){
|
||||
function storeSettingUpdate(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
$UserModel = new UserModel;
|
||||
|
||||
@@ -916,16 +1057,18 @@ class UserController extends Controller {
|
||||
'StoreUrl' => $store_url
|
||||
);
|
||||
|
||||
$validator = Validator::make($check_store_url, [
|
||||
$validator = Validator::make(
|
||||
$check_store_url,
|
||||
[
|
||||
'StoreUrl' => 'unique:teamstores'
|
||||
],
|
||||
[
|
||||
'StoreUrl.unique' => 'The Store URL has already been taken.',
|
||||
]);
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
if ($validator->fails())
|
||||
{
|
||||
if ($validator->fails()) {
|
||||
$errors = "";
|
||||
|
||||
foreach ($validator->errors()->all() as $error) {
|
||||
@@ -938,9 +1081,6 @@ class UserController extends Controller {
|
||||
'message' => $errors
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
$data = array(
|
||||
@@ -987,7 +1127,8 @@ class UserController extends Controller {
|
||||
|
||||
}
|
||||
|
||||
function storeOrders(){
|
||||
function storeOrders()
|
||||
{
|
||||
$UserModel = new UserModel;
|
||||
$newTeamStoreModel = new TeamStoreModel;
|
||||
$store_id = Auth::user()->store_id;
|
||||
@@ -1000,7 +1141,8 @@ class UserController extends Controller {
|
||||
->with('array_store_orders', $array_store_orders);
|
||||
}
|
||||
|
||||
function showStoreOrderDetails(Request $request){
|
||||
function showStoreOrderDetails(Request $request)
|
||||
{
|
||||
|
||||
$post = $request->all();
|
||||
// var_dump($post['pid']);
|
||||
@@ -1027,7 +1169,8 @@ class UserController extends Controller {
|
||||
}
|
||||
|
||||
|
||||
function itemStoreReArrange(){
|
||||
function itemStoreReArrange()
|
||||
{
|
||||
$thumbnails = array();
|
||||
$newUserModel = new UserModel;
|
||||
$newTeamStoreModel = new TeamStoreModel;
|
||||
@@ -1061,7 +1204,6 @@ class UserController extends Controller {
|
||||
'product_id' => $pr_arr->Id,
|
||||
'thumb' => $displayThumbnails
|
||||
);
|
||||
|
||||
} else {
|
||||
$thumbnails[] = array(
|
||||
'folder' => $store_array[0]->ImageFolder,
|
||||
@@ -1069,7 +1211,6 @@ class UserController extends Controller {
|
||||
'thumb' => "product-image-placeholder.png"
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return view('user-layouts.store_items_arrange')->with('store_array', $store_array)
|
||||
@@ -1077,7 +1218,8 @@ class UserController extends Controller {
|
||||
->with('thumbnails', $thumbnails);
|
||||
}
|
||||
|
||||
function deleteStoreItem(Request $request){
|
||||
function deleteStoreItem(Request $request)
|
||||
{
|
||||
//
|
||||
$post = $request->all();
|
||||
|
||||
@@ -1095,11 +1237,11 @@ class UserController extends Controller {
|
||||
'message' => "Something went wrong. Please try again!"
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function announcementIndex(){
|
||||
function announcementIndex()
|
||||
{
|
||||
$UserModel = new UserModel;
|
||||
$storeId = Auth::user()->store_id;
|
||||
|
||||
@@ -1119,11 +1261,11 @@ class UserController extends Controller {
|
||||
return view('user-layouts.announcement')
|
||||
->with("data", $data)
|
||||
->render();
|
||||
|
||||
}
|
||||
|
||||
|
||||
function announcementUpdateSave(Request $request){
|
||||
function announcementUpdateSave(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
$UserModel = new UserModel;
|
||||
|
||||
@@ -1158,7 +1300,8 @@ class UserController extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
function announcementUpdateStatus(Request $request){
|
||||
function announcementUpdateStatus(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
$UserModel = new UserModel;
|
||||
|
||||
@@ -1191,12 +1334,12 @@ class UserController extends Controller {
|
||||
|
||||
}
|
||||
|
||||
function getAddressBook() {
|
||||
function getAddressBook()
|
||||
{
|
||||
$UserModel = new UserModel;
|
||||
$userId = Auth::user()->id;
|
||||
$array_address_book = $UserModel->selectAddresBook('UserId', $userId);
|
||||
|
||||
return $array_address_book;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ Route::controllers([
|
||||
'password' => 'Auth\PasswordController',
|
||||
]);
|
||||
|
||||
|
||||
// Route::get('/', 'MainController@index');
|
||||
Route::get('/sportslist', 'MainController@sports');
|
||||
Route::get('/sports/{url}', 'MainController@templatesCat');
|
||||
@@ -147,6 +146,9 @@ Route::group(['middleware' => 'normaluser'], function () {
|
||||
Route::get('user/announcement', 'user\UserController@announcementIndex');
|
||||
Route::post('user/announcement/updateSave', 'user\UserController@announcementUpdateSave');
|
||||
Route::post('user/announcement/status/update', 'user\UserController@announcementUpdateStatus');
|
||||
|
||||
|
||||
Route::post('user/store-items/personal-design', 'user\UserController@saveNewItemFromDesigner');
|
||||
});
|
||||
|
||||
Route::group(['middleware' => 'auth'], function () {
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</form>
|
||||
|
||||
<div class="text-center py-3">
|
||||
<nuxt-link to="/auth/reset-password">Forgot your password?</nuxt-link>
|
||||
<a href="{{ url('/password/email') }}">Forgot your password?</a>
|
||||
</div>
|
||||
<hr class="custom-hr" />
|
||||
<div class="text-center py-3">
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
@extends('app')
|
||||
@extends('merchbay_main')
|
||||
|
||||
@section('content')
|
||||
@section('main-content')
|
||||
<style>
|
||||
.error {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.form-wrapper {
|
||||
margin-top: 20%;
|
||||
}
|
||||
</style>
|
||||
<div class="wrapper pb-5">
|
||||
<div class="main__content">
|
||||
<div class="container">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="form-wrapper">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="text-center">R E S E T P A S S W O R D</h3>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-lg-5 pt-5 text-center text-lg-start">
|
||||
<h4>Forgot Password</h4>
|
||||
<hr class="custom-hr" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-lg-5">
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('status') }}
|
||||
@@ -37,16 +39,23 @@
|
||||
@endif
|
||||
<form role="form" method="POST" action="{{ url('/password/email') }}">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<div class="form-group">
|
||||
<label for="username" class="control-label">Email Address</label>
|
||||
<div class="mb-3">
|
||||
<label for="exampleInputEmail1" class="form-label">Email address</label>
|
||||
<input type="email" class="form-control" name="email" value="{{ old('email') }}" title="Please enter your email address" placeholder="example@gmail.com">
|
||||
<span class="help-block"></span>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default btn-block">Send Password Reset Link</button>
|
||||
<button type="submit" class="btn btn-green btn-sm w-100">
|
||||
Submit
|
||||
</button>
|
||||
<a href="{{ url('./auth/login')}}" class="btn btn-black btn-sm w-100 mt-2">
|
||||
Cancel
|
||||
</a>
|
||||
</form>
|
||||
<br><br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <hr class="custom-hr" />
|
||||
<div class="text-center py-3">
|
||||
Don't have an account?
|
||||
<a href="{{ url('./auth/register')}}" class="btn btn-black btn-sm w-100">Register</a>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,25 +1,26 @@
|
||||
@extends('app')
|
||||
|
||||
@section('content')
|
||||
@extends('merchbay_main')
|
||||
|
||||
@section('main-content')
|
||||
<style>
|
||||
.error {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.form-wrapper {
|
||||
margin-top: 20%;
|
||||
}
|
||||
</style>
|
||||
<div class="wrapper pb-5">
|
||||
<div class="main__content">
|
||||
<div class="container">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="form-wrapper">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="text-center">R E S E T P A S S W O R D</h3>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-lg-5 pt-5 text-center text-lg-start">
|
||||
<h4>Reset Password</h4>
|
||||
<hr class="custom-hr" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-lg-5">
|
||||
@if (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> There were some problems with your input.<br><br>
|
||||
@@ -33,27 +34,23 @@
|
||||
<form role="form" method="POST" action="{{ url('/password/reset') }}">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="token" value="{{ $token }}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">Email Address</label>
|
||||
<div class="mb-3">
|
||||
<label for="exampleInputEmail1" class="form-label">Email address</label>
|
||||
<input type="email" class="form-control" name="email" value="{{ old('email') }}" title="Please enter your email address" placeholder="example@gmail.com">
|
||||
<span class="help-block"></span>
|
||||
<!-- <div id="emailHelp" class="form-text">We'll never share your email with anyone else.</div> -->
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">Password</label>
|
||||
<input type="password" class="form-control" name="password" placeholder="Password">
|
||||
<span class="help-block"></span>
|
||||
<div class="mb-3">
|
||||
<label for="exampleInputPassword1" class="form-label">New password</label>
|
||||
<input type="password" class="form-control" name="password" placeholder="Password" title="Please enter your password">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">Confirm Password</label>
|
||||
<input type="password" class="form-control" name="password_confirmation" placeholder="Confirm Password">
|
||||
<span class="help-block"></span>
|
||||
<div class="mb-3">
|
||||
<label for="exampleInputPassword1" class="form-label">Confirm new password</label>
|
||||
<input type="password" class="form-control" name="password_confirmation" placeholder="Password" title="Please enter your password">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default btn-block">Reset Password</button>
|
||||
<button type="submit" class="btn btn-green btn-sm w-100">
|
||||
Submit
|
||||
</button>
|
||||
</form>
|
||||
<br><br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@@ -8,7 +9,8 @@
|
||||
<title>Designer</title>
|
||||
|
||||
<!-- Latest compiled and minified CSS -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
|
||||
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||
|
||||
<!-- ---- Include the above in your HEAD tag -------- -->
|
||||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
@@ -27,12 +29,21 @@
|
||||
height: 36px;
|
||||
margin-top: -9px;
|
||||
}
|
||||
.carousel-inner>.item>a>img, .carousel-inner>.item>img, .img-loader, .thumbnail a>img, .thumbnail>img{
|
||||
|
||||
.carousel-inner>.item>a>img,
|
||||
.carousel-inner>.item>img,
|
||||
.img-loader,
|
||||
.thumbnail a>img,
|
||||
.thumbnail>img {
|
||||
margin: 0 auto;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.carousel-inner>.item>a>img, .carousel-inner>.item>img, .img-thumb-custom, .thumbnail a>img, .thumbnail>img{
|
||||
.carousel-inner>.item>a>img,
|
||||
.carousel-inner>.item>img,
|
||||
.img-thumb-custom,
|
||||
.thumbnail a>img,
|
||||
.thumbnail>img {
|
||||
margin: 0 auto;
|
||||
height: 418.53px;
|
||||
}
|
||||
@@ -51,42 +62,59 @@
|
||||
border-right: none;
|
||||
border-top: none;
|
||||
}
|
||||
.table-bordered>thead>tr>td, .table-bordered>thead>tr>th{
|
||||
|
||||
.table-bordered>thead>tr>td,
|
||||
.table-bordered>thead>tr>th {
|
||||
border-bottom-width: 0px;
|
||||
}
|
||||
|
||||
.btn-roster-action {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.btn-group-sm>.btn, .btn-roster-action {
|
||||
|
||||
.btn-group-sm>.btn,
|
||||
.btn-roster-action {
|
||||
padding: 0px 5px;
|
||||
}
|
||||
.table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{
|
||||
|
||||
.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>thead>tr>th {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.hide-bullets {
|
||||
list-style: none;
|
||||
margin-left: -40px;
|
||||
margin-top: 20px;
|
||||
display: -webkit-inline-box;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-136108155-1"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
|
||||
function gtag() {
|
||||
dataLayer.push(arguments);
|
||||
}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-136108155-1');
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@include('layout.navbar')
|
||||
<div class="body-spacer"></div>
|
||||
@@ -97,16 +125,20 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4>{{ $client_design_array[0]->DesignName }}
|
||||
<button class="btn btn-default btn-md pull-right" id="btn-reload-design" title="Reload Design"><i class="fa fa-refresh"></i></button>
|
||||
<button class="btn btn-default btn-md pull-right" id="btn-reload-design"
|
||||
title="Reload Design"><i class="fa fa-refresh"></i></button>
|
||||
</h4>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
{{-- <input type="hidden" id="images_thumb"> --}}
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center">
|
||||
@foreach ($templatepaths_arrays as $k => $template)
|
||||
@if ($k == 0)
|
||||
<img id="{{ strtolower($template->Side) }}-image-thumb" src="{{asset('/public/images/loading-please-wait.gif')}}" class="img img-responsive img-loader main-thumbnail">
|
||||
<img id="{{ strtolower($template->Side) }}-image-thumb"
|
||||
src="{{ asset('/public/images/loading-please-wait.gif') }}"
|
||||
class="img img-responsive img-loader main-thumbnail">
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
@@ -123,9 +155,13 @@
|
||||
@if (!Auth::guest())
|
||||
<div class="panel-footer">
|
||||
<div id="dd_footer_button">
|
||||
<!-- <a href="{{ url('user/my-designs') }}" type="button" class="btn btn-primary pull-right" style="margin-left: 10px;"><i class="fa fa-plus-square"></i> Purchase this Item</a> -->
|
||||
<button type="button" class="btn btn-primary pull-right btn-purchase"
|
||||
style="margin-left: 10px;"><i class="fa fa-plus-square"></i> Purchase this
|
||||
Item</button>
|
||||
|
||||
<a href="{{ url('user/my-designs') }}" type="button" class="btn btn-default pull-right"><i class="fa fa-arrow-left"></i> Go to My Designs</a>
|
||||
<a href="{{ url('user/my-designs') }}" type="button"
|
||||
class="btn btn-default pull-right"><i class="fa fa-arrow-left"></i> Go to My
|
||||
Designs</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
@@ -142,7 +178,9 @@
|
||||
<!-- JQUERY -->
|
||||
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
|
||||
<!-- Latest compiled and minified JavaScript -->
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
|
||||
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous">
|
||||
</script>
|
||||
<!-- FABRIC JS -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.7.15/fabric.min.js"></script>
|
||||
<!-- FABRIC JS CURVE TEXT -->
|
||||
@@ -157,7 +195,6 @@
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
@@ -198,10 +235,12 @@
|
||||
generateThumbnails();
|
||||
// console.log('{{ $client_design_array[0]->DesignCode }}');
|
||||
$('#toTop').click(function() {
|
||||
$('body,html').animate({scrollTop:0},800);
|
||||
$('body,html').animate({
|
||||
scrollTop: 0
|
||||
}, 800);
|
||||
});
|
||||
|
||||
$('#custom-navbar-brand').html('<img src="{{asset("/public/images/logo.png")}}">');
|
||||
$('#custom-navbar-brand').html('<img src="{{ asset('/public/images/logo.png') }}">');
|
||||
|
||||
|
||||
$("#frm-design-details").validate({
|
||||
@@ -236,10 +275,14 @@
|
||||
|
||||
var getTemplateCode = $('#template_code').val();
|
||||
|
||||
$('.panel-design-details').load("{{ url('designer/a/buy-form') }}", { temp_code : getTemplateCode }, function(response, status, xhr){
|
||||
$('.panel-design-details').load("{{ url('designer/a/buy-form') }}", {
|
||||
temp_code: getTemplateCode
|
||||
}, function(response, status, xhr) {
|
||||
// console.log(response, status, xhr)
|
||||
$('#dd_footer_button').html('<button type="button" class="btn btn-default pull-right" id="btn_cancel_buy" style="margin-left: 5px;">Cancel</button> ' +
|
||||
'<button type="submit" class="btn btn-primary pull-right" id="btn-submit-publish">Add to Cart</button>');
|
||||
$('#dd_footer_button').html(
|
||||
'<button type="button" class="btn btn-default pull-right" id="btn_cancel_buy" style="margin-left: 5px;">Cancel</button> ' +
|
||||
'<button type="submit" class="btn btn-primary pull-right" id="btn-submit-publish">Add to Cart</button>'
|
||||
);
|
||||
$('.inputName').keyup(function() {
|
||||
this.value = this.value.toLocaleUpperCase();
|
||||
});
|
||||
@@ -269,7 +312,10 @@
|
||||
'</div> ' +
|
||||
'</div> ' +
|
||||
'</div>');
|
||||
$('#dd_footer_button').html('<a href="{{ url('user/my-designs') }}" type="button" class="btn btn-default pull-right"><i class="fa fa-arrow-left"></i> Go to My Designs</a>');
|
||||
var link = "{{ url('user/my-designs') }}";
|
||||
$('#dd_footer_button').html('<a href="' + link +
|
||||
'" type="button" class="btn btn-default pull-right"><i class="fa fa-arrow-left"></i> Go to My Designs</a>'
|
||||
);
|
||||
});
|
||||
|
||||
$(document).on('button click', '#addNewRow', function() {
|
||||
@@ -294,7 +340,9 @@
|
||||
|
||||
success: function(response) {
|
||||
var className = "row" + (num - 1);
|
||||
$('.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>');
|
||||
$('.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);
|
||||
@@ -318,7 +366,9 @@
|
||||
|
||||
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>');
|
||||
$('.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();
|
||||
});
|
||||
@@ -340,6 +390,36 @@
|
||||
$('.a_thumbnail').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
});
|
||||
|
||||
$(document).on('a click', '.btn-purchase', function() {
|
||||
var designCode = "{{ $client_design_array[0]->DesignCode }}";
|
||||
// var images_thumb = $('#images_thumb').val();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: "{{ url('/user/store-items/personal-design') }}",
|
||||
data: {
|
||||
designCode: designCode
|
||||
},
|
||||
beforeSend: function(xhr) {
|
||||
var token = $('meta[name="csrf_token"]').attr('content');
|
||||
|
||||
if (token) {
|
||||
return xhr.setRequestHeader('X-CSRF-TOKEN', token);
|
||||
}
|
||||
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
||||
},
|
||||
success: function(response) {
|
||||
// console.log(response)
|
||||
if (response.success) {
|
||||
window.location = response.link;
|
||||
} else {
|
||||
alert("Something went wrong. Please try again.");
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
function generateThumbnails() {
|
||||
@@ -380,11 +460,14 @@
|
||||
var sideName = SideAndPath[i]['Side'];
|
||||
var type = SideAndPath[i]['Type'];
|
||||
|
||||
$('#'+sideName.toLowerCase()+'-image-thumb').attr('src', response['thumb_'+sideName.toLowerCase()]);
|
||||
$('#' + sideName.toLowerCase() + '-image-thumb').attr('src', response['thumb_' +
|
||||
sideName.toLowerCase()]);
|
||||
$('#' + sideName.toLowerCase() + '-image-thumb').removeClass("img-loader");
|
||||
$('#' + sideName.toLowerCase() + '-image-thumb').addClass("img-thumb-custom");
|
||||
}
|
||||
}
|
||||
// var thumbs = [];
|
||||
|
||||
for (var j = 0; j < SideAndPath.length; j++) {
|
||||
var sideName = SideAndPath[j]['Side'];
|
||||
var type = SideAndPath[j]['Type'];
|
||||
@@ -393,7 +476,8 @@
|
||||
$('.hide-bullets').append('<div class="text-center"> ' +
|
||||
'<li style="padding:10px" class="item-thumb"> ' +
|
||||
'<a class="thumbnail a_thumbnail active" style="min-width: 130px;"> ' +
|
||||
'<img style="height: 100px;" src="'+response['thumb_'+sideName.toLowerCase()]+'" class="img img-responsive">' +
|
||||
'<img style="height: 100px;" src="' + response['thumb_' + sideName
|
||||
.toLowerCase()] + '" class="img img-responsive">' +
|
||||
'</a> ' +
|
||||
'</li> ' +
|
||||
'</div>');
|
||||
@@ -401,12 +485,18 @@
|
||||
$('.hide-bullets').append('<div class="text-center"> ' +
|
||||
'<li style="padding:10px" class="item-thumb"> ' +
|
||||
'<a class="thumbnail a_thumbnail" style="min-width: 130px;"> ' +
|
||||
'<img style="height: 100px;" src="'+response['thumb_'+sideName.toLowerCase()]+'" class="img img-responsive">' +
|
||||
'<img style="height: 100px;" src="' + response['thumb_' + sideName
|
||||
.toLowerCase()] + '" class="img img-responsive">' +
|
||||
'</a> ' +
|
||||
'</li> ' +
|
||||
'</div>');
|
||||
}
|
||||
|
||||
// thumbs.push(response['thumb_' + sideName
|
||||
// .toLowerCase()].replace(/^.*\/\/[^\/]+/, '').replace("/", ""))
|
||||
}
|
||||
|
||||
// $('#images_thumb').val(thumbs.join())
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -463,4 +553,5 @@
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1 +1,18 @@
|
||||
Click here to reset your password: {{ url('password/reset/'.$token) }}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Reset Password</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p> You requested a link to change your current merchbay account password.</p>
|
||||
<p>Please click this <a href="{{ url('password/reset/'.$token) }}">link</a> to set your new password.</p>
|
||||
|
||||
<br><br><br><br><br>
|
||||
--
|
||||
This is an auto-generated email. Do not reply to this message.
|
||||
</body>
|
||||
</html>
|
||||
@@ -41,6 +41,8 @@
|
||||
<a href="{{ url('/') }}/{{ Request::path() }}/view/{{ $row->DesignCode }} " class="btn btn-warning btn-xs"><i class="fa fa-eye"></i> View</a>
|
||||
<!-- <a href="{{ url('designer/edit') }}/{{ $row->DesignCode }}" class="btn btn-default btn-xs"><i class="fa fa-edit"></i> Edit Design</a> -->
|
||||
<!-- <a href="{{ url('user/my-designs/buy-design') }}/{{ $row->DesignCode }}" class="btn btn-primary btn-xs"><i class="fa fa-shopping-cart"></i> Buy</a> -->
|
||||
<button class="btn btn-primary btn-xs btn-purchase" data-design-code="{{ $row->DesignCode }}"><i class="fa fa-plus-square"></i> Purchase</a>
|
||||
|
||||
@if(Auth::user()->role == "store_owner")
|
||||
<a href="{{ url('user/my-designs/sell-design/' . $row->DesignCode) }}" class="btn btn-success btn-xs"><i class="fa fa-usd"></i> Sell</a>
|
||||
@endif
|
||||
|
||||
@@ -1723,6 +1723,36 @@
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).on('button click', '.btn-purchase', function() {
|
||||
// console.log()
|
||||
var designCode = $(this).data('design-code');
|
||||
// var images_thumb = $('#images_thumb').val();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: "{{ url('/user/store-items/personal-design') }}",
|
||||
data: {
|
||||
designCode: designCode
|
||||
},
|
||||
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) {
|
||||
if (response.success) {
|
||||
window.location = response.link;
|
||||
} else {
|
||||
alert("Something went wrong. Please try again.");
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
// fetchUSA()
|
||||
// fetchCanada()
|
||||
getSelectedCountry()
|
||||
|
||||
Reference in New Issue
Block a user