loadObject("id",$catID)){ $categoryTitle=($_lang==LANGUAGE_ENGLISH?$productCategoryObject->titleen:$productCategoryObject->title); $categoryBody=($_lang==LANGUAGE_ENGLISH?$productCategoryObject->bodyen:$productCategoryObject->body); $encodedCat=SaveSingleVar::storeurl("c=".$catID); $topsection=$productCategoryObject->toplevel; $parentCategoryID = $productCategoryObject->getCategoryParent($catID); $parentCategoryTitle = $productCategoryObject->getCategoryTitle($parentCategoryID); }else{ header("Location: /home");exit(); } $categoryTitleUrlEN=fix_cat_name_for_url($productCategoryObject->titleen); $countSubs =0; $countSubs=$productCategoryObject->getsubs($catID); if($countSubs ==0){ $wherestr=" categoryid='$catID' AND active='1' "; $wherestrFilter=" p.categoryid='$catID' AND p.active='1' "; $wherestrCount=" categoryid='$catID' AND active='1' "; $sortstr="sortorder ASC"; $sortstrFilter="p.sortorder ASC"; $sortEnabled=false; //print $_SERVER['REQUEST_URI']; //var_dump($pos); //printArray($_REQUEST); /*if (isset($_REQUEST["f_sort"]) && $_REQUEST["f_sort"]=="1" ) { $sot=""; $sortstr=" $titleFinal ASC"; $sortstrFilter="p.$titleFinal ASC"; $selectedTitle =$_string[$_lang]["ALPHAASCENDING"].", "; }*/ if (isset($_REQUEST["orderprice"]) && $_REQUEST["orderprice"]!="" ) { switch($_REQUEST["orderprice"]){ case "f_asc": $sot="ASC"; $sortstr="price ASC"; $sortstrFilter="p.price ASC"; $selectedTitle =$_string[$_lang]["PRICEASCENDING"].", "; break; case "f_desc": $sot="DESC"; $sortstr="price DESC"; $sortstrFilter="p.price DESC"; $selectedTitle =$_string[$_lang]["PRICEDESCENDING"].", "; break; default: $sot="ASC"; $sortstr="price ASC"; $sortstrFilter="p.price ASC"; $selectedTitle =$_string[$_lang]["PRICEASCENDING"].", "; break; } } //get page if paging is enabled if(isset($_GET["page"]) && $_GET["page"]!="" && ctype_digit($_GET["page"])){ $pageNum =cleanpost($_GET["page"]); }else{ $pageNum="1"; } $rowsPerPage =PAGING_ROWSPERPAGE; //$rowsPerPage =2; //echo $pageNum; $dataProducts=array(); $dataProductsFilters=array(); $countDataProducts=0; $countDataProducts= $productObject->get_count_all($wherestrCount); if($countDataProducts > 0){ //get default rows per page //$rowsPerPage=PAGING_ROWSPERPAGE; //$rowsPerPage=2; //$rowsPerPage=3; // counting the offset $offset = ($pageNum - 1) * $rowsPerPage; // how many pages we have when using paging? $maxPage = ceil($countDataProducts/$rowsPerPage); //get data //$dataProductsFilters =& $productObject->getAllProductsFilters("p.productid,c.idchar",$wherestrFilter,"","","",$sortstrFilter);//get these for filters only $dataProductsFilters =& $productObject->getAllProductsFilters("p.productid,c.idchar",$wherestrFilter,"","","","");//get these for filters only if(!isset($_REQUEST["f_all"]) || $_REQUEST["f_all"]!="1"){ if(isset($_REQUEST["filterSubmit"]) && $_REQUEST["filterSubmit"]==PRIVATE_PAGE){ //printArray($_POST); //printArray($dataProductsFilters); //get all filters from list $countdataProductsFilter = count($dataProductsFilters); $strIDS=""; $debugStr=""; $counterPostedFilters=0; for($pp=0;$pp < $countdataProductsFilter;$pp++){ $encodedRequestedFilterID=SaveSingleVar::storeurl($dataProductsFilters[$pp]["idchar"]); //print "f_".$encodedRequestedFilterID."
"; if(isset($_REQUEST["f_".$encodedRequestedFilterID]) && $_REQUEST["f_".$encodedRequestedFilterID]=="1"){ $strIDS.=$dataProductsFilters[$pp]["productid"].","; $counterPostedFilters++; $debugStr .="f_".$encodedRequestedFilterID."=".$_REQUEST["f_".$encodedRequestedFilterID]."\n"; } } //print "str=".$strIDS."---------"; if($strIDS!=""){ $strIDS=substr($strIDS,0,-1); } if($counterPostedFilters >0){ $wherestr .=" AND productid IN ($strIDS)"; $wherestrCount .=" AND productid IN ($strIDS)"; } } } $offset = ($pageNum - 1) * $rowsPerPage; $dataProducts =& $productObject->getAllProducts("productid,categoryid,title,titleen,$teaserFinal,$subtitleFinal,topsection,image1,price,priceen,discount,stock,code,brand,$charsFinal",$wherestr,"$offset",$rowsPerPage,"",$sortstr); $countDataProducts= $productObject->get_count_all($wherestrCount); // how many pages we have when using paging? $maxPage = ceil($countDataProducts/$rowsPerPage); //print ""; //print ""; //print ""; //print ""; //print ""; }//end if $countDataProducts //Find out if this category has subcategories ***************************** END }else{ // we do have subcategories from this category, show subs //get subs $dataCategories=array(); $dataCategories=$productCategoryObject->get_all("*","active='1' AND parent='$catID'","","","","sortorder ASC"); $flasgDisplayCategories=true; } $pathStringCats=""; $pathCats=$productCategoryObject->_getCategoriesPath("category",$catID); $pathCats=array_reversed($pathCats); //reverse the arrays //printArray($pathCats); $pathStringCats=implode(" >",$pathCats); //printArray($dataProducts); ?> -
0){ $countedCategories=count($dataCategories); for($cc=0;$cc < $countedCategories;$cc++){ $urlCatTitleEnUrl=fix_cat_name_for_url($dataCategories[$cc]["titleen"]); $encodedCategoryIDList=SaveSingleVar::storeurl("c=".$dataCategories[$cc]["id"]); $titleList=stripslashes($dataCategories[$cc][$titleFinal]); $imageCategory="/_images/nophotolist.gif"; if(isset($dataCategories[$cc]["filename"]) && @file_exists(UPLOAD_DIR."tnsc_".$dataCategories[$cc]["filename"])){ $imageCategory=UPLOAD_DIR_SHOW."tnsc_".$dataCategories[$cc]["filename"]; } $countItemProducts=$productObject->get_count_all("categoryid='".$dataCategories[$cc]["id"]."'"); $itemSubCategories =$productCategoryObject->get_count_all("active='1' AND parent='".$dataCategories[$cc]["id"]."'"); ?>

$parentCategoryTitle"; }*/ //get all filters from list $countdataProductsFilter = count($dataProductsFilters); $strIDS=""; for($pp=0;$pp < $countdataProductsFilter;$pp++){ $strIDS.=$dataProductsFilters[$pp]["idchar"].","; } //print $strIDS."---------"; $strIDS=substr($strIDS,0,-1); $dataFilters=array(); $dataFilters=$productCharObject->get_all("*","id IN ($strIDS)"); ?>


0 ){ ?>
: