public static function addtoNewsLetterSubscriptionList($email = '')
 {
     global $tableprefix;
     if (!empty($email)) {
         // Check email address exists in subscribers list
         $resCat = DbHelper::execute("SELECT nId FROM " . $tableprefix . "newsletter_subscribers WHERE vEmail ='" . mysql_real_escape_string($email) . "' ");
         $data = DbHelper::fetchOne($resCat);
         // If alraedy exists return false
         if ($data) {
             $emailSubscribed = 'exists';
         } else {
             // Insert Email id to subscriberlist
             $resInsert = DbHelper::execute("INSERT INTO " . $tableprefix . "newsletter_subscribers\n                                                (vEmail)VALUES('" . mysql_real_escape_string($email) . "')");
             $constantcontactSettings = getconstantcontactSettings();
             $_SESSION['constantaction'] = 'Add Email';
             $userinfo = array();
             $userinfo['emailAddress'] = mysql_real_escape_string($email);
             $userinfo['firstName'] = '';
             $userinfo['lastName'] = '';
             $userinfo['lists'] = array($constantcontactSettings['constantcontactlistId']);
             $_SESSION['constantparam']['redirecturl'] = SITE_URL . '/checkout.php';
             //header("location:".$constantcontactSettings['verificationURL']);
             $emailSubscribed = 'added';
         }
         return $emailSubscribed;
     }
 }
 public static function getHelpdetailNavigationURL($helpID)
 {
     global $tableprefix;
     $navigationURL = $bindName = NULL;
     if (!empty($productID)) {
         $resSet = DbHelper::execute("SELECT htitle FROM " . $tableprefix . "help WHERE hid =" . $helpID);
         $data = DbHelper::fetchOne($resSet);
         $bindName = generalMethods::doTrimSeoNames(strtolower(stripslashes($data)));
         $navigationURL = SITE_URL . "/help/" . $bindName . "/" . $helpID;
     }
     return $navigationURL;
 }
 public static function getTaxPerByZipCode($zipCode = 0, $state = "NY")
 {
     global $tableprefix;
     $taxPercentage = 0;
     if ($state == 'NY') {
         //(t.CombinedRate + t.StateRate + t.CountyRate + t.CityRate + t.SpecialRate)
         $query = "SELECT  (t.CombinedRate) as totaltax FROM " . $tableprefix . "taxrate_ny t WHERE t.ZipCode = '" . mysql_real_escape_string($zipCode) . "'";
         $resCat = DbHelper::execute($query);
         $data = DbHelper::fetchOne($resCat);
         /*if($data == "" || $data == "0"){
               $data = 0.08875;
           }*/
         if ($data > 0) {
             $taxPercentage = number_format($data, 4, ".", "");
         }
     }
     return $taxPercentage;
 }