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