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 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"))); }
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; } }
public function hookDisplayCustomerAccountForm($params) { ${"GLOBALS"}["bohgqxpnpym"] = "pname"; ${"GLOBALS"}["pfyvjxxg"] = "pname"; $tryaicefkyx = "pname"; global $smarty, $cookie, $link; if (!$this->active) { return; } ${${"GLOBALS"}["pfyvjxxg"]} = AgileHelper::getPageName(); if (${${"GLOBALS"}["bohgqxpnpym"]} == "orderopc.php" or ${$tryaicefkyx} == "order-opc.php") { return; } if (intval(Configuration::get("AGILE_MS_CUSTOMER_SELLER")) != 1) { return; } $this->prepareSignupFormData(true); return $this->display($this->get_module_file(), "views/templates/hook/displaycustomeraccountform.tpl"); }
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); }
$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'));
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; } }
public function hookAgileExpressCheckout($params) { global $cookie, $cart, $smarty, $link; if (Module::isInstalled('agilemultipleseller')) { include_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/agilemultipleseller.php"; if (intval(Configuration::get('AGILE_MS_PAYMENT_MODE')) == AgileMultipleSeller::PAYMENT_MODE_BOTH) { return; } if (intval(Configuration::get('AGILE_MS_PAYMENT_MODE')) != AgileMultipleSeller::PAYMENT_MODE_STORE and count(AgileMultipleSeller::getSellersByCart($cart->id)) > 1) { return; } } if (!$this->active) { return; } if (intval(Configuration::get('AGILE_PAYPAL_EXPRESS_ENABLED')) != 1) { return; } $cms = new CMS((int) Configuration::get('PS_CONDITIONS_CMS_ID'), (int) $cookie->id_lang); $link_conditions = $link->getCMSLink($cms, $cms->link_rewrite, true); if (!strpos($link_conditions, '?')) { $link_conditions .= '?content_only=1'; } else { $link_conditions .= '&content_only=1'; } $atpage = AgileHelper::getPageName(); $back = Tools::getValue('back'); if ($atpage == "order-opc.php") { return; } if ($atpage == "authentication.php") { if (strlen($back) < 9) { return; } if (substr($back, 0, 9) != 'order.php') { return; } } if ($cart->nbProducts() == 0) { return; } if ($cart->getOrderTotal() <= 0) { return; } $agilepayoal_redirect_url = Tools::getShopDomainSsl(true, true) . __PS_BASE_URI__ . "modules/agilepaypal/redirect.php"; $agilepayoal_recurring_url = Tools::getShopDomainSsl(true, true) . __PS_BASE_URI__ . "modules/agilepaypal/subscribe.php"; if (version_compare(_PS_VERSION_, '1.5', '>=')) { $agilepayoal_redirect_url = Context::getContext()->link->getModuleLink('agilepaypal', 'redirect', array(), true); $agilepayoal_recurring_url = Context::getContext()->link->getModuleLink('agilepaypal', 'subscribe', array(), true); } if (version_compare(_PS_VERSION_, "1.5", ">=")) { Context::getContext()->controller->addJqueryPlugin("fancybox"); Context::getContext()->controller->addCSS(__PS_BASE_URI__ . "css/jquery.fancybox-1.3.4.css"); } else { Tools::addJS(__PS_BASE_URI__ . "js/jquery/jquery.fancybox-1.3.4.js"); Tools::addCSS(__PS_BASE_URI__ . "css/jquery.fancybox-1.3.4.css"); } $smarty->assign(array('link_conditions' => $link_conditions, 'agilepaypal_dir' => dirname(__FILE__) . '/', 'atpage' => $atpage, 'back' => $back, 'cycle_base' => $this->get_membership_units(), 'hideterms' => intval(Configuration::get('AGILE_PAYPAL_HIDE_TERMS')), 'sl_country' => isset($selectedCountry) ? $selectedCountry : 0, 'sl_state' => isset($selectedState) ? $selectedState : 0, 'sl_carrier' => isset($selectedCarrier) ? $selectedCarrier : 0, 'agilepayoal_redirect_url' => $agilepayoal_redirect_url, 'agilepayoal_recurring_url' => $agilepayoal_recurring_url, 'agilePaypalExpressCheckoutForm' => $this->getCheckoutForm())); return $this->display($this->get_module_file(), 'hookexpresscheckout.tpl'); }
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"); }