Example #1
0
 public static function get_current_customer_type_id()
 {
     if (isset($_GET['customer_type_id'])) {
         return (int) $_GET['customer_type_id'];
     }
     if (!self::$checking_customer_type && isset($_REQUEST['customer_id']) && (int) $_REQUEST['customer_id'] > 0) {
         self::$checking_customer_type = true;
         $temp_customer_type_check = self::get_customer($_REQUEST['customer_id'], false, true);
         self::$checking_customer_type = false;
         if (isset($temp_customer_type_check['customer_type_id'])) {
             return $temp_customer_type_check['customer_type_id'];
         }
     }
     return 0;
     // default 0 is customer
 }