コード例 #1
0
 public function __construct()
 {
     parent::__construct();
     $this->location_level = AgileMultipleShop::getShopByLocationLevel();
     $this->id_location = AgileMultipleShop::getShopByLocationID();
     $this->custom_field = AgileMultipleShop::SHOP_BY_CUSTOM_FIELD;
 }
コード例 #2
0
ファイル: Link.php プロジェクト: sho5kubota/guidingyou2
 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);
 }