Пример #1
0
 public function initContent()
 {
     $btmiidgws = "filterby";
     parent::initContent();
     $tpnbrkrdt = "products_nb";
     $dpfxmrmwh = "def_id_currency";
     $vzesbwi = "def_id_currency";
     ${$dpfxmrmwh} = (int) Configuration::get("PS_CURRENCY_DEFAULT");
     ${"GLOBALS"}["roxwkcvqhflj"] = "filterby";
     $fqpfpxqeh = "extraCondition";
     ${${"GLOBALS"}["mnobbzfvnp"]} = "";
     ${$btmiidgws} = Tools::getValue("agile_filterby");
     ${${"GLOBALS"}["gocvemsdbgb"]} = Tools::getValue("agile_filterval");
     if (${${"GLOBALS"}["roxwkcvqhflj"]} != "" && ${${"GLOBALS"}["gocvemsdbgb"]} != "") {
         ${"GLOBALS"}["oailbaupy"] = "extraCondition";
         ${"GLOBALS"}["pdessrponr"] = "filterval";
         $fooqqgucst = "filterby";
         $sekwzwjn = "filterval";
         $jhdbckrgnsy = "filterby";
         ${"GLOBALS"}["swoifnfpm"] = "filterby";
         ${"GLOBALS"}["cjfbvvp"] = "filterby";
         if (${$fooqqgucst} == "p.active" || ${$jhdbckrgnsy} == "po.approved" || ${${"GLOBALS"}["swoifnfpm"]} == "p.id_product") {
             ${${"GLOBALS"}["oailbaupy"]} = " AND " . ${${"GLOBALS"}["ghisjkbpjr"]} . "=" . (int) ${$sekwzwjn};
         } else {
             ${${"GLOBALS"}["mnobbzfvnp"]} = " AND " . ${${"GLOBALS"}["cjfbvvp"]} . " like '%" . ${${"GLOBALS"}["pdessrponr"]} . "%' ";
         }
     }
     $kdnvyur = "products";
     ${${"GLOBALS"}["vzoewvefm"]} = AgileSellerManager::getProducts($this->sellerinfo->id_seller, $this->context, true, $this->p, $this->n, $this->orderBy, $this->orderWay, ${${"GLOBALS"}["mnobbzfvnp"]});
     $this->pagination(${$tpnbrkrdt});
     ${"GLOBALS"}["qhyunwxg"] = "products";
     ${${"GLOBALS"}["qhyunwxg"]} = AgileSellerManager::getProducts($this->sellerinfo->id_seller, $this->context, false, $this->p, $this->n, $this->orderBy, $this->orderWay, ${$fqpfpxqeh});
     self::$smarty->assign(array("seller_tab_id" => 3, "products" => ${$kdnvyur}, "is_apprpved_required" => intval(Configuration::get("AGILE_MS_PRODUCT_APPROVAL")), "def_id_currency" => ${$vzesbwi}, "is_legacy_image" => (int) Configuration::get("PS_LEGACY_IMAGES"), "psize" => (int) Tools::getValue("n"), "pnum" => (int) Tools::getValue("p"), "agile_orderby" => $this->orderBy == "" ? "p.date_add" : $this->orderBy, "agile_orderway" => $this->orderWay == "" ? "DESC" : $this->orderWay, "agile_filterby" => Tools::getValue("agile_filterby"), "agile_filterval" => Tools::getValue("agile_filterval")));
     $this->setTemplate("sellerproducts.tpl");
 }