<label> <input type="checkbox" class="same-as-shipping" name="checkout[billing_address][same_as_shipping]" <?php if ($cart->billingSameAsShipping()) { echo 'checked'; } ?> > Same as shipping address </label> </div> </div> <?php } ?> <?php if ($existing_addresses = \Shop\Models\CustomerAddresses::fetchForId($cart->user_id)) { ?> <div class="form-group existing-address"> <label>Use an existing address or provide a new one below.</label> <select name="checkout[billing_address][id]" class="form-control select-address"> <option class="new-address" value="">-- New Address --</option> <?php foreach ($existing_addresses as $address) { ?> <option <?php if ($cart->{'checkout.billing_address.id'} == (string) $address->id) { echo "selected"; } ?> value="<?php echo $address->id;
<label> <input type="checkbox" class="same-as-shipping" name="checkout[billing_address][same_as_shipping]" <?php if ($cart->billingSameAsShipping()) { echo 'checked'; } ?> > Same as shipping address </label> </div> </div> <?php } ?> <?php if ($existing_addresses = \Shop\Models\CustomerAddresses::fetch()) { ?> <div class="form-group existing-address"> <label>Use an existing address or provide a new one below.</label> <select name="checkout[billing_address][id]" class="form-control select-address"> <option class="new-address" value="">-- New Address --</option> <?php foreach ($existing_addresses as $address) { ?> <option <?php if ($cart->{'checkout.billing_address.id'} == (string) $address->id) { echo "selected"; } ?> value="<?php echo $address->id;