Subversion Repositories SmartDukaan

Rev

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

Rev 13567 Rev 13570
Line 18... Line 18...
18
	public function beforeFilter() {
18
	public function beforeFilter() {
19
		parent::beforeFilter();
19
		parent::beforeFilter();
20
		$this->Auth->allow('bycategory');
20
		$this->Auth->allow('bycategory');
21
		$callback = $this->request->query('callback');
21
		$callback = $this->request->query('callback');
22
	}
22
	}
-
 
23
 
-
 
24
	public function mine() {
-
 
25
		$this->loadModel('Api');
-
 
26
		$page = $this->request->query('page');
-
 
27
		if(!isset($page)){
-
 
28
			$page = 1;
-
 
29
		}		
-
 
30
		$title_for_layout = "Get Cashback on favourite";
-
 
31
		$description = "Get cashback on your favourite products.Mouth watering deals";
-
 
32
		$apideals = $this->Api->getDeals();
-
 
33
		$deals = $apideals['products'];
-
 
34
		$this->set(compact('page', 'title_for_layout', 'description', 'deals'));
-
 
35
		$this->render('/Pages/home');
-
 
36
	}
-
 
37
 
-
 
38
	public function getdeals() {
-
 
39
		$this->layout = 'ajax';
-
 
40
		$this->loadModel('Api');
-
 
41
		$page = $this->request->query('page');
-
 
42
		if(!isset($page)){
-
 
43
			$page = 1;
-
 
44
		}		
-
 
45
		$title_for_layout = "Get Cashback on favourite";
-
 
46
		$description = "Get cashback on your favourite products.Mouth watering deals";
-
 
47
		$apideals = $this->Api->getDeals($this->Auth->User('id'),$page);
-
 
48
		$deals = $apideals['products'];
-
 
49
		$this->set(compact('page', 'title_for_layout', 'description', 'deals'));
-
 
50
		$this->render('/Elements/deals');
-
 
51
	}	
23
/**
52
/**
24
 * index method
53
 * index method
25
 *
54
 *
26
 * @return void
55
 * @return void
27
 */
56
 */