Subversion Repositories SmartDukaan

Rev

Rev 20243 | Rev 20268 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20243 Rev 20267
Line 551... Line 551...
551
	}
551
	}
552
	
552
	
553
	public function newsearch(){
553
	public function newsearch(){
554
		$q = $this->request->query('q');
554
		$q = $this->request->query('q');
555
		$this->layout = 'innerpages';
555
		$this->layout = 'innerpages';
-
 
556
		if (isset($this->request->query('page'))) {
-
 
557
			$page=	(int)($this->request->query('page'));
556
		$page =2;
558
		}else {
557
// 		$noti='[{"title": "Riviera Series J Battery For Micromax A240","id": "28750"}]';
-
 
558
// 		$result = json_decode($noti,1);
559
			$page=1;
559
 
560
		}
-
 
561
		$offset = ($page-1)*20;
560
		$url = $this->pythonapihost."dtr/solr-search!getSearchResults?search_text=".urlencode($q)."&offset=0";
562
		$url = $this->pythonapihost."dtr/solr-search!getSearchResults?search_text=".urlencode($q)."&offset=".$offset;
561
		$result = $this->make_request($url, null);
563
		$result = $this->make_request($url, null);
562
		$nexturl = "/store_products/nextsearch?page=".$page."&search_text=".urlencode($q);
564
		$nexturl = "/store_products/nextsearch?page=".$page."&search_text=".urlencode($q);
563
		$this->set(compact('result','nexturl','q'));
565
		$this->set(compact('result','nexturl','q'));
564
	}
566
	}
565
	
567