public function __construct()
 {
     $id_seller_home = AgileSellerManager::get_current_logged_seller_home_category_id();
     $id_category = intval(Tools::getValue('id_category'));
     $id_parent = intval(Tools::getValue('id_parent'));
     if ($id_seller_home > 0) {
         $url2sellerhome = "./index.php?controller=AdminCategories&id_category=" . $id_seller_home . "&viewcategory&token=" . Tools::getAdminTokenLite("AdminCategories");
         if ($id_category == 0 && $id_parent == 0) {
             Tools::redirectAdmin($url2sellerhome);
         }
         if ($id_category > 0 && $id_category != $id_seller_home && !AgileHelper::isSuccessor($id_seller_home, $id_category)) {
             Tools::redirectAdmin($url2sellerhome);
         }
         if ($id_parent > 0 && $id_parent != $id_seller_home && !AgileHelper::isSuccessor($id_seller_home, $id_category)) {
             Tools::redirectAdmin($url2sellerhome);
         }
     }
     parent::__construct();
     if (Module::isInstalled('agilemultipleseller')) {
         $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));
         if (!$this->is_seller) {
             $this->bulk_actions['assignto'] = array('text' => $this->l('Assign to seller'), 'confirm' => $this->l('Assign selected items to the seller?'));
         }
     }
     if (Module::isInstalled('agilemultipleseller')) {
         $this->agilemultipleseller_list_override();
     }
 }
Esempio n. 2
0
 public function processData()
 {
     if (Module::isInstalled('agilemultipleshop') && Shop::$id_shop_owner > 0) {
         if (!Validate::isLoadedObject($this->seller)) {
             $this->errors[] = Tools::displayError('Seller does not exist');
         } elseif (!$this->seller->active) {
             self::$smarty->assign('seller', $this->seller);
         } else {
             $rewrited_url = self::$link->getAgileSellerLink((int) $this->seller->id, $this->getSellerLinkRwrite());
             $this->seller_info->description = _PS_VERSION_ > '1.5' ? Tools::nl2br($this->seller_info->description) : nl2br2($this->seller_info->description);
             self::$smarty->assign('seller', $this->seller);
             self::$smarty->assign('seller_info', $this->seller_info);
             $sellermodule = new AgileMultipleSeller();
             $conf = Configuration::getMultiple($sellermodule->getCustomFields());
             $custom_labels = $sellermodule->getCustomLabels();
             self::$smarty->assign('conf', $conf);
             self::$smarty->assign('custom_labels', $custom_labels);
             $nbProducts = $this->getProducts(NULL, NULL, NULL, $this->orderBy, $this->orderWay, true);
             $this->pagination((int) $nbProducts);
             self::$smarty->assign('nb_products', (int) $nbProducts);
             $seller_products = $this->getProducts((int) self::$cookie->id_lang, (int) $this->p, (int) $this->n, $this->orderBy, $this->orderWay);
             AgileHelper::AssignProductImgs($seller_products);
             $si_1531_later = version_compare(_PS_VERSION_, '1.5.3.1', ">=");
             $HOOK_SELLER_RATINGS = '';
             if (Module::isInstalled('agilesellerratings')) {
                 require_once _PS_ROOT_DIR_ . "/modules/agilesellerratings/agilesellerratings.php";
                 $rmodule = new AgileSellerRatings();
                 $HOOK_SELLER_RATINGS = $rmodule->getAverageRating($this->id_seller, AgileSellerRatings::RATING_TYPE_SELLER);
             }
             self::$smarty->assign(array('products' => (isset($seller_products) and $seller_products) ? $seller_products : NULL, 'id_seller' => (int) $this->seller->id, 'path' => $this->seller_info->company, 'agilesellerproducts_tpl' => _PS_ROOT_DIR_ . "/modules/agilesellerproducts/", 'agilemultipleshop_tpl' => _PS_ROOT_DIR_ . "/modules/agilemultipleshop/", 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), 'categorySize' => Image::getSize($si_1531_later ? ImageType::getFormatedName('category') : 'category'), 'mediumSize' => Image::getSize($si_1531_later ? ImageType::getFormatedName('medium') : 'medium'), 'thumbSceneSize' => Image::getSize($si_1531_later ? ImageType::getFormatedName('thumb_scene') : 'thumb_scene'), 'homeSize' => Image::getSize($si_1531_later ? ImageType::getFormatedName('home') : 'home'), 'HOOK_SELLER_RATINGS' => $HOOK_SELLER_RATINGS, 'page_name' => 'agileseller'));
             $ver = (int) str_replace(".", "", _PS_VERSION_);
             if ($ver <= 1430) {
             } else {
                 if ($ver <= 1451) {
                     if (isset(self::$cookie->id_customer)) {
                         self::$smarty->assign('compareProducts', CompareProduct::getCustomerCompareProducts((int) self::$cookie->id_customer));
                     } elseif (isset(self::$cookie->id_guest)) {
                         self::$smarty->assign('compareProducts', CompareProduct::getGuestCompareProducts((int) self::$cookie->id_guest));
                     }
                 } else {
                     if (isset(self::$cookie->id_compare)) {
                         self::$smarty->assign('compareProducts', CompareProduct::getCompareProducts((int) self::$cookie->id_compare));
                     }
                 }
             }
         }
         self::$smarty->assign(array('allow_oosp' => (int) Configuration::get('PS_ORDER_OUT_OF_STOCK'), 'comparator_max_item' => (int) Configuration::get('PS_COMPARATOR_MAX_ITEM'), 'suppliers' => Supplier::getSuppliers()));
     }
 }
Esempio n. 3
0
 public function initContent()
 {
     $this->context->smarty->assign(array('agilemultipleseller_isinstalled' => Module::isInstalled('agilemultipleseller') ? 1 : 0, 'agilesellerlistoptions_isinstalled' => Module::isInstalled('agilesellerlistoptions') ? 1 : 0, 'id_first_available_category' => AgileHelper::GetFirstAvailableCategory()));
     if (Module::isInstalled('agilemultipleseller')) {
         require_once _PS_ROOT_DIR_ . '/modules/agilemultipleseller/agilemultipleseller.php';
         require_once _PS_ROOT_DIR_ . '/modules/agilemultipleseller/SellerInfo.php';
         $this->context->smarty->assign(array('agilemultipleseller_hook' => _PS_ROOT_DIR_ . "/modules/agilemultipleseller/views/templates/hook/", 'is_seller' => $this->is_seller, 'id_seller' => AgileSellerManager::getObjectOwnerID($this->table, Tools::getValue('id_' . $this->table)), 'sellers' => $this->is_seller ? null : AgileSellerManager::getSellersNV(true, $this->l('Public in store')), 'approveal_required' => intval(Configuration::get('AGILE_MS_PRODUCT_APPROVAL')), 'approved' => AgileMultipleSeller::is_list_approved(intval(Tools::getValue('id_product'))), 'ajx_category_url' => AgileMultipleSeller::get_agile_ajax_categories_url()));
     }
     if (Module::isInstalled('agilesellerlistoptions')) {
         require_once _PS_ROOT_DIR_ . '/modules/agilesellerlistoptions/agilesellerlistoptions.php';
         $aslo_module = new AgileSellerListOptions();
         $this->context->smarty->assign(array('agilesellerlistoptions_hook' => _PS_ROOT_DIR_ . "/modules/agilesellerlistoptions/views/templates/hook/", 'HOOK_PRODYCT_LIST_OPTIONS' => $aslo_module->hookAgileAdminProductsFormTop(array('for_front' => 0, 'id_product' => Tools::getValue('id_' . $this->table)), $this->is_seller)));
     }
     parent::initContent();
 }
