dev (#1)
All checks were successful
Deploy Production (merchbay.com) / deploy (push) Successful in 2m11s
All checks were successful
Deploy Production (merchbay.com) / deploy (push) Successful in 2m11s
Co-authored-by: Frank John Begornia <frank.begornia@yahoo.com> Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
@@ -34,10 +34,10 @@ class UserController extends Controller
|
||||
|
||||
$post_data = array(
|
||||
'isStoreOwner' => true,
|
||||
'store_order' => $countStoreOrder[0]->count_order,
|
||||
'store_income' => $storeIncome[0]->store_income,
|
||||
'store_product_count' => $countStoreProduct[0]->store_product_count,
|
||||
'store_published_product' => $countStorePublishedProduct[0]->store_published_product
|
||||
'store_order' => isset($countStoreOrder[0]->count_order) ? $countStoreOrder[0]->count_order : 0,
|
||||
'store_income' => isset($storeIncome[0]->store_income) ? $storeIncome[0]->store_income : 0,
|
||||
'store_product_count' => isset($countStoreProduct[0]->store_product_count) ? $countStoreProduct[0]->store_product_count : 0,
|
||||
'store_published_product' => isset($countStorePublishedProduct[0]->store_published_product) ? $countStorePublishedProduct[0]->store_published_product : 0
|
||||
);
|
||||
} else {
|
||||
$post_data = array(
|
||||
@@ -348,14 +348,16 @@ class UserController extends Controller
|
||||
$newTeamStoreModel = new TeamStoreModel;
|
||||
|
||||
$product_array = $newTeamStoreModel->selectTeamStoreProducts('ProductURL', $url);
|
||||
$roster = $newUserModel->getRoster($product_array[0]->Id);
|
||||
$thumbnails_array = $newTeamStoreModel->getThumbnails($product_array[0]->Id);
|
||||
$available_size = explode(",", $product_array[0]->AvailableSizes);
|
||||
$shipping_cost = $newUserModel->selectShippingCost();
|
||||
|
||||
return view('user-layouts.view-store-item')->with('product_array', $product_array)
|
||||
->with('available_size', $available_size)
|
||||
->with('thumbnails_array', $thumbnails_array)
|
||||
->with('shipping_cost', $shipping_cost);
|
||||
->with('shipping_cost', $shipping_cost)
|
||||
->with('roster', $roster);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1344,4 +1346,76 @@ class UserController extends Controller
|
||||
|
||||
return $array_address_book;
|
||||
}
|
||||
}
|
||||
|
||||
function roster(Request $request)
|
||||
{
|
||||
$UserModel = new UserModel;
|
||||
$post = $request->all();
|
||||
|
||||
$response = $UserModel->insertRoster($post['data']);
|
||||
|
||||
if($response) {
|
||||
return response()->json(array(
|
||||
'status' => true,
|
||||
'message' => "Roster is successfully saved."
|
||||
));
|
||||
}
|
||||
|
||||
return response()->json(array(
|
||||
'status' => false,
|
||||
'message' => "Something went wrong. Please try again"
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
function deleteRoster(Request $request) {
|
||||
$UserModel = new UserModel;
|
||||
$post = $request->all();
|
||||
|
||||
$response = $UserModel->deleteRoster($post['data']);
|
||||
|
||||
if($response) {
|
||||
return response()->json(array(
|
||||
'status' => true,
|
||||
'message' => "Roster is successfully deleted."
|
||||
));
|
||||
}
|
||||
|
||||
return response()->json(array(
|
||||
'status' => false,
|
||||
'message' => "Something went wrong. Please try again"
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
|
||||
function rosterUpdate(Request $request)
|
||||
{
|
||||
$UserModel = new UserModel;
|
||||
$post = $request->all();
|
||||
|
||||
$response = $UserModel->updateRoster($post['data']);
|
||||
|
||||
if($response) {
|
||||
return response()->json(array(
|
||||
'status' => true,
|
||||
'message' => "Roster is successfully updated."
|
||||
));
|
||||
}
|
||||
|
||||
return response()->json(array(
|
||||
'status' => false,
|
||||
'message' => "Something went wrong. Please try again"
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
function getCurrentRoster(Request $request) {
|
||||
$productId = $request->query('product-id');
|
||||
$newUserModel = new UserModel;
|
||||
$roster = $newUserModel->getRoster($productId);
|
||||
return response()->json($roster);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user