shop.balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

maxmind.php (708B)


      1 <?php
      2 class Model3rdPartyMaxmind extends Model {
      3 	public function editSetting($data) {
      4 		$this->db->query("REPLACE INTO `" . DB_PREFIX . "setting` SET `maxmind_key` = '" . $db->escape($data['fraud_maxmind_key']) . "', `maxmind_score` = '" . (int)$data['fraud_maxmind_score'] . "', `maxmind_order_status_id` = '" . (int)$data['maxmind_order_status_id'] . "' WHERE `store_id` = '0' AND `code` = 'maxmind'");
      5 
      6 		$this->db->query("INSERT INTO `oc_extension` (`type`, `code`) VALUES ('fraud', 'maxmind')");
      7 	}
      8 	
      9 	public function getOrderStatuses() {
     10 		$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_status WHERE language_id = '1' ORDER BY name ASC");
     11 		
     12 		return $query->rows;
     13 	}
     14 }