Esempio n. 4
0
 public function duplicate()
 {
     $duplication = parent::duplicate();
     if (!$duplication || !Validate::isLoadedObject($duplication['cart'])) {
         return $duplication;
     }
     $pagename = AgileHelper::getPageName();
     if (($pagename == 'order.php' || $pagename == 'order-opc.php' || $pagename == 'orderopc.php') && Tools::isSubmit('submitReorder') && ($id_order = (int) Tools::getValue('id_order')) && Module::isInstalled('agilesellerlistoptions')) {
         include_once _PS_ROOT_DIR_ . "/modules/agilesellerlistoptions/agilesellerlistoptions.php";
         if (method_exists('AgileSellerListOptions', 'ExpiredProductNbrInOrder')) {
             if (AgileSellerListOptions::ExpiredProductNbrInOrder($id_order)) {
                 $duplication['success'] = false;
             }
         }
     }
     return $duplication;
 }
 public function processData()
 {
     $nbProducts = $this->getProducts(NULL, NULL, NULL, $this->orderBy, $this->orderWay, true);
     $this->pagination((int) $nbProducts);
     self::$smarty->assign('nb_products', (int) $nbProducts);
     $seller_products = $this->getProducts((int) self::$cookie->id_lang, (int) $this->p, (int) $this->n, $this->orderBy, $this->orderWay);
     AgileHelper::AssignProductImgs($seller_products);
     $si_1531_later = version_compare(_PS_VERSION_, '1.5.3.1', ">=");
     include_once _PS_ROOT_DIR_ . "/modules/agilemultipleshop/agilemultipleshop.php";
     $module = new AgileMultipleShop();
     self::$smarty->assign(array('products' => (isset($seller_products) and $seller_products) ? $seller_products : NULL, 'id_location' => $this->id_location, 'agilesellerproducts_tpl' => _PS_ROOT_DIR_ . '/modules/' . (_PS_VERSION_ > '1.5' ? 'agilemultipleshop' : 'agilesellerproducts') . '/', 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), 'categorySize' => Image::getSize($si_1531_later ? ImageType::getFormatedName('category') : 'category'), 'mediumSize' => Image::getSize($si_1531_later ? ImageType::getFormatedName('medium') : 'medium'), 'thumbSceneSize' => Image::getSize($si_1531_later ? ImageType::getFormatedName('thumb_scene') : 'thumb_scene'), 'homeSize' => Image::getSize($si_1531_later ? ImageType::getFormatedName('home') : 'home'), 'path' => $module->getL('Shop By Location')));
     $ver = (int) str_replace(".", "", _PS_VERSION_);
     if (isset(self::$cookie->id_compare)) {
         self::$smarty->assign('compareProducts', CompareProduct::getCompareProducts((int) self::$cookie->id_compare));
     }
     self::$smarty->assign(array('seller_locations4page' => agilemultipleshop::getLocationListNV($this->location_level), 'location_level4page' => $this->location_level));
     self::$smarty->assign(array('allow_oosp' => (int) Configuration::get('PS_ORDER_OUT_OF_STOCK'), 'comparator_max_item' => (int) Configuration::get('PS_COMPARATOR_MAX_ITEM')));
 }
 public function init()
 {
     $this->display_column_left = false;
     $this->display_column_right = false;
     parent::init();
     $this->sellerinfo = new SellerInfo(SellerInfo::getIdByCustomerId(self::$cookie->id_customer));
     $this->seller = new Employee($this->sellerinfo->id_seller);
     $hcjkispeef = "seller_exists";
     ${"GLOBALS"}["rdwfndiorn"] = "pagename";
     ${${"GLOBALS"}["ndbfsnbuwdpq"]} = Validate::isLoadedObject($this->seller);
     $this->isSeller = (${$hcjkispeef} and $this->seller->active);
     ${${"GLOBALS"}["rdwfndiorn"]} = AgileHelper::getPageName();
     if (!${${"GLOBALS"}["ndbfsnbuwdpq"]} && ${${"GLOBALS"}["cvseqebxgmo"]} != "sellersummary.php") {
         $this->errors[] = Tools::displayError("You do not have permission to access this page. Please conatct store administrator.");
     }
     if (Module::isInstalled("agilesellerlistoptions")) {
         include_once _PS_ROOT_DIR_ . "/modules/agilesellerlistoptions/agilesellerlistoptions.php";
         ${${"GLOBALS"}["wokgohn"]} = new AgileSellerListOptions();
         self::$smarty->assign(array("pay_options_link" => $aslmodule->getPayOptionLink($this->sellerinfo->id_seller)));
     }
     self::$smarty->assign(array("isSeller" => $this->isSeller, "seller_exists" => ${${"GLOBALS"}["ndbfsnbuwdpq"]}, "agilemultipleseller_views" => _PS_ROOT_DIR_ . "/modules/agilemultipleseller/views/", "agilemultipleseller_custom" => _PS_ROOT_DIR_ . "/modules/agilemultipleseller/custom/", "sellerinfo" => $this->sellerinfo, "seller" => $this->seller, "seller_back_office" => (int) Configuration::get("AGILE_MS_SELLER_BACK_OFFICE"), "is_seller_shipping_installed" => Module::isInstalled("agilesellershipping"), "is_seller_commission_installed" => Module::isInstalled("agilesellercommission"), "is_seller_messenger_installed" => Module::isInstalled("agilesellermessenger"), "is_seller_ratings_installed" => Module::isInstalled("agilesellerratings"), "is_multiple_shop_installed" => Module::isInstalled("agilemultipleshop"), "is_seller_listoptions_installed" => Module::isInstalled("agilesellerlistoptions"), "is_agileprepaidcredit_installed" => Module::isInstalled("agileprepaidcredit"), "sellertoken" => Tools::encrypt("ams_seller") . ($this->isSeller ? $this->seller->passwd : ""), "admin_folder_name" => Configuration::get("AGILE_MS_ADMIN_FOLDER_NAME"), "selleremail" => $this->seller ? $this->seller->email : "", "ajaxurl" => _MODULE_DIR_, "seller_palenl_withleft" => (int) Configuration::get("AGILE_MS_SELLER_PANEL_WITHLEFT"), "seller_palenl_withright" => (int) Configuration::get("AGILE_MS_SELLER_PANEL_WITHRIGHT"), "is_seller_pickupcenter_installed" => Module::isInstalled("agilepickupcenter")));
 }
Esempio n. 7
0
 public function getPaginationLink($type, $id_object, $nb = false, $sort = false, $pagination = false, $array = false)
 {
     global $link;
     $pagename = AgileHelper::getPageName();
     if (Module::isInstalled('agilemultipleshop')) {
         require_once _PS_ROOT_DIR_ . "/modules/agilemultipleshop/agilemultipleshop.php";
         if ($pagename == "agilesellers.php") {
             $url = $this->getAgileSellersLink(Tools::getValue('filter'), NULL, Tools::getValue('loclevel'), Tools::getValue('parentid'));
             if (strpos($url, "?") === false) {
                 $url .= "?";
             }
             $seller_location = Tools::getValue('seller_location');
             if (!empty($seller_location)) {
                 $url .= "&seller_location=" . $seller_location;
             }
             $seller_type = Tools::getValue('seller_type');
             if (!empty($seller_type)) {
                 $url .= "&seller_type=" . $seller_type;
             }
             $userview = Tools::getValue('userview');
             if (!empty($userview)) {
                 $url .= "&userview=" . $userview;
             }
             $n = Tools::getValue('n');
             if (!empty($n)) {
                 $url .= "&n=" . (int) $n;
             }
             return $url;
         }
         if ($pagename == "sellerlocation.php") {
             $url = $this->getSellerLocationLink(AgileMultipleShop::getShopByLocationID(), AgileMultipleShop::getShopByLocationLevel());
             if (strpos($url, "?") === false) {
                 $url .= "?";
             }
             return $url;
         }
     }
     $fc = Tools::getValue('fc');
     $module = Tools::getValue('module');
     $controller = Tools::getValue('controller');
     if ($fc == 'module' and !empty($module) and !empty($controller) and strlen($module) > 5 && substr($module, 0, 5) == "agile") {
         $url = $this->getModuleLink($module, $controller, array(), true);
         if (strpos($url, "?") === false) {
             $url .= "?";
         }
         return $url;
     }
     if ($pagename == "sellerorders.php") {
         $url = $this->getModuleLink('agilemultipleseller', 'sellerorders', array(), true);
         if (strpos($url, "?") === false) {
             $url .= "?";
         }
         return $url;
     }
     if ($pagename == "sellerhistory.php") {
         $url = $this->getModuleLink('agilemultipleseller', 'sellerhistory', array(), true);
         if (strpos($url, "?") === false) {
             $url .= "?";
         }
         return $url;
     }
     return parent::getPaginationLink($type, $id_object, $nb, $sort, $pagination, $array);
 }
 public function hookDisplayHeader($params)
 {
     $this->context->controller->addJS(array(_PS_ROOT_DIR_ . "/modules/agilemultipleseller/js/agile_global.js"));
     if ($this->context->controller->php_self == "authentication") {
         $this->context->controller->addJS(array(_PS_ROOT_DIR_ . "/modules/agilemultipleseller/js/agile_tiny_mce.js", _PS_JS_DIR_ . "admin.js", _PS_ROOT_DIR_ . "/modules/agilemultipleseller/replica/themes/default/js/dropdown.js"));
     }
     if (version_compare(_PS_VERSION_, "1.6.0.12", ">=")) {
         $this->context->controller->addJS(array(_PS_JS_DIR_ . "admin/tinymce.inc.js"));
     } else {
         $this->context->controller->addJS(array(_PS_JS_DIR_ . "tinymce.inc.js"));
     }
     if ($this->context->controller->php_self != "index") {
         $this->context->controller->addCSS($this->_path . "css/agileglobal.css", "all");
         $this->context->controller->addCSS($this->_path . "css/agilemultipleseller.css", "all");
     }
     if (!empty($this->context->cookie->viewed)) {
         ${"GLOBALS"}["ophcsjdjb"] = "agile_filters";
         $bxvdpxms = "viewed";
         $ynwxxxwoev = "agile_filters";
         ${$ynwxxxwoev} = AgileSellerManager::getAdditionalSqlForProducts("p");
         ${${"GLOBALS"}["fajsjwqsq"]} = "SELECT distinct p.id_product \n\t\t\t\t\tFROM " . _DB_PREFIX_ . "product p\n\t\t\t\t\t" . ${${"GLOBALS"}["cugibujlwfkn"]}["joins"] . "\n\t\t\t        WHERE p.id_product IN (" . $this->context->cookie->viewed . ")\n\t\t\t\t\t" . ${${"GLOBALS"}["ophcsjdjb"]}["wheres"] . "\n                ";
         ${"GLOBALS"}["bwrbpeaerkw"] = "viewed";
         ${$bxvdpxms} = Db::getInstance()->ExecuteS(${${"GLOBALS"}["fajsjwqsq"]});
         $uxbjomkm = "viewed";
         if (!empty(${$uxbjomkm})) {
             $this->context->cookie->viewed = implode(",", AgileHelper::retrieve_column_values(${${"GLOBALS"}["bwrbpeaerkw"]}, "id_product", false));
         } else {
             $this->context->cookie->viewed = "";
         }
     }
 }
