Subversion Repositories SmartDukaan

Rev

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

Rev 16549 Rev 16583
Line 162... Line 162...
162
			if(isset($filter) && !empty($filter)){
162
			if(isset($filter) && !empty($filter)){
163
			    $filterstr = '&filter='.$filter.'&brands='.$brands;
163
			    $filterstr = '&filter='.$filter.'&brands='.$brands;
164
		  	} 	  	
164
		  	} 	  	
165
			$this->set(compact('deals','id','likedDeals','disLikedDeals','page','sort','direction','notification','filter','brands','filterstr','brandschosen'));
165
			$this->set(compact('deals','id','likedDeals','disLikedDeals','page','sort','direction','notification','filter','brands','filterstr','brandschosen'));
166
		}else{
166
		}else{
-
 
167
			//Check for apk support of sharing
-
 
168
			$sharable = 0;
-
 
169
			if(isset($_COOKIE['shareApps']) && !empty($_COOKIE['shareApps'])) {
-
 
170
				$sharable = 1;
-
 
171
			}
167
			//Fetch app offers
172
			//Fetch app offers
168
			$this->loadModel('AppOffer');
173
			$this->loadModel('AppOffer');
169
			$this->AppOffer->recursive = -1;
174
			$this->AppOffer->recursive = -1;
170
			$options = array('conditions'=>array('offer_active'=>1,'show'=>1),'limit' => Configure::read('searchresultsperpage'),'page'=>$page);
175
			$options = array('conditions'=>array('offer_active'=>1,'show'=>1),'limit' => Configure::read('searchresultsperpage'),'page'=>$page);
171
			$this->Paginator->settings = $options;
176
			$this->Paginator->settings = $options;
172
			$this->set('appOffers', $this->Paginator->paginate('AppOffer'));
177
			$this->set('appOffers', $this->Paginator->paginate('AppOffer'));
173
			$this->set(compact('page','id'));
178
			$this->set(compact('page','id','sharable'));
174
			$this->render('viewapps');
179
			$this->render('viewapps');
175
		}
180
		}
176
	}
181
	}
177
 
182
 
178
	public function getapps($id=null){
183
	public function getapps($id=null){