protected function getSellers($filter, $loclevel, $seller_location, $parentid, $seller_type, $nb_only = false, $p = 1, $n = 10)
 {
     $kkogupccdhb = "n";
     $pkeqzkyiwg = "filter";
     $vuksqrvbb = "p";
     $fmudhbweowv = "n";
     ${"GLOBALS"}["tpuyuglez"] = "filter";
     global $cookie;
     if (${${"GLOBALS"}["dnjxlkemh"]} < 1) {
         ${$vuksqrvbb} = 1;
     }
     $ngvwirzrfke = "seller_type";
     ${"GLOBALS"}["xjmyxplqv"] = "sql";
     ${"GLOBALS"}["jiccurkf"] = "idx";
     if (${$fmudhbweowv} < 1) {
         ${${"GLOBALS"}["vhsixjirton"]} = 10;
     }
     $yzmtckn = "n";
     if (strtoupper(${$pkeqzkyiwg}) == "ALL") {
         ${${"GLOBALS"}["yrvgkjhsvn"]} = "";
     }
     $cpfozsi = "filter";
     require_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/SellerInfo.php";
     ${${"GLOBALS"}["hfizsmyzc"]} = "FROM `" . _DB_PREFIX_ . "employee` e\n                     LEFT JOIN  `" . _DB_PREFIX_ . "sellerinfo` s ON e.id_employee = s.id_seller\n                     LEFT JOIN  `" . _DB_PREFIX_ . "sellerinfo_lang` sl ON s.id_sellerinfo=sl.id_sellerinfo AND sl.id_lang = " . $cookie->id_lang . "\n                     LEFT JOIN (SELECT count(*) as products,id_owner FROM " . _DB_PREFIX_ . "product_owner po1 LEFT JOIN " . _DB_PREFIX_ . "product p1 on(p1.id_product=po1.id_product) WHERE p1.active=1 GROUP BY id_owner) p ON e.id_employee=p.id_owner\n                     LEFT JOIN  `" . _DB_PREFIX_ . "country_lang` cl ON (s.id_country = cl.id_country AND cl.id_lang=" . (int) $cookie->id_lang . ")\n                     LEFT JOIN  `" . _DB_PREFIX_ . "state` st ON s.id_state = st.id_state\n                 WHERE e.active=1 \n                    AND e.id_profile = " . Configuration::get("AGILE_MS_PROFILE_ID") . "\n                 ";
     if (!empty(${$cpfozsi})) {
         ${${"GLOBALS"}["hfizsmyzc"]} = ${${"GLOBALS"}["hfizsmyzc"]} . " AND sl.company like '" . ${${"GLOBALS"}["tpuyuglez"]} . "%'";
     }
     if (${${"GLOBALS"}["dhmgqmru"]} > 0) {
         ${${"GLOBALS"}["hfizsmyzc"]} = ${${"GLOBALS"}["xjmyxplqv"]} . " AND (s.id_sellertype1 = " . ${${"GLOBALS"}["dhmgqmru"]} . " OR s.id_sellertype2 = " . ${$ngvwirzrfke} . ")";
     }
     $njsrwx = "loclevel";
     ${"GLOBALS"}["wczwhpewofs"] = "p";
     ${"GLOBALS"}["ueccovehs"] = "idx";
     if (${${"GLOBALS"}["qdayfxgyolo"]} == "country") {
         $brksdpu = "sql";
         if (!empty(${${"GLOBALS"}["fikxfqrasp"]})) {
             ${$brksdpu} = ${${"GLOBALS"}["hfizsmyzc"]} . " AND s.id_country = " . intval(${${"GLOBALS"}["fikxfqrasp"]});
         }
     } else {
         if (${${"GLOBALS"}["qdayfxgyolo"]} == "state") {
             $ptmgmprnvnq = "seller_location";
             if (${${"GLOBALS"}["inoywq"]} > 0) {
                 ${${"GLOBALS"}["hfizsmyzc"]} = ${${"GLOBALS"}["hfizsmyzc"]} . " AND s.id_country = '" . ${${"GLOBALS"}["inoywq"]} . "'";
             }
             if (!empty(${$ptmgmprnvnq})) {
                 $qstkrnbfb = "sql";
                 $rmbwgxvdm = "seller_location";
                 ${${"GLOBALS"}["hfizsmyzc"]} = ${$qstkrnbfb} . " AND s.id_state = " . intval(${$rmbwgxvdm});
             }
         } else {
             if (${$njsrwx} == "city") {
                 if (${${"GLOBALS"}["inoywq"]} > 0) {
                     ${"GLOBALS"}["defcvsfnbfjm"] = "sql";
                     ${"GLOBALS"}["uvoktmkcmfd"] = "parentid";
                     ${${"GLOBALS"}["hfizsmyzc"]} = ${${"GLOBALS"}["defcvsfnbfjm"]} . " AND s.id_state = '" . ${${"GLOBALS"}["uvoktmkcmfd"]} . "'";
                 }
                 ${"GLOBALS"}["kiofppjfwr"] = "seller_location";
                 if (!empty(${${"GLOBALS"}["kiofppjfwr"]})) {
                     $mrqmpxsh = "sql";
                     ${$mrqmpxsh} = ${${"GLOBALS"}["hfizsmyzc"]} . " AND sl.city = '" . ${${"GLOBALS"}["fikxfqrasp"]} . "'";
                 }
             }
         }
     }
     if (${${"GLOBALS"}["pukknqg"]}) {
         $hzocsdrvh = "sql0";
         $jxqxbioqh = "sql";
         ${${"GLOBALS"}["hbrwvgrewxi"]} = "SELECT COUNT(*) " . ${$jxqxbioqh};
         return Db::getInstance()->getValue(${$hzocsdrvh});
     }
     ${${"GLOBALS"}["jkdmbkvfe"]} = "SELECT s.`id_sellerinfo`, s.`id_seller`, s.`id_country`, s.`id_state`, s.`postcode`, s.`phone`, s.`fax`, s.`latitude`, s.`longitude`, s.`date_add`, s.`date_upd`, s.`id_customer`, s.`dni`, s.`id_shop`, s.`id_category_default`, s.`id_sellertype1`, s.`id_sellertype2`,\n                        cl.name as country, st.name as state, sl.*, IFNULL(p.products,0) AS products " . ${${"GLOBALS"}["hfizsmyzc"]} . "   \n                    ORDER BY sl.company ASC\n                    LIMIT " . ((int) ${${"GLOBALS"}["wczwhpewofs"]} - 1) * (int) ${$yzmtckn} . "," . (int) ${$kkogupccdhb};
     ${${"GLOBALS"}["ajztkmhlf"]} = Db::getInstance()->ExecuteS(${${"GLOBALS"}["jkdmbkvfe"]});
     for (${${"GLOBALS"}["jiccurkf"]} = 0; ${${"GLOBALS"}["ueccovehs"]} < count(${${"GLOBALS"}["ajztkmhlf"]}); ${${"GLOBALS"}["usxshxp"]}++) {
         ${"GLOBALS"}["eeicqs"] = "sellerinfos";
         $orjoeecmnc = "sellerinfos";
         ${${"GLOBALS"}["eeicqs"]}[${${"GLOBALS"}["usxshxp"]}]["seller_logo_url"] = SellerInfo::get_seller_logo_url_static_sellers(${$orjoeecmnc}[${${"GLOBALS"}["usxshxp"]}]["id_sellerinfo"]);
     }
     return ${${"GLOBALS"}["ajztkmhlf"]};
 }