Subversion Repositories SmartDukaan

Rev

Rev 15403 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15403 Rev 17946
Line 147... Line 147...
147
    public function getDealsApiUrl($page=1,$userId = null,$categoryId=0,$sort=null,$direction=null,$filter=null,$brands=null){
147
    public function getDealsApiUrl($page=1,$userId = null,$categoryId=0,$sort=null,$direction=null,$filter=null,$brands=null){
148
    	$this->log('categoryId '.$categoryId,'api');
148
    	$this->log('categoryId '.$categoryId,'api');
149
    	$this->log('page '.$page,'api');
149
    	$this->log('page '.$page,'api');
150
    	$offset = ($page - 1) * $this->limit;
150
    	$offset = ($page - 1) * $this->limit;
151
    	if(isset($sort) && !empty($sort) && $sort!=-1){
151
    	if(isset($sort) && !empty($sort) && $sort!=-1){
152
    		$url = $this->apihost.'getStaticdeals/?categoryId='.$categoryId.'&sort='.$sort.'&direction='.$direction.'&limit='.$this->limit.'&offset='.$offset;
152
    		$url = $this->apihost.'getStaticDeals/?categoryId='.$categoryId.'&sort='.$sort.'&direction='.$direction.'&limit='.$this->limit.'&offset='.$offset;
153
    	}else{
153
    	}else{
154
    		$url = $this->apihost.'getStaticdeals/?categoryId='.$categoryId.'&limit='.$this->limit.'&offset='.$offset;
154
    		$url = $this->apihost.'getStaticDeals/?categoryId='.$categoryId.'&limit='.$this->limit.'&offset='.$offset;
155
    	}    	
155
    	}    	
156
    	if(isset($filter) && !empty($filter)){
156
    	if(isset($filter) && !empty($filter)){
157
    		$url .= "&filterData=brandFilter:".$brands;
157
    		$url .= "&filterData=brandFilter:".$brands;
158
    	}
158
    	}
159
    	return $url;
159
    	return $url;