Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?


Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site

 All Forums
 Technical
 Tips and Tricks - HALL OF FAME
 Address verification - smarty streets code
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author  Topic 
Page: of 2

papawj
New Member

USA
54 Posts

Posted - 01/14/2020 :  09:56:59  
Yes, I have included the updated code you provided. seems pretty straight forward so not sure why it's not working on the ipad/iphone.

dbdave
ECT Moderator

USA
8797 Posts

Posted - 01/14/2020 :  13:07:52  
Hi, I did get your message and looked at the site.
The zip is not filling in when an address is selected from the drop down.
I looked at the source of the page and you have the old code still.
If that site is on 7.1.7 then you need the changes I posted.
Below, I have the entire code, so use that, but fill in your keys.

<script src="//d79i1fxsrar4t.cloudfront.net/jquery.liveaddress/5.1/jquery.liveaddress.min.js"></script>
<script>
window.onload = onPageLoad();
$("input.shipdiff").click(function() {
verifychange($("#shipdiff").val());
});
function onPageLoad() {
verifychange($("#shipdiff").val());
}
function verifychange(obj) {
if (obj==1){
document.getElementById("scountry").value = 1;
checkoutspan('s');
var ss = jQuery.LiveAddress({
key: 'YOUR_WEBSITE_KEY_HERE',
verifySecondary: true,
debug: false,
autocomplete: 7,
submitVerify: false,
target: "US",
addresses: [{
address1: "#address",
address2: "#address2",
locality: "#city",
administrative_area: "#state",
postal_code: "#zip",
country: "#country"
}, {
address1: "#saddress",
address2: "#saddress2",
locality: "#scity",
administrative_area: "#sstate",
postal_code: "#szip"
}]
});
}else{
var ss = jQuery.LiveAddress({
key: 'YOUR_WEBSITE_KEY_HERE',
verifySecondary: true,
debug: false,
autocomplete: 7,
submitVerify: false,
target: "US",
addresses: [{
address1: "#address",
address2: "#address2",
locality: "#city",
administrative_area: "#state",
postal_code: "#zip",
country: "#country"
}]
});
} }


I also see this error -
quote:
The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.


This can cause all sorts of problems, so you need to be declaring a character set on your pages.

Thanks,
David

papawj
New Member

USA
54 Posts

Posted - 01/14/2020 :  14:10:35  
Working perfectly now. Not sure how I messed that up but it's great to have a second set of eyes to set me straight. The ECT Team is AWESOME!!! Many Thanks.
Page: of 2  Topic   
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2020 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000