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