Example #1
0
 $paymeth = $myrowo["payment_method"];
 $billing_country_id = find_country_id($myrowo["billing_country"]);
 $delivery_country_id = find_country_id($myrowo["delivery_country"]);
 // Don't show local country in address
 if (CUST_COUNTRY == 0) {
     if ($billing_country_id == STORE_COUNTRY) {
         $myrowo["billing_country"] = '';
     }
     if ($delivery_country_id == STORE_COUNTRY) {
         $myrowo["delivery_country"] = '';
     }
 }
 // Replace state name with state code
 if (CUST_STATE == 1) {
     $myrowo["billing_state"] = get_state_code($myrowo["billing_state"], $billing_country_id);
     $myrowo["delivery_state"] = get_state_code($myrowo["delivery_state"], $delivery_country_id);
 }
 // Remove invalid company names
 $invalid = array("none", "n/a", "na", "None", "N/A", "NA");
 $myrowo["billing_company"] = str_replace($invalid, "", $myrowo["billing_company"]);
 $myrowo["delivery_company"] = str_replace($invalid, "", $myrowo["delivery_company"]);
 $billing_company = $myrowo["billing_company"];
 // Consolidate customer's addresses to 3 lines for old versions of QB
 if (QBI_QB_VER != "2003") {
     if (strlen($myrowo["billing_company"]) > 0) {
         $myrowo["billing_name"] = $myrowo["billing_name"] . ", " . $myrowo["billing_company"];
         $myrowo["billing_company"] = '';
     }
     if (strlen($myrowo["billing_country"]) > 0) {
         $myrowo["billing_postcode"] = $myrowo["billing_postcode"] . " " . $myrowo["billing_country"];
         $myrowo["billing_country"] = '';
Example #2
0
     echo "Distance: {$distance}";
     print_r($userLola);
     print_r($targetLola);
 }
 $smarty->assign('targetLocation', $targetLocation['city']);
 $smarty->assign('targetCity', $targetLocation['city']);
 $smarty->assign('targetState', $targetLocation['state']);
 if ($targetLocation['country'] == "United States") {
     $smarty->assign('targetStateCode', get_state_code($targetLocation['state']));
 }
 $smarty->assign('targetCountry', $targetLocation['country']);
 $smarty->assign('targetCountryCode', get_country_code($targetLocation['country']));
 if ($_POST['apptab_location'] == NULL) {
     $smarty->assign('userCity', $userLocation['city']);
     $smarty->assign('userState', $userLocation['state']);
     $smarty->assign('userStateCode', get_state_code($userLocation['state']));
     $smarty->assign('userCountry', $userLocation['country']);
     $smarty->assign('userCountryCode', get_country_code($userLocation['country']));
 } else {
     $smarty->assign('userCity', $userLola[2]);
     $smarty->assign('userState', $userLocation['state']);
     $smarty->assign('userStateCode', $userLola[3]);
     $smarty->assign('userCountry', $userLola[4]);
     $smarty->assign('userCountryCode', get_country_code($userLola[4]));
 }
 if ($distance > 2 * $radius) {
     $nearby = 0;
     // Get origin codes
     $orig_codes = array();
     $orig_info = false;
     if ($userLocation != NULL) {