Subversion Repositories SmartDukaan

Rev

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

Rev 16704 Rev 17174
Line 125... Line 125...
125
		// $filter = $this->request->query('filter');
125
		// $filter = $this->request->query('filter');
126
		// $brands = $this->request->query('brands');
126
		// $brands = $this->request->query('brands');
127
		if($id != 2) {
127
		if($id != 2) {
128
			//Fetch deals
128
			//Fetch deals
129
			$likedDeals = $disLikedDeals = array();
129
			$likedDeals = $disLikedDeals = array();
-
 
130
			$brandschosen = $_COOKIE['brandschosen'];
-
 
131
			if((isset($_COOKIE['old_id'])) && ($_COOKIE['old_id'] != $id))
-
 
132
			{
-
 
133
				unset($brandschosen);
-
 
134
				setcookie('brandschosen', 1, time()-1, '/');
-
 
135
			}
-
 
136
			else
-
 
137
			{
130
			$brandschosen = $_COOKIE['brandschosen'];	  	
138
				$brandschosen = $_COOKIE['brandschosen'];	  		
-
 
139
			}
-
 
140
			// $this->check_id($id);
-
 
141
			if(!isset($_COOKIE['old_id']))
-
 
142
			{
-
 
143
				setcookie('old_id',$id);	
-
 
144
			}
-
 
145
			else
-
 
146
			{
-
 
147
				// unset($_COOKIE['brandschosen']);
-
 
148
				unset($_COOKIE['old_id']);
-
 
149
				setcookie('old_id',$id);
-
 
150
			}
-
 
151
			
131
			if(!empty($brandschosen)){
152
			if(!empty($brandschosen)){
132
				$filter = 'brand';
153
				$filter = 'brand';
133
			}
154
			}
134
			$brands = str_replace(',', '^', $brandschosen);
155
			$brands = str_replace(',', '^', $brandschosen);
135
			$url = $this->getDealsApiUrl($page,$this->Auth->User('id'),$id,$sort,$direction,$filter,$brands);
156
			$url = $this->getDealsApiUrl($page,$this->Auth->User('id'),$id,$sort,$direction,$filter,$brands);