Url('remove', "filter"); header("Location: {$link}"); exit(); } /*if(isset($_GET['viewmode'])){ $_SESSION['product']['viewmode'] = $_GET['viewmode']; $link = $_SESSION['site']->Url('remove', "viewmode"); header("Location: {$link}"); exit(); } if(isset($_GET['productlimit'])){ $_SESSION['product']['productlimit'] = $_GET['productlimit']; $link = $_SESSION['site']->Url('remove', "productlimit"); header("Location: {$link}"); exit(); }*/ if($_SESSION['productviewmode'] == "tile") $_SESSION['product']['cont'] = ""; else $_SESSION['product']['cont'] = "row"; $cartqty = $cart->getCartProductQuantity(); if($site->suriparts[1] == "kiemelt"){ if(isset($site->suriparts[2])) $page = $site->suriparts[2]; else $page = 1; $a = new Ujlap_Product($page); $a->setReservedStock($cartqty); $pids = unserialize($site->getConfigValue('featuredProducts')); foreach($pids as $p){ $newproduct = $site->getValue('product', null, "reference = {$p} AND language = {$_SESSION['lang']} AND (deleted = 0 OR deleted IS NULL)"); if($newproduct['active'] == 1) $product[] = $newproduct; } $product = $a->sortProductManually($product, $_GET['sort']); $product = $a->getProductManually($product); $bc = " > ".$site->getLabel("Kiemelt termékek", "Általános")."" . $bc; $title = $site->getLabel("Kiemelt termékek", "Általános"); $pagerpart = 2; } elseif($site->suriparts[1] == "akcios"){ if(isset($site->suriparts[2])) $page = $site->suriparts[2]; else $page = 1; $a = new Ujlap_Product($page); $a->setReservedStock($cartqty); $product = $site->getArray('product', "isdiscount = 1 AND active = 1 AND language = {$_SESSION['lang']} AND (deleted = 0 OR deleted IS NULL)"); $product = $a->sortProductManually($product, $_GET['sort']); $product = $a->getProductManually($product); $bc = " > ".$site->getLabel("Akciós termékek", "Általános")."" . $bc; $title = $site->getLabel("Akciós termékek", "Általános"); $pagerpart = 2; } elseif($site->suriparts[1] == "ujdonsag"){ if(isset($site->suriparts[2])) $page = $site->suriparts[2]; else $page = 1; $a = new Ujlap_Product($page); $a->setReservedStock($cartqty); $product = $site->getArray('product', "language = {$_SESSION['lang']} AND (deleted = 0 OR deleted IS NULL) AND active = 1", "ID DESC", 50); $product = $a->sortProductManually($product, $_GET['sort']); $product = $a->getProductManually($product); $bc = " > ".$site->getLabel("Legújabb mobiltelefon tartozékok és mobiltelefonok", "Általános")."" . $bc; $title = $site->getLabel("Legújabb mobiltelefon tartozékok és mobiltelefonok", "Általános"); $pagerpart = 2; } elseif($site->suriparts[1] == "hasonlo"){ if(isset($site->suriparts[3])) $page = $site->suriparts[3]; else $page = 1; $prid = $site->suriparts[2]; $a = new Ujlap_Product($page); $a->setReservedStock($cartqty); $productname = $site->getValue('product', 'name', "reference = {$prid} AND language = ". $_SESSION['lang']); $similar = $site->getArray('productsimilar', "producta = {$prid} OR productb = {$prid}"); if(!empty($similar)){ unset($product); foreach($similar as $s){ if($s['producta'] == $prid) $id = $s['productb']; else $id = $s['producta']; $newproduct = $site->getValue('product', null, "active = 1 AND reference = {$id} AND language = ". $_SESSION['lang']); if(!empty($newproduct)) $product[] = $newproduct; } } $product = $a->sortProductManually($product, $_GET['sort']); $product = $a->getProductManually($product); $bc = " > ".$site->getLabel("Hasonló termékek", "Általános")." - ".$productname."" . $bc; $title = $site->getLabel("Hasonló termékek", "Általános"); $pagerpart = 3; } /*elseif($site->suriparts[1] == "nepszeru"){ if(isset($site->suriparts[4])) $page = $site->suriparts[4]; else $page = 1; $a = new Ujlap_Product($page); $a->setReservedStock($cartqty); //$popular = $site->getValue("popular", null, "suri='{$site->suriparts[2]}' AND language = {$_SESSION['lang']}"); $popular = $site->getValue("popular", null, "reference='{$site->suriparts[3]}' AND language = {$_SESSION['lang']}"); $searchproduct = unserialize($popular['searchproduct']); if(empty($searchproduct['search'][0])){ $product = $a->getProduct(array('popular' => $popular['ID']), null, $_GET['sort']); }else{ $select = $site->db->select() ->from('product') ->where("language = '{$_SESSION['lang']}'") ->where("active = 1"); //$where = array("language = '{$_SESSION['lang']}'", "active = 1"); foreach($searchproduct['search'] as $s){ $whereand = array(); $kw = explode(' ', $s); foreach($kw as $word) $whereand[] = "product.search LIKE '%{$word}%'"; $whereor[] = '(' . implode(' AND ', $whereand) . ')'; } $select->where(implode(' OR ', $whereor)); if($_SESSION['user']->usertype == 2){ if($_GET['sort'] == 'priceasc') $select->order("price2 ASC"); if($_GET['sort'] == 'pricedesc') $select->order("price2 DESC"); } if($_SESSION['user']->usertype == 3){ if($_GET['sort'] == 'priceasc') $select->order("price3 ASC"); if($_GET['sort'] == 'pricedesc') $select->order("price3 DESC"); } else{ if($_GET['sort'] == 'priceasc') $select->order("price ASC"); if($_GET['sort'] == 'pricedesc') $select->order("price DESC"); } if($_GET['sort'] == 'nameasc') $select->order("name ASC"); if($_GET['sort'] == 'namedesc') $select->order("name DESC"); if($_GET['sort'] == 'newest') $select->order("invmodified DESC"); $result = $site->db->query($select); while($v = $result->fetch(Zend_Db::FETCH_ASSOC)){ if(empty($product[$v['ID']])) $product[$v['ID']] = $v; } $product = $a->getProductManually($product); } }*/ else{ //if($_SESSION['dev']) var_dump($site->page['param']); if(empty($site->page['param'])){ if(isset($site->suriparts[3])) $page = $site->suriparts[3]; else $page = 1; $reference = $site->suriparts[2]; $pagerpart = 3; }else{ if(isset($site->suriparts[1])) $page = $site->suriparts[1]; else $page = 1; $reference = $site->getValue("category", "reference", "ID = {$site->page['param']}"); $pagerpart = 1; } $category = $site->getValue("category", null, "reference='{$reference}' AND language = {$_SESSION['lang']}"); $a = new Ujlap_Product($page); $a->setReservedStock($cartqty); //$product = $a->getProduct(array('category' => $category['ID']), null, $_SESSION['product']['sort']); $filters['category'] = $category['reference']; if($_SESSION['product']['onstock'] == 1) $filters['stock'] = 1; if($_SESSION['product']['discount'] == 1) $filters['discount'] = 1; if(isset($_GET['sort'])) $gsort = $_GET['sort']; else $gsort = null; $product = $a->getProduct($filters, null, $gsort); $categsuri = $site->getSuriByModule("categorylist"); $cat = $category; while($cat['parent'] != 0){ $bc = " > {$cat['name']}" . $bc; $cat = $site->getValue("category", null, "reference='{$cat['parent']}' AND language = {$_SESSION['lang']}"); } $bc = " > {$cat['name']}" . $bc; $title = $category['name']; }?>

Szűrés

Ár1
Ár
getTopControlHtml($_GET['sort']); /*

Fatal error: Uncaught Error: Call to a member function getTopControlHtml() on null in /var/www/clients/client1/web1/web/application/product.inc.php:219 Stack trace: #0 /var/www/clients/client1/web1/web/application/layout.base.inc.php(522): include() #1 /var/www/clients/client1/web1/web/application/bootstrap.php(486): include('...') #2 /var/www/clients/client1/web1/web/query.php(15): require_once('...') #3 {main} thrown in /var/www/clients/client1/web1/web/application/product.inc.php on line 219