Skip to content

Conversation

mandixx
Copy link

@mandixx mandixx commented Dec 19, 2022

Hey! I've blocked "Proceed to Checkout" if there is no user billing or shipping information! Have a look :)
Checkout block

@if ( !Auth::check() || Auth::user()->shippingAddress != null && Auth::user()->billingAddress != null )
<form action="{{route('cart.checkout')}}" method="post" >
@csrf
<button type="submit" class="btn-primary w-full py-3 text-lg disabled">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disabled class is applied even when all checks are okay

Proceed to Checkout
</button>
</form>
@endif

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

closing form tag is missing

@if ( !Auth::check() || Auth::user()->shippingAddress != null && Auth::user()->billingAddress != null )
<form action="{{route('cart.checkout')}}" method="post" >
@csrf
<button type="submit" class="btn-primary w-full py-3 text-lg disabled">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

referring to this line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants