Address Issues fixes : ps
This commit is contained in:
parent
12f278c7ee
commit
3f695542fe
@ -192,8 +192,8 @@
|
||||
<h5> Shipping Address </h5>
|
||||
</div>
|
||||
<div class="col-md-6 text-right checkbox checkbox-purple">
|
||||
<input type="checkbox" id="AddressCopiedAsShipping" />
|
||||
<label for="AddressCopiedAsShipping"> Is the above address same as the shipping address?</label>
|
||||
<input type="checkbox" id="addressCopiedAsShipping" />
|
||||
<label for="addressCopiedAsShipping"> Is the above address same as the shipping address?</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="after-add-smore">
|
||||
@ -350,7 +350,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$("#AddressCopiedAsShipping").on("change", function() {
|
||||
$("#addressCopiedAsShipping").on("change", function() {
|
||||
if ($(this).is(":checked")) {
|
||||
var customerAddress1 = $("#baddress1").val();
|
||||
var customerAddress2 = $("#baddress2").val();
|
||||
@ -432,6 +432,13 @@
|
||||
} else {
|
||||
var html = $(".after-add-smore").first().clone();
|
||||
}
|
||||
if((barray[0]['address_1'] == sarray[i]['address_1']) &&
|
||||
(barray[0]['city'] == sarray[i]['city']) &&
|
||||
(barray[0]['state'] == sarray[i]['state']) &&
|
||||
(barray[0]['country'] == sarray[i]['country']) &&
|
||||
(barray[0]['postal_code']== sarray[i]['postal_code'])){
|
||||
$("#addressCopiedAsShipping").prop("checked",true);
|
||||
}
|
||||
html.find('input#scustomer_address_id').val(sarray[i]['customer_address_id']);
|
||||
html.find('input#saddress1').val(sarray[i]['address_1']);
|
||||
html.find('input#saddress2').val(sarray[i]['address_2']);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user