Skip to content

Commit

Permalink
feat: Integrate address autofill and guest checkou
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] committed Mar 11, 2024
1 parent 39c5fc8 commit 31b1223
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions resources/views/checkout/checkout.blade.php
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

0 comments on commit 31b1223

Please sign in to comment.