-
$this->att['entry'] = count($this->att['entry'])?$this->att['entry']:array($this->att['entry']);
$blockDrill = array('brand');
for($i=0;$i
- } } ?>
if(isset($this->res) && isset($this->res['totalResults']) && $this->res['totalResults'] != 0){
$entries = count($this->res['entry'])?$this->res['entry']:array($this->res['entry']);
?>
}else{ ?>
$status = 'Results';
if ($this->res['totalResults'] > 0){
$to = $this->res['startIndex']/1 + $this->res['itemsPerPage']/1 - 1;
if($to > $this->res['totalResults']/1){$to = $this->res['totalResults'];}
$status .= ' '.($this->res['startIndex']==1?$this->res['startIndex']:$this->res['startIndex']-1).' - '.$to.' of about '.number_format($this->res['totalResults']).' products';
}else{
$status .= ' 0 - 0 of about 0 products';
}
echo $status;
?>
$sorts = array(
array('n'=>'rating desc.', 'v'=>'ratings_score desc'),
array('n'=>'rating asc.', 'v'=>'ratings_score asc'),
array('n'=>'price desc.', 'v'=>'price desc'),
array('n'=>'price asc.', 'v'=>'price asc'),
array('n'=>'title desc.', 'v'=>'title_sort desc'),
array('n'=>'title asc.', 'v'=>'title_sort asc'),
array('n'=>'brand desc.', 'v'=>'brand_name_sort desc'),
array('n'=>'brand asc.', 'v'=>'brand_name_sort asc')
);
?>
Sort by:
$res = array('page'=>'', 'previousLink'=>'', 'nextLink'=>'', 'links'=>array(), 'pages'=>'', 'lastPage'=>'');
$perpage = 10;
if (isset($this->get['count'])){
$perpage = $this->get['count']/1;
}
if ($this->res['totalResults']/1 >= $perpage){
$numpages = ceil(($this->res['totalResults']/1) / $perpage);
}else{
$numpages = 1;
}
$page = ceil(($this->res['startIndex']/1)/$perpage);
$res['page'] = $page;
if (isset($page) && $page > 1){
$ppage = $page - 1;
$npage = $page + 1;
$res['previousLink'] = $this->getUrl('start_index', ($ppage*$perpage+1-$perpage), false, false);
}else{
$page = 1;
$npage = 2;
}
$res['pages'] = $numpages;
$res['lastPage'] = $this->getUrl('start_index', ($numpages*$perpage+1-$perpage), false, false);
if ($this->res['totalResults']/1 > ($this->res['startIndex']/1 + $this->res['itemsPerPage']/1)){
$res['nextLink'] = $this->getUrl('start_index', ($npage*$perpage+1-$perpage), false, false);
}
$pagelinks = 10;
$climit = round($pagelinks/2);
if(($page-4) > 0){
for($i=($page-4); $i<$page;$i++){
$res['links'][$i] = $this->getUrl('start_index', ($i*$perpage+1-$perpage), false, false);
}
}elseif($page > 1){
for($i=1; $i<$page;$i++){
$res['links'][$i] = $this->getUrl('start_index', ($i*$perpage+1-$perpage), false, false);
}
$climit = $pagelinks-$page;
}else{
$climit = $pagelinks-1;
}
$res['links'][$page] = false;
$c = 0;
if($numpages > $page){
for($i=($page+1);$i<=$numpages;$i++){
if($c < $climit){
$res['links'][$i] = $this->getUrl('start_index', ($i*$perpage+1-$perpage), false, false);
$c++;
}else{
break;
}
}
}
?>
if ($res['previousLink']){
?>Prev
}
foreach ($res['links'] as $n => $vv){
if($vv){
?>
}else{
?>
}
}
if($res['pages'] && $res['pages'] != $res['page'] && $res['pages'] != 1){
?> ... 0
}
if ($res['nextLink']){
?>Next
}
?>
}else{ ?>
Your search did not match any products.
Please undo some of the items above.