Esempio n. 9
0
 public function processData()
 {
     if (Module::isInstalled('agilemultipleshop') && Shop::$id_shop_owner > 0) {
         if (!Validate::isLoadedObject($this->seller)) {
             $this->errors[] = Tools::displayError('Seller does not exist');
         } elseif (!$this->seller->active) {
             self::$smarty->assign('seller', $this->seller);
         } else {
             $rewrited_url = self::$link->getAgileSellerLink((int) $this->seller->id, $this->getSellerLinkRwrite());
             $this->seller_info->description = _PS_VERSION_ > '1.5' ? Tools::nl2br($this->seller_info->description) : nl2br2($this->seller_info->description);
             // Setting language and language level
             $language_level = explode(',', $this->seller_info->language_level);
             $language = explode(',', $this->seller_info->language);
             $language_array = array();
             for ($x = 0; $x < count($language); $x++) {
                 $language_array[] = $language[$x] . ' - ' . $language_level[$x];
             }
             $this->seller_info->language = $language_array;
             self::$smarty->assign('seller', $this->seller);
             self::$smarty->assign('seller_info', $this->seller_info);
             $imgPath = _PS_ROOT_DIR_ . DS . 'img' . DS . 'as' . DS . $this->seller_info->id_sellerinfo;
             $licenseImg = _PS_ROOT_DIR_ . DS . 'img' . DS . 'as' . DS . $this->seller_info->id_sellerinfo . '_license';
             $images = scandir($imgPath);
             unset($images[0]);
             unset($images[1]);
             $images = array_values($images);
             @($licenseDir = scandir($licenseImg));
             $licenseExist = count($licenseDir) > 2 ? 1 : 0;
             $this->seller_info->seller_images = $images;
             $sellermodule = new AgileMultipleSeller();
             $conf = Configuration::getMultiple($sellermodule->getCustomFields());
             $custom_labels = $sellermodule->getCustomLabels();
             self::$smarty->assign('conf', $conf);
             self::$smarty->assign('custom_labels', $custom_labels);
             $nbProducts = $this->getProducts(NULL, NULL, NULL, $this->orderBy, $this->orderWay, true);
             $this->pagination((int) $nbProducts);
             self::$smarty->assign('nb_products', (int) $nbProducts);
             $seller_products = $this->getProducts((int) self::$cookie->id_lang, (int) $this->p, (int) $this->n, $this->orderBy, $this->orderWay);
             AgileHelper::AssignProductImgs($seller_products);
             $si_1531_later = version_compare(_PS_VERSION_, '1.5.3.1', ">=");
             $HOOK_SELLER_RATINGS = '';
             if (Module::isInstalled('agilesellerratings')) {
                 require_once _PS_ROOT_DIR_ . "/modules/agilesellerratings/agilesellerratings.php";
                 $rmodule = new AgileSellerRatings();
                 $HOOK_SELLER_RATINGS = $rmodule->getAverageRating($this->id_seller, AgileSellerRatings::RATING_TYPE_SELLER);
             }
             /*foreach($seller_products as $k => $v) {
             			$country = $v['country'];
             			$flagId = Country::getIdByName(1, $country);
             			$seller_products[$k]['img_exist']	= file_exists(_PS_ROOT_DIR_ . DS . 'flag' . DS . 'mini'. DS . $flagId . '.jpg')? 1 : 0;
             			$seller_products[$k]['img_name']	= $flagId . '.jpg';
             		}*/
             foreach ($seller_products as $key => $value) {
                 $seller_id = $value['id_seller'];
                 $flagIds = self::getFlagsId($seller_id);
                 foreach ($flagIds as $k => $flgId) {
                     $seller_products[$key]['img_exist'][$k] = file_exists(_PS_ROOT_DIR_ . DS . 'flag' . DS . 'mini' . DS . $flgId . '.jpg') ? 1 : 0;
                     $seller_products[$key]['img_name'][$k] = $flgId . '.jpg';
                 }
             }
             // die('<pre>' . print_r($seller_products, true));
             self::$smarty->assign(array('products' => (isset($seller_products) and $seller_products) ? $seller_products : NULL, 'license_exist' => $licenseExist, 'id_seller' => (int) $this->seller->id, 'path' => $this->seller_info->company, 'agilesellerproducts_tpl' => _PS_ROOT_DIR_ . "/modules/agilesellerproducts/", 'agilemultipleshop_tpl' => _PS_ROOT_DIR_ . "/modules/agilemultipleshop/", 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), 'categorySize' => Image::getSize($si_1531_later ? ImageType::getFormatedName('category') : 'category'), 'mediumSize' => Image::getSize($si_1531_later ? ImageType::getFormatedName('medium') : 'medium'), 'thumbSceneSize' => Image::getSize($si_1531_later ? ImageType::getFormatedName('thumb_scene') : 'thumb_scene'), 'homeSize' => Image::getSize($si_1531_later ? ImageType::getFormatedName('home') : 'home'), 'HOOK_SELLER_RATINGS' => $HOOK_SELLER_RATINGS, 'page_name' => 'agileseller'));
             $ver = (int) str_replace(".", "", _PS_VERSION_);
             if ($ver <= 1430) {
             } else {
                 if ($ver <= 1451) {
                     if (isset(self::$cookie->id_customer)) {
                         self::$smarty->assign('compareProducts', CompareProduct::getCustomerCompareProducts((int) self::$cookie->id_customer));
                     } elseif (isset(self::$cookie->id_guest)) {
                         self::$smarty->assign('compareProducts', CompareProduct::getGuestCompareProducts((int) self::$cookie->id_guest));
                     }
                 } else {
                     if (isset(self::$cookie->id_compare)) {
                         self::$smarty->assign('compareProducts', CompareProduct::getCompareProducts((int) self::$cookie->id_compare));
                     }
                 }
             }
         }
         self::$smarty->assign(array('allow_oosp' => (int) Configuration::get('PS_ORDER_OUT_OF_STOCK'), 'comparator_max_item' => (int) Configuration::get('PS_COMPARATOR_MAX_ITEM'), 'suppliers' => Supplier::getSuppliers()));
     }
 }
 public function processData()
 {
     $ctauohff = "nbProducts";
     $lqphkm = "nbProducts";
     $ysyvzjxyh = "nbProducts";
     ${"GLOBALS"}["dsdvggak"] = "seller_products";
     ${$ctauohff} = $this->getProducts(NULL, NULL, NULL, $this->orderBy, $this->orderWay, true);
     ${"GLOBALS"}["wfbehuenkky"] = "si_1531_later";
     $this->pagination((int) ${$lqphkm});
     self::$smarty->assign("nb_products", (int) ${$ysyvzjxyh});
     ${${"GLOBALS"}["hjmsmx"]} = $this->getProducts((int) self::$cookie->id_lang, (int) $this->p, (int) $this->n, $this->orderBy, $this->orderWay);
     ${"GLOBALS"}["eppbsdtlhhp"] = "si_1531_later";
     AgileHelper::AssignProductImgs(${${"GLOBALS"}["dsdvggak"]});
     ${${"GLOBALS"}["fvpbxlqzzc"]} = version_compare(_PS_VERSION_, "1.5.3.1", ">=");
     include_once _PS_ROOT_DIR_ . "/modules/agilemultipleshop/agilemultipleshop.php";
     ${${"GLOBALS"}["mdcknsjm"]} = new AgileMultipleShop();
     self::$smarty->assign(array("products" => (isset(${${"GLOBALS"}["hjmsmx"]}) and ${${"GLOBALS"}["hjmsmx"]}) ? ${${"GLOBALS"}["hjmsmx"]} : NULL, "id_location" => $this->id_location, "agilesellerproducts_tpl" => _PS_ROOT_DIR_ . "/modules/" . (_PS_VERSION_ > "1.5" ? "agilemultipleshop" : "agilesellerproducts") . "/", "add_prod_display" => Configuration::get("PS_ATTRIBUTE_CATEGORY_DISPLAY"), "categorySize" => Image::getSize(${${"GLOBALS"}["wfbehuenkky"]} ? ImageType::getFormatedName("category") : "category"), "mediumSize" => Image::getSize(${${"GLOBALS"}["fvpbxlqzzc"]} ? ImageType::getFormatedName("medium") : "medium"), "thumbSceneSize" => Image::getSize(${${"GLOBALS"}["eppbsdtlhhp"]} ? ImageType::getFormatedName("thumb_scene") : "thumb_scene"), "homeSize" => Image::getSize(${${"GLOBALS"}["fvpbxlqzzc"]} ? ImageType::getFormatedName("home") : "home"), "path" => $module->getL("Shop By Location")));
     ${${"GLOBALS"}["abbgzzweqn"]} = (int) str_replace(".", "", _PS_VERSION_);
     if (isset(self::$cookie->id_compare)) {
         self::$smarty->assign("compareProducts", CompareProduct::getCompareProducts((int) self::$cookie->id_compare));
     }
     self::$smarty->assign(array("seller_locations4page" => agilemultipleshop::getLocationListNV($this->location_level), "location_level4page" => $this->location_level));
     self::$smarty->assign(array("allow_oosp" => (int) Configuration::get("PS_ORDER_OUT_OF_STOCK"), "comparator_max_item" => (int) Configuration::get("PS_COMPARATOR_MAX_ITEM")));
 }
