Subversion Repositories SmartDukaan

Rev

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

Rev 18115 Rev 18184
Line 116... Line 116...
116
 * @throws NotFoundException
116
 * @throws NotFoundException
117
 * @param string $id
117
 * @param string $id
118
 * @return void
118
 * @return void
119
 */
119
 */
120
	public function view($id = null) {
120
	public function view($id = null) {
121
		$searchableSubCategories = array('20', '8^20^15');
121
		$searchableSubCategories = array();
122
		$userId = $this->request->query('user_id');
122
		$userId = $this->request->query('user_id');
123
		
123
		
124
		if(isset($userId) && !empty($userId)) {
124
		if(isset($userId) && !empty($userId)) {
125
			$this->loadModel('User');
125
			$this->loadModel('User');
126
			$dbuser = $this->User->findById($userId);
126
			$dbuser = $this->User->findById($userId);
Line 189... Line 189...
189
				}
189
				}
190
				if(!empty($subcategorieschosen) && empty($brandschosen)){
190
				if(!empty($subcategorieschosen) && empty($brandschosen)){
191
					$filter = 'subcategory';
191
					$filter = 'subcategory';
192
				}
192
				}
193
			
193
			
194
				/*if(!empty($brandschosen)){
-
 
195
					$filter = 'brand';
-
 
196
				}*/
-
 
197
			
-
 
198
			$brands = str_replace(',', '^', $brandschosen);
194
			$brands = str_replace(',', '^', $brandschosen);
199
			$subcategories = str_replace(',', '^', $subcategorieschosen);
195
			$subcategories = str_replace(',', '^', $subcategorieschosen);
200
			$url = $this->getDealsApiUrl($page,$this->Auth->User('id'),$id,$sort,$direction,$filter,$brands,$subcategories);
196
			$url = $this->getDealsApiUrl($page,$this->Auth->User('id'),$id,$sort,$direction,$filter,$brands,$subcategories);
201
			// $url = $this->apihost.'deals/'.$this->Auth->User('id').'?categoryId='.$id;
197
			// $url = $this->apihost.'deals/'.$this->Auth->User('id').'?categoryId='.$id;
202
			$response = $this->make_request($url,null);
198
			$response = $this->make_request($url,null);