Subversion Repositories SmartDukaan

Rev

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

Rev 20010 Rev 20012
Line 414... Line 414...
414
		$page = $this->request->query('page');
414
		$page = $this->request->query('page');
415
		if(!isset($page)){
415
		if(!isset($page)){
416
			$page = 1;
416
			$page = 1;
417
		}
417
		}
418
		if($filtertype == 'below1000'){
418
		if($filtertype == 'below1000'){
419
			$url = $this->apihost."deals/".$user_id."?categoryId=".$id."&limit=20&offset=0&filterData=priceFilter:0^1000";
419
			$url = $this->apihost."deals/".$user_id."?categoryId=".$id."&limit=20&offset=0&filterData=priceFilter:0^1000&direction=1";
420
		}elseif($filtertype == 'exclusive'){
420
		}elseif($filtertype == 'exclusive'){
421
			$url = $this->apihost."getDealsByType?categoryId=".$id."&offset=0&limit=20&type=".$filtertype;
421
			$url = $this->apihost."getDealsByType?categoryId=".$id."&offset=0&limit=20&type=".$filtertype;
422
		}
422
		}
423
		
423
		
424
		$response = $this->make_request($url,null);
424
		$response = $this->make_request($url,null);
Line 452... Line 452...
452
	    
452
	    
453
		
453
		
454
		$nexturl = "/categories/getlinkdeals/".$id."?page=".($page+1)."&filtertype=".$filtertype;			
454
		$nexturl = "/categories/getlinkdeals/".$id."?page=".($page+1)."&filtertype=".$filtertype;			
455
		$offerresponse = $this->getuseroffer();
455
		$offerresponse = $this->getuseroffer();
456
		
456
		
457
		$this->set(compact('offerresponse','response_count','deals','id','likedDeals','disLikedDeals','page','nexturl'));
457
		$this->set(compact('filtertype','offerresponse','response_count','deals','id','likedDeals','disLikedDeals','page','nexturl'));
458
	}
458
	}
459
	
459
	
460
	
460
	
461
	public function getlinkdeals($id = null) {
461
	public function getlinkdeals($id = null) {
462
	
462
	
Line 471... Line 471...
471
		$limit = 20;
471
		$limit = 20;
472
		$offset = ($page - 1)*$limit;
472
		$offset = ($page - 1)*$limit;
473
		
473
		
474
		$likedDeals = $disLikedDeals = array();
474
		$likedDeals = $disLikedDeals = array();
475
		if($filtertype == 'below1000'){
475
		if($filtertype == 'below1000'){
476
			$url = $this->apihost."deals/".$user_id."?categoryId=".$id."&limit=".$limit."&offset=".$offset."&filterData=priceFilter:0^1000";
476
			$url = $this->apihost."deals/".$user_id."?categoryId=".$id."&limit=".$limit."&offset=".$offset."&filterData=priceFilter:0^1000&direction=1";
477
		}elseif($filtertype == 'exclusive'){
477
		}elseif($filtertype == 'exclusive'){
478
			$url = $this->apihost."getDealsByType?categoryId=".$id."&type=".$filtertype."&limit=".$limit."&offset=".$offset;
478
			$url = $this->apihost."getDealsByType?categoryId=".$id."&type=".$filtertype."&limit=".$limit."&offset=".$offset;
479
		}
479
		}
480
// 		$url = $this->apihost."getDealsByType?categoryId=".$id."&type=".$filtertype."&limit=".$limit."&offset=".$offset;
480
// 		$url = $this->apihost."getDealsByType?categoryId=".$id."&type=".$filtertype."&limit=".$limit."&offset=".$offset;
481
		$response = $this->make_request($url,null);
481
		$response = $this->make_request($url,null);