Esempio n. 11
0
 public static function recurse_copy($src, $dst)
 {
     $sdpiuk = "dir";
     ${${"GLOBALS"}["vsvlbbqklgq"]} = opendir(${${"GLOBALS"}["hqvnfgswrf"]});
     $wxmjonizei = "file";
     @mkdir(${${"GLOBALS"}["gyhmdkecbrw"]});
     while (false !== (${$wxmjonizei} = readdir(${${"GLOBALS"}["vsvlbbqklgq"]}))) {
         $ulfjqboxz = "file";
         if (${${"GLOBALS"}["asplkuoedg"]} != "." && ${$ulfjqboxz} != "..") {
             $odxrbybnrv = "file";
             if (is_dir(${${"GLOBALS"}["hqvnfgswrf"]} . "/" . ${$odxrbybnrv})) {
                 ${"GLOBALS"}["nbgyylmlxss"] = "src";
                 ${"GLOBALS"}["rxxmjdmzu"] = "file";
                 $bbfhmrncx = "file";
                 AgileHelper::recurse_copy(${${"GLOBALS"}["nbgyylmlxss"]} . "/" . ${$bbfhmrncx}, ${${"GLOBALS"}["gyhmdkecbrw"]} . "/" . ${${"GLOBALS"}["rxxmjdmzu"]});
             } else {
                 $xlyfyjnu = "file";
                 $upbfue = "src";
                 copy(${$upbfue} . "/" . ${$xlyfyjnu}, ${${"GLOBALS"}["gyhmdkecbrw"]} . "/" . ${${"GLOBALS"}["asplkuoedg"]});
             }
         }
     }
     closedir(${$sdpiuk});
 }
 public function agileExpressCheckout($tpl_file)
 {
     global $cookie, $cart, $smarty;
     if (!$this->active) {
         return;
     }
     $countries = Country::getCountries(intval($cookie->id_lang), !$cart->isVirtualCart());
     $selectedCountry = 0;
     if (!AgileHelper::isLocalIP() && Configuration::get('PS_GEOLOCATION_ENABLED') == 1) {
         include_once _PS_GEOIP_DIR_ . 'geoipcity.inc';
         $gi = geoip_open(realpath(_PS_GEOIP_DIR_ . 'GeoLiteCity.dat'), GEOIP_STANDARD);
         $ip_addr = Tools::getRemoteAddr();
         $record = geoip_record_by_addr($gi, $ip_addr);
         $selectedCountry = (int) AgileHelper::getCountryIDbyIso($record->country_code);
     }
     if ($selectedCountry <= 0) {
         $selectedCountry = intval(Configuration::get('PS_COUNTRY_DEFAULT'));
     }
     if ($cart->id_address_delivery > 0) {
         $daddress = new Address($cart->id_address_delivery);
         $selectedCountry = $daddress->id_country;
     }
     if (isset($_POST['expresscheckout_id_country']) and intval($_POST['expresscheckout_id_country']) > 0) {
         $selectedCountry = intval($_POST['expresscheckout_id_country']);
     }
     $hasStates = isset($countries[$selectedCountry]['states']) and $countries[$selectedCountry]['contains_states'];
     $selectedState = 0;
     if ($hasStates) {
         if ($cart->id_address_delivery > 0) {
             $daddress = new Address($cart->id_address_delivery);
             if ($this->stateInList($daddress->id_state, $countries[$selectedCountry]['states'])) {
                 $selectedState = $daddress->id_state;
             }
         }
         if (isset($_POST['expresscheckout_id_state']) and intval($_POST['expresscheckout_id_state']) > 0) {
             if ($this->stateInList(intval($_POST['expresscheckout_id_state']), $countries[$selectedCountry]['states'])) {
                 $selectedState = intval($_POST['expresscheckout_id_state']);
             }
         }
     }
     $cart->id_address_delivery = $this->getShippingAddressID($selectedCountry, $selectedState);
     $cart->save();
     $selectedZoneID = $this->getZoneByStateOrCountry(isset($selectedCountry) ? $selectedCountry : 0, isset($selectedState) ? $selectedState : 0);
     $currency_cart = new Currency(intval($cart->id_currency));
     $carriers = $this->getCarriersByZoneID($selectedZoneID);
     for ($idx = 0; $idx < count($carriers); $idx++) {
         $fees = Tools::ps_round(floatval($carriers[$idx]['price']), 2);
         $carriers[$idx]['name'] = $carriers[$idx]['name'] . ' -- ' . $currency_cart->sign . ' ' . $fees;
     }
     $selectedCarrier = empty($carriers) ? 0 : $carriers[0]['id_carrier'];
     if (isset($cart->id_carrier) and intval($cart->id_carrier) > 0 and $this->carrierInList($cart->id_carrier, $carriers)) {
         $selectedCarrier = intval($cart->id_carrier);
     }
     if (isset($_POST['expresscheckout_id_carrier']) and intval($_POST['expresscheckout_id_carrier']) > 0 and $this->carrierInList($_POST['expresscheckout_id_carrier'], $carriers)) {
         $selectedCarrier = intval($_POST['expresscheckout_id_carrier']);
     }
     $cart->id_carrier = $selectedCarrier;
     $delivery_option[(int) $cart->id_address_delivery] = $selectedCarrier . ",";
     $cart->setDeliveryOption($delivery_option);
     $cart->save();
     $membership_interval = $this->get_membership_interval();
     $recurring_only = intval(Configuration::get('AGILE_PAYPAL_AM_INTEGRATED')) == 1 && intval(Configuration::get('AGILE_PAYPAL_AM_SHOW_CHOICE')) == 0 && $membership_interval != '' ? 1 : 0;
     $display_repeating = intval(Configuration::get('AGILE_PAYPAL_RECURRING_PAYMENT')) == 1 ? 1 : (intval(Configuration::get('AGILE_PAYPAL_AM_INTEGRATED')) == 1 && (intval(Configuration::get('AGILE_PAYPAL_AM_NO_MIX_PRODUCT')) == 1 || intval(Configuration::get('AGILE_PAYPAL_AM_SHOW_CHOICE')) == 1) && $membership_interval != '' ? $recurring_only == 1 ? 0 : 1 : 0);
     $smarty->assign(array('countries' => $countries, 'hasStates' => $hasStates, 'states' => $hasStates ? $countries[$selectedCountry]['states'] : '', 'carriers' => $carriers, 'agilepaypal_dir' => dirname(__FILE__) . '/', 'sl_country' => isset($selectedCountry) ? $selectedCountry : 0, 'sl_state' => isset($selectedState) ? $selectedState : 0, 'sl_carrier' => isset($selectedCarrier) ? $selectedCarrier : 0, 'cycle_base' => $this->get_membership_units(), 'membership_interval' => $this->get_membership_interval(), 'hidestates' => (!$hasStates or intval(Configuration::get('AGILE_PAYPAL_HIDE_CARRIER')) == 1) ? 1 : 0, 'hidecarrier' => intval(Configuration::get('AGILE_PAYPAL_HIDE_CARRIER')), 'recurringpayment' => intval($display_repeating), 'recurringdaily' => intval(Configuration::get('AGILE_PAYPAL_RECURRING_DAILY')) == 1 ? 1 : 0, 'recurringweekly' => intval(Configuration::get('AGILE_PAYPAL_RECURRING_WEEKLY')) == 1 ? 1 : 0, 'recurringmonthly' => intval(Configuration::get('AGILE_PAYPAL_RECURRING_MONTHLY')) == 1 ? 1 : 0, 'recurringyearly' => intval(Configuration::get('AGILE_PAYPAL_RECURRING_YEARLY')) == 1 ? 1 : 0, 'hidecountry' => intval(Configuration::get('AGILE_PAYPAL_HIDE_COUNTRY')), 'recurringOnly' => intval($recurring_only), 'displayrepeating' => intval($display_repeating)));
     return $this->display($this->get_module_file(), $tpl_file);
 }
