Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proceed to Checkout is disabled if there is no billing or shipping in… #6

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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