diff --git a/app/Http/Controllers/CartController.php b/app/Http/Controllers/CartController.php index 7a30651..2476354 100644 --- a/app/Http/Controllers/CartController.php +++ b/app/Http/Controllers/CartController.php @@ -19,7 +19,9 @@ public function index() $total += $product->price * $cartItems[$product->id]['quantity']; } - return view('cart.index', compact('cartItems', 'products', 'total')); + $user = auth()->user(); + + return view('cart.index', compact('cartItems', 'products', 'total', 'user')); } public function add(Request $request, Product $product) diff --git a/resources/css/app.css b/resources/css/app.css index d88f19f..140b8e5 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -32,6 +32,10 @@ .btn-primary { @apply text-white bg-purple-600 py-2 px-4 rounded shadow-md hover:bg-purple-700 active:bg-purple-800 transition-colors; } + + .btn-primary:disabled { + @apply bg-gray-400 hover:bg-gray-300; + } } body { diff --git a/resources/views/cart/index.blade.php b/resources/views/cart/index.blade.php index d4b76ef..5afc1fb 100644 --- a/resources/views/cart/index.blade.php +++ b/resources/views/cart/index.blade.php @@ -66,7 +66,6 @@ class="text-purple-600 hover:text-purple-500" -
Subtotal @@ -76,12 +75,25 @@ class="text-purple-600 hover:text-purple-500" Shipping and taxes calculated at checkout.

-
- @csrf - +
+ @else +
+ +

+ To "Proceed to Checkout" you will have to update your Billing and Shipping information! +

+
+ - + @endif +