Subversion Repositories SmartDukaan

Rev

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

Rev 15408 Rev 15467
Line 112... Line 112...
112
		if(!empty($brandschosen)){
112
		if(!empty($brandschosen)){
113
			$filter = 'brand';
113
			$filter = 'brand';
114
		}
114
		}
115
		$brands = str_replace(',', '^', $brandschosen);
115
		$brands = str_replace(',', '^', $brandschosen);
116
		$url = $this->getDealsApiUrl($page,$this->Auth->User('id'),$id,$sort,$direction,$filter,$brands);
116
		$url = $this->getDealsApiUrl($page,$this->Auth->User('id'),$id,$sort,$direction,$filter,$brands);
117
		print $url;
-
 
118
		// $url = $this->apihost.'deals/'.$this->Auth->User('id').'?categoryId='.$id;
117
		// $url = $this->apihost.'deals/'.$this->Auth->User('id').'?categoryId='.$id;
119
		$deals = $this->make_request($url,null);
118
		$deals = $this->make_request($url,null);
120
		$this->loadModel('Api');
119
		$this->loadModel('Api');
121
		// $apideals = $this->Api->getDealsByCategory($this->Auth->User('id'),$id,$page);
120
		// $apideals = $this->Api->getDealsByCategory($this->Auth->User('id'),$id,$page);
122
		// $deals = $apideals['products'];
121
		// $deals = $apideals['products'];
Line 141... Line 140...
141
		// $brands = $this->request->query('brands');
140
		// $brands = $this->request->query('brands');
142
		$brandschosen = '';
141
		$brandschosen = '';
143
		$filter='' ;
142
		$filter='' ;
144
		$brands = str_replace(',', '^', $brandschosen);
143
		$brands = str_replace(',', '^', $brandschosen);
145
		$url = $this->getDealsApiUrl($page,$this->Auth->User('id'),$id,$sort,$direction,$filter,$brands);
144
		$url = $this->getDealsApiUrl($page,$this->Auth->User('id'),$id,$sort,$direction,$filter,$brands);
146
		print $url;
-
 
147
		$deals = $this->make_request($url,null);
145
		$deals = $this->make_request($url,null);
148
		// if (!$this->Category->exists($id)) {
146
		// if (!$this->Category->exists($id)) {
149
			// throw new NotFoundException(__('Invalid category'));
147
			// throw new NotFoundException(__('Invalid category'));
150
		// }
148
		// }
151
		$this->loadModel('Api');
149
		$this->loadModel('Api');