-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Integrate address autofill and guest checkou
- Loading branch information
1 parent
39c5fc8
commit 31b1223
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<div> | ||
@livewire('checkout.address_autofill') | ||
|
||
<form wire:submit.prevent="submitCheckout"> | ||
<div class="form-group"> | ||
<label for="email">Email Address</label> | ||
<input type="email" class="form-control" id="email" wire:model.defer="email" required> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<div class="custom-control custom-checkbox"> | ||
<input type="checkbox" class="custom-control-input" id="guestCheckout" wire:model="guestCheckout"> | ||
<label class="custom-control-label" for="guestCheckout">Checkout as Guest</label> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group" wire:ignore> | ||
<label for="shipping_address">Shipping Address</label> | ||
@livewire('address_autofill', key('address_autofill')) | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="paymentMethod">Payment Method</label> | ||
<select class="form-control" id="paymentMethod" wire:model.defer="paymentMethod" required> | ||
<option value="">Select a payment method</option> | ||
<option value="credit_card">Credit Card</option> | ||
<option value="paypal">PayPal</option> | ||
</select> | ||
</div> | ||
|
||
<button type="submit" class="btn btn-primary">Complete Checkout</button> | ||
</form> | ||
</div> | ||
|
||
@livewireStyles | ||
@livewireScripts |