added canada
This commit is contained in:
@@ -191,8 +191,8 @@ class TeamStoreController extends Controller
|
||||
alert("Invalid Password");
|
||||
window.history.back();
|
||||
</script>';
|
||||
// return redirect('cart');
|
||||
|
||||
// return redirect('cart');
|
||||
|
||||
// return redirect('/');
|
||||
}
|
||||
}
|
||||
@@ -586,6 +586,14 @@ class TeamStoreController extends Controller
|
||||
{
|
||||
|
||||
$m = new TeamStoreModel;
|
||||
$UserModel = new UserModel;
|
||||
|
||||
$userId = Auth::user()->id;
|
||||
$array_address_book = $UserModel->selectAddresBook('UserId', $userId);
|
||||
if (count($array_address_book) <= 0) {
|
||||
$array_address_book = null;
|
||||
}
|
||||
|
||||
$cartKey = $request->session()->get('cartkey');
|
||||
$items = $m->myCart($cartKey);
|
||||
$getSubtotal = $m->getSubtotal($cartKey);
|
||||
@@ -639,13 +647,26 @@ class TeamStoreController extends Controller
|
||||
} else {
|
||||
$finalSubTotal = $getSubtotal[0]->Subtotal;
|
||||
}
|
||||
|
||||
if($cartKey != null) {
|
||||
$shippingFee = app(\App\Http\Controllers\paypal\PaypalController::class)->getShippingFee($cartKey);
|
||||
$tax = app(\App\Http\Controllers\paypal\PaypalController::class)->getTax($cartKey);
|
||||
}else{
|
||||
$shippingFee = 0;
|
||||
$tax = [];
|
||||
}
|
||||
|
||||
|
||||
return view('merchbay.cart')
|
||||
->with('item_group', $items_group)
|
||||
->with('row', $items)
|
||||
->with('img_thumb', $item_thumbs)
|
||||
->with('getSubtotal', $finalSubTotal)
|
||||
->with('store_array', $store_array);
|
||||
->with('store_array', $store_array)
|
||||
->with('store_array', $store_array)
|
||||
->with('shipping_fee', $shippingFee)
|
||||
->with('tax', $tax)
|
||||
->with('address_book', $array_address_book);
|
||||
}
|
||||
|
||||
public function addVoucher(Request $request)
|
||||
@@ -818,10 +839,11 @@ class TeamStoreController extends Controller
|
||||
$m = new TemplatesModel;
|
||||
$data = $m->selectAllTemplate();
|
||||
return view('merchbay.templates')
|
||||
->with('row', $data);
|
||||
->with('row', $data);
|
||||
}
|
||||
|
||||
public function contactUsSend(Request $request) {
|
||||
public function contactUsSend(Request $request)
|
||||
{
|
||||
$post = $request->all();
|
||||
|
||||
$post['captcha'] = $this->captchaCheck();
|
||||
@@ -850,7 +872,7 @@ class TeamStoreController extends Controller
|
||||
$message = '
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
<strong>Error!</strong>' . $errors .
|
||||
'<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
'<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>';
|
||||
Session::flash('contactUserError', $message);
|
||||
return Redirect::back();
|
||||
@@ -861,11 +883,11 @@ class TeamStoreController extends Controller
|
||||
'emailAddress' => $post['emailAddress'],
|
||||
'msg' => $post['message'],
|
||||
'receiver' => 'orders@merchbay.com',
|
||||
'email_cc' => ['webmaster@merchbay.com','angelo@merchbay.com'],
|
||||
'email_cc' => ['webmaster@merchbay.com', 'angelo@merchbay.com'],
|
||||
'subject' => 'Merchbay - Contact Us Page',
|
||||
);
|
||||
|
||||
Mail::send('emails.contact_us', $data, function ($msg) use ($data) {
|
||||
Mail::send('emails.contact_us', $data, function ($msg) use ($data) {
|
||||
$msg->from('support@merchbay.com', 'Merchbay Contact Us Page');
|
||||
$msg->bcc($data['email_cc'], 'Merchbay Contact Us Page');
|
||||
$msg->to($data['receiver'])->subject($data['subject']);
|
||||
@@ -874,7 +896,7 @@ class TeamStoreController extends Controller
|
||||
$contactUsUrl = url('/contact-us');
|
||||
echo '<script>
|
||||
alert("Your message is successfully sent.");
|
||||
window.location = "'. $contactUsUrl .'"
|
||||
window.location = "' . $contactUsUrl . '"
|
||||
</script>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user