This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string address_fix_google_maps(string customer_address) | |
{ | |
// Define your API key and the base URL for Google Maps Places API | |
apiKey = "Your_Google_API_Key"; | |
baseUrl = "https://places.googleapis.com/v1/places:searchText"; | |
fields = "places.formattedAddress"; | |
hdrs = Map(); | |
hdrs.put("Content-Type","application/json"); | |
hdrs.put("X-Goog-Api-Key",apiKey); | |
hdrs.put("X-Goog-FieldMask",fields); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map fetchCRMleadByPhone(string phoneNumber) | |
{ | |
// Initialize the return map with default values | |
resultMap = Map(); | |
resultMap.put("found",0); | |
resultMap.put("Lead_ID",""); | |
resultMap.put("First_Name",""); | |
resultMap.put("Last_Name",""); | |
resultMap.put("Street",""); | |
resultMap.put("City",""); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map fetchCRMcontactByPhone(string phoneNumber) | |
{ | |
// Initialize the return map with default values | |
resultMap = Map(); | |
resultMap.put("found",0); | |
resultMap.put("Contact_ID",""); | |
resultMap.put("First_Name",""); | |
resultMap.put("Last_Name",""); | |
resultMap.put("Mailing_Street",""); | |
resultMap.put("Mailing_City",""); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void pushoverWithOptions(string user_key, string token, int html, string title, string msg, string sound, string url, string url_title) | |
{ | |
if(user_key = "") | |
{ | |
user = "your_pushover_user_key"; | |
} | |
else | |
{ | |
user = user_key; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener("DOMContentLoaded", function() { | |
const nameFirstInput = document.querySelector('input[name="name_first"]'); | |
const nameLastInput = document.querySelector('input[name="name_last"]'); | |
// Function to convert text to proper case | |
function toProperCase(text) { | |
return text | |
.toLowerCase() | |
.replace(/\b\w/g, function(char) { return char.toUpperCase(); }); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function getCheckoutUrl() { | |
try { | |
// Get URL params | |
const params = new URLSearchParams(window.location.search); | |
// Make the request to the PHP function | |
const response = await fetch("/php/get_checkout_url.php", { | |
method: "POST", | |
body: JSON.stringify(Object.fromEntries(params)), | |
headers: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.noShow { | |
border: 0; | |
clip: rect(0 0 0 0); | |
height: 1px; | |
margin: -1px; | |
overflow: hidden; | |
padding: 0; | |
position: absolute; | |
width: 1px; | |
} |