This commit is contained in:
franknstayn
2021-10-06 21:26:36 +08:00
parent 0e534ad723
commit eea777b544
2 changed files with 36 additions and 19 deletions

View File

@@ -587,13 +587,20 @@ 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;
$array_address_book = null;
if(!Auth::guest()){
$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);