Esempio n. 13
0
 public static function recurse_copy($src, $dst)
 {
     ${"GLOBALS"}["bvxqcxryojv"] = "dir";
     ${${"GLOBALS"}["fupbhcybbh"]} = opendir(${${"GLOBALS"}["bnwrviyextug"]});
     @mkdir(${${"GLOBALS"}["mvdykj"]});
     while (false !== (${${"GLOBALS"}["pprjedstxqr"]} = readdir(${${"GLOBALS"}["bvxqcxryojv"]}))) {
         ${"GLOBALS"}["xpwbtjnnwoef"] = "file";
         if (${${"GLOBALS"}["pprjedstxqr"]} != "." && ${${"GLOBALS"}["xpwbtjnnwoef"]} != "..") {
             ${"GLOBALS"}["cqfrgmqsnu"] = "file";
             if (is_dir(${${"GLOBALS"}["bnwrviyextug"]} . "/" . ${${"GLOBALS"}["cqfrgmqsnu"]})) {
                 ${"GLOBALS"}["vfwlxencvj"] = "src";
                 $gsafiuxs = "dst";
                 $ojqbogmmoel = "file";
                 AgileHelper::recurse_copy(${${"GLOBALS"}["vfwlxencvj"]} . "/" . ${$ojqbogmmoel}, ${$gsafiuxs} . "/" . ${${"GLOBALS"}["pprjedstxqr"]});
             } else {
                 ${"GLOBALS"}["befdpcdumhi"] = "file";
                 copy(${${"GLOBALS"}["bnwrviyextug"]} . "/" . ${${"GLOBALS"}["pprjedstxqr"]}, ${${"GLOBALS"}["mvdykj"]} . "/" . ${${"GLOBALS"}["befdpcdumhi"]});
             }
         }
     }
     ${"GLOBALS"}["uxiijmcr"] = "dir";
     closedir(${${"GLOBALS"}["uxiijmcr"]});
 }
 public function initContentForAssociations()
 {
     $vwvooilwtfmt = "sql";
     ${"GLOBALS"}["cgrvkkbvma"] = "root";
     ${"GLOBALS"}["lsrhvhqjf"] = "selected_cat";
     ${"GLOBALS"}["lknocboq"] = "helper";
     ${${"GLOBALS"}["cgrvkkbvma"]} = Category::getRootCategory();
     $szksmz = "selected_cat";
     $ifaquczty = "category_tree";
     ${"GLOBALS"}["ptiwphji"] = "category_tree";
     ${"GLOBALS"}["veloultyacp"] = "default_category";
     ${$vwvooilwtfmt} = "SELECT id_category_default FROM " . _DB_PREFIX_ . "product WHERE id_product=" . intval($this->object->id);
     ${${"GLOBALS"}["njpsstddwx"]} = intval(Db::getInstance()->getValue(${${"GLOBALS"}["vvskebgpewm"]}));
     ${"GLOBALS"}["nqufiynxn"] = "category_tree";
     if (!$this->object->id) {
         ${${"GLOBALS"}["rnirxjg"]} = Category::getCategoryInformations(Tools::getValue("categoryBox", array(${${"GLOBALS"}["veloultyacp"]})), $this->id_language);
     } else {
         if (Tools::isSubmit("categoryBox")) {
             ${${"GLOBALS"}["rnirxjg"]} = Category::getCategoryInformations(Tools::getValue("categoryBox", array(${${"GLOBALS"}["njpsstddwx"]})), $this->id_language);
         } else {
             ${${"GLOBALS"}["rnirxjg"]} = Product::getProductCategoriesFull($this->object->id, $this->id_language);
         }
     }
     ${"GLOBALS"}["mwlyyqxnvr"] = "selected_cat";
     if (!array_key_exists(${${"GLOBALS"}["njpsstddwx"]}, ${$szksmz})) {
         ${"GLOBALS"}["veixrgsr"] = "default_category";
         ${"GLOBALS"}["rjxpfcwol"] = "sql";
         $epyobpqsn = "selected_cat";
         ${${"GLOBALS"}["rjxpfcwol"]} = "SELECT id_category, name, link_rewrite, id_lang FROM " . _DB_PREFIX_ . "category_lang WHERE id_category=" . ${${"GLOBALS"}["veixrgsr"]} . " AND id_lang=" . intval($this->id_language);
         $tvjsbnwmt = "default_category";
         ${$epyobpqsn}[${$tvjsbnwmt}] = Db::getInstance()->getRow(${${"GLOBALS"}["vvskebgpewm"]});
     }
     self::$smarty->assign("feature_shop_active", Shop::isFeatureActive());
     ${${"GLOBALS"}["vppwhfouit"]} = new HelperForm();
     if ($this->object && $this->object->id) {
         $helper->id = $this->object->id;
     } else {
         $helper->id = null;
     }
     $helper->table = "product";
     $helper->identifier = "id_product";
     self::$smarty->assign("displayAssoShop", $helper->renderAssoShop());
     ${${"GLOBALS"}["doeaqcaombq"]} = Product::getAccessoriesLight($this->id_language, $this->object->id);
     if (${${"GLOBALS"}["yfkrfqnu"]} = Tools::getValue("inputAccessories")) {
         ${${"GLOBALS"}["qmhlnpccscr"]} = explode("-", Tools::getValue("inputAccessories"));
         foreach (${${"GLOBALS"}["qmhlnpccscr"]} as ${${"GLOBALS"}["vertwbyora"]}) {
             $uypybcj = "accessory";
             ${"GLOBALS"}["wuwogouethxi"] = "accessory_id";
             ${"GLOBALS"}["mkrmryb"] = "accessory";
             $rukqokdbuw = "accessories";
             if (!$this->haveThisAccessory(${${"GLOBALS"}["wuwogouethxi"]}, ${${"GLOBALS"}["doeaqcaombq"]}) && (${${"GLOBALS"}["mkrmryb"]} = Product::getAccessoryById(${${"GLOBALS"}["vertwbyora"]}))) {
                 ${$rukqokdbuw}[] = ${$uypybcj};
             }
         }
     }
     self::$smarty->assign("accessories", ${${"GLOBALS"}["doeaqcaombq"]});
     ${${"GLOBALS"}["vbwuxas"]} = array("id_category" => $root->id, "name" => $root->name);
     ${${"GLOBALS"}["lknocboq"]} = new Helper();
     ${${"GLOBALS"}["bfswydsx"]} = AgileMultipleSeller::getSpecialCatrgoryIdsArray();
     ${${"GLOBALS"}["nqufiynxn"]} = $helper->renderCategoryTree(${${"GLOBALS"}["vbwuxas"]}, ${${"GLOBALS"}["mwlyyqxnvr"]}, "categoryBox", false, true, ${${"GLOBALS"}["bfswydsx"]});
     ${${"GLOBALS"}["ptiwphji"]} = ${${"GLOBALS"}["dwiitcql"]} . "\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\$(document).ready(function(){\n\t\t\t\tbuildTreeView();\n\t\t\t});</script>\n\t\t\t";
     self::$smarty->assign(array("default_category" => ${${"GLOBALS"}["njpsstddwx"]}, "selected_cat_ids" => implode(",", array_keys(${${"GLOBALS"}["lsrhvhqjf"]})), "selected_cat" => ${${"GLOBALS"}["rnirxjg"]}, "id_category_default" => $this->object->getDefaultCategory(), "category_tree" => ${$ifaquczty}, "product" => $this->object, "agile_ms_edit_category" => Configuration::get("AGILE_MS_EDIT_CATEGORY"), "link" => $this->context->link, "id_first_available_category" => AgileHelper::GetFirstAvailableCategory(), "ajx_category_url" => AgileMultipleSeller::get_agile_ajax_categories_url()));
 }
