updated
This commit is contained in:
@@ -79,14 +79,21 @@ class PaypalController extends Controller
|
||||
{
|
||||
$UserModel = new UserModel;
|
||||
|
||||
// if (Auth::guest()) {
|
||||
// $message = 'Please <a href="' . url('auth/login') . '">Sign in</a> to your account to proceed.';
|
||||
// Session::flash('msg', $message);
|
||||
// return Redirect::back();
|
||||
// }
|
||||
if (Auth::guest()) {
|
||||
$message = 'Please <a href="' . url('auth/login') . '">Sign in</a> to your account to proceed.';
|
||||
Session::flash('msg', $message);
|
||||
return Redirect::back();
|
||||
}
|
||||
|
||||
$userId = Auth::user()->id;
|
||||
$array_address_book = $UserModel->selectAddresBook('UserId', $userId);
|
||||
|
||||
if(count($array_address_book) <= 0) {
|
||||
$message = 'Please complete your shipping address. <a href="user/address-book/create"> <strong> <u>click here</u> </strong></a>.';
|
||||
Session::flash('cartkeyError', $message);
|
||||
return Redirect::back();
|
||||
}
|
||||
|
||||
$shipping_address_url = "user/address-book/edit/" . $array_address_book[0]->Id;
|
||||
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user