Esempio n. 15
0
     $conf = Configuration::getMultiple($conf_keys);
     return array('shop_url_mode' => Tools::getValue('shop_url_mode', array_key_exists('ASP_SHOP_URL_MODE', $conf) ? $conf['ASP_SHOP_URL_MODE'] : ''), 'shop_login_mode' => Tools::getValue('shop_login_mode', array_key_exists('ASP_SHOP_LOGIN_MODE', $conf) ? $conf['ASP_SHOP_LOGIN_MODE'] : ''), 'header_logo_mode' => Tools::getValue('header_logo_mode', array_key_exists('ASP_HEADER_LOGO_MODE', $conf) ? $conf['ASP_HEADER_LOGO_MODE'] : ''), 'home_column_left' => Tools::getValue('home_column_left', array_key_exists('ASP_HOME_COLUMN_LEFT', $conf) ? $conf['ASP_HOME_COLUMN_LEFT'] : ''), 'home_column_right' => Tools::getValue('home_column_right', array_key_exists('ASP_HOME_COLUMN_RIGHT', $conf) ? $conf['ASP_HOME_COLUMN_RIGHT'] : ''), 'sellers_block_pos' => Tools::getValue('sellers_block_pos', array_key_exists('ASP_SELLERS_BLOCK_POSITION', $conf) ? $conf['ASP_SELLERS_BLOCK_POSITION'] : ''), 'sellerNbr' => Tools::getValue('sellerNbr', array_key_exists('ASP_SELLER_NBR', $conf) ? $conf['ASP_SELLER_NBR'] : ''), 'sellers_block_style' => Tools::getValue('sellers_block_style', array_key_exists('ASP_SELLERS_BLOCK_STYLE', $conf) ? $conf['ASP_SELLERS_BLOCK_STYLE'] : ''), 'sellers_block_virtualshop' => Tools::getValue('sellers_block_virtualshop', array_key_exists('ASP_SELLERS_BLOCK_VIRTUALSHOP', $conf) ? $conf['ASP_SELLERS_BLOCK_VIRTUALSHOP'] : ''), 'location_block_pos' => Tools::getValue('location_block_pos', array_key_exists('ASP_LOCATION_BLOCK_POSITION', $conf) ? $conf['ASP_LOCATION_BLOCK_POSITION'] : ''), 'location_block_style' => Tools::getValue('location_block_style', array_key_exists('ASP_LOCATION_BLOCK_STYLE', $conf) ? $conf['ASP_LOCATION_BLOCK_STYLE'] : ''), 'location_block_level' => Tools::getValue('location_block_level', array_key_exists('ASP_LOCATION_BLOCK_LEVEL', $conf) ? $conf['ASP_LOCATION_BLOCK_LEVEL'] : ''), 'location_block_virtualshop' => Tools::getValue('location_block_virtualshop', array_key_exists('ASP_LOCATION_BLOCK_VIRTUALSHOP', $conf) ? $conf['ASP_LOCATION_BLOCK_VIRTUALSHOP'] : ''), 'url_choice_cat' => Tools::getValue('url_choice_cat', array_key_exists('ASP_URL_CHOICE_CAT', $conf) ? $conf['ASP_URL_CHOICE_CAT'] : ''), 'url_choice_cms' => Tools::getValue('url_choice_cms', array_key_exists('ASP_URL_CHOICE_CMS', $conf) ? $conf['ASP_URL_CHOICE_CMS'] : ''));
 }
 public function hookBreadcrumbShops()
 {
     include_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/SellerInfo.php";
     $sellerinfo = new SellerInfo(SellerInfo::getIdBSellerId(Shop::$id_shop_owner), $this->context->cookie->id_lang);
     $main_shop = new Shop(Configuration::get('PS_SHOP_DEFAULT'));
Esempio n. 16
0
 public static function recurse_copy($src, $dst)
 {
     $wwooxmsjgw = "file";
     $ghfyrxpomb = "dir";
     ${$ghfyrxpomb} = opendir(${${"GLOBALS"}["hcxqytuhfym"]});
     @mkdir(${${"GLOBALS"}["cvewxy"]});
     while (false !== (${$wwooxmsjgw} = readdir(${${"GLOBALS"}["eofdnqlgvly"]}))) {
         $lbeogypigwys = "file";
         if (${${"GLOBALS"}["dfwxsup"]} != "." && ${$lbeogypigwys} != "..") {
             $lrglul = "file";
             $bowjhekg = "src";
             if (is_dir(${$bowjhekg} . "/" . ${$lrglul})) {
                 $mspfqhyt = "file";
                 $hlxuobc = "dst";
                 AgileHelper::recurse_copy(${${"GLOBALS"}["hcxqytuhfym"]} . "/" . ${${"GLOBALS"}["dfwxsup"]}, ${$hlxuobc} . "/" . ${$mspfqhyt});
             } else {
                 $kgxfxrexw = "dst";
                 $fyvnwtj = "file";
                 $oqgtklc = "file";
                 copy(${${"GLOBALS"}["hcxqytuhfym"]} . "/" . ${$oqgtklc}, ${$kgxfxrexw} . "/" . ${$fyvnwtj});
             }
         }
     }
     closedir(${${"GLOBALS"}["eofdnqlgvly"]});
 }
 public static function get_id_seller_for_filter4att()
 {
     global $cookie, $cart;
     include_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/SellerInfo.php";
     $pagename = AgileHelper::getPageName();
     switch ($pagename) {
         case 'sellerproductdetail.php':
             $sellerinfo = new SellerInfo(SellerInfo::getIdByCustomerId($cookie->id_customer));
             return $sellerinfo->id_seller;
         case 'adminproducts.php':
             if ($cookie->profile == (int) Configuration::get('AGILE_MS_PROFILE_ID')) {
                 return $cookie->id_employee;
             }
             return 0;
         default:
             return 0;
     }
 }
Esempio n. 18
0
 public static function recurse_copy($src, $dst)
 {
     $bljarwy = "dir";
     ${"GLOBALS"}["zumdjua"] = "src";
     ${"GLOBALS"}["temslgshba"] = "dir";
     ${"GLOBALS"}["xczlmze"] = "dir";
     ${"GLOBALS"}["wgdbufx"] = "file";
     ${${"GLOBALS"}["temslgshba"]} = opendir(${${"GLOBALS"}["zumdjua"]});
     @mkdir(${${"GLOBALS"}["pqiypgn"]});
     while (false !== (${${"GLOBALS"}["wgdbufx"]} = readdir(${${"GLOBALS"}["xczlmze"]}))) {
         ${"GLOBALS"}["yelngqcruvs"] = "file";
         ${"GLOBALS"}["njybri"] = "file";
         if (${${"GLOBALS"}["yelngqcruvs"]} != "." && ${${"GLOBALS"}["njybri"]} != "..") {
             if (is_dir(${${"GLOBALS"}["rzxjceraoe"]} . "/" . ${${"GLOBALS"}["vqaoufn"]})) {
                 AgileHelper::recurse_copy(${${"GLOBALS"}["rzxjceraoe"]} . "/" . ${${"GLOBALS"}["vqaoufn"]}, ${${"GLOBALS"}["pqiypgn"]} . "/" . ${${"GLOBALS"}["vqaoufn"]});
             } else {
                 $niodxxdhsgyp = "src";
                 $lsznnggugxq = "file";
                 copy(${$niodxxdhsgyp} . "/" . ${$lsznnggugxq}, ${${"GLOBALS"}["pqiypgn"]} . "/" . ${${"GLOBALS"}["vqaoufn"]});
             }
         }
     }
     closedir(${$bljarwy});
 }
 public static function get_id_seller_for_filter4att()
 {
     $cqpioouf = "sellerinfo";
     global $cookie, $cart;
     include_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/SellerInfo.php";
     ${"GLOBALS"}["oeoool"] = "pagename";
     ${${"GLOBALS"}["oeoool"]} = AgileHelper::getPageName();
     ${"GLOBALS"}["kiuuawixp"] = "pagename";
     switch (${${"GLOBALS"}["kiuuawixp"]}) {
         case "sellerproductdetail.php":
             ${$cqpioouf} = new SellerInfo(SellerInfo::getIdByCustomerId($cookie->id_customer));
             return $sellerinfo->id_seller;
         case "adminproducts.php":
             if ($cookie->profile == (int) Configuration::get("AGILE_MS_PROFILE_ID")) {
                 return $cookie->id_employee;
             }
             return 0;
         default:
             return 0;
     }
 }
Esempio n. 20
0
 public function hookBreadcrumbShops()
 {
     $himtax = "id_shop_owner";
     $ghnmwkrdne = "main_shop";
     include_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/SellerInfo.php";
     $bmsxgau = "id_shop_owner";
     ${${"GLOBALS"}["xfvfjfd"]} = new SellerInfo(SellerInfo::getIdBSellerId(Shop::${$himtax}), $this->context->cookie->id_lang);
     ${$ghnmwkrdne} = new Shop(Configuration::get("PS_SHOP_DEFAULT"));
     $this->context->smarty->assign(array("seller_shop" => Shop::${$bmsxgau} > 0 ? Context::getContext()->shop : false, "isat_seller_home" => AgileHelper::getPageName() == "agileseller.php" ? 1 : 0, "seller_name" => $sellerinfo->company, "base_dir_default" => $main_shop->getBaseURL()));
     return $this->display(__FILE__, "views/templates/hook/hookbreadcrumb-shops.tpl");
 }