| Line 89... |
Line 89... |
| 89 |
$sort = $this->request->query('sort');
|
89 |
$sort = $this->request->query('sort');
|
| 90 |
$direction = $this->request->query('direction');
|
90 |
$direction = $this->request->query('direction');
|
| 91 |
$url = $this->getDealsApiUrl($page,$this->Auth->User('id'),0,$sort,$direction);
|
91 |
$url = $this->getDealsApiUrl($page,$this->Auth->User('id'),0,$sort,$direction);
|
| 92 |
$deals = $this->make_request($url,null);
|
92 |
$deals = $this->make_request($url,null);
|
| 93 |
$myactions = $this->Api->getMyActions($this->Auth->User('id'));
|
93 |
$myactions = $this->Api->getMyActions($this->Auth->User('id'));
|
| - |
|
94 |
$liveScore = $this->Api->getLiveScore();
|
| 94 |
$this->loadModel('NotificationRule');
|
95 |
$this->loadModel('NotificationRule');
|
| 95 |
$notification = $this->NotificationRule->getNotification($this->Auth->User('id'));
|
96 |
$notification = $this->NotificationRule->getNotification($this->Auth->User('id'));
|
| 96 |
if(!empty($myactions)) {
|
97 |
if(!empty($myactions)) {
|
| 97 |
foreach ($myactions['actions'] as $key => $value) {
|
98 |
foreach ($myactions['actions'] as $key => $value) {
|
| 98 |
if($value['UserAction']['action'] == 'like'){
|
99 |
if($value['UserAction']['action'] == 'like'){
|
| Line 102... |
Line 103... |
| 102 |
}
|
103 |
}
|
| 103 |
}
|
104 |
}
|
| 104 |
}
|
105 |
}
|
| 105 |
$title_for_layout = "Get Cashback on favourite";
|
106 |
$title_for_layout = "Get Cashback on favourite";
|
| 106 |
$description = "Get cashback on your favourite products. Mouth watering deals";
|
107 |
$description = "Get cashback on your favourite products. Mouth watering deals";
|
| 107 |
$this->set(compact('page', 'title_for_layout', 'description', 'deals', 'likedDeals','disLikedDeals','sort','direction','notification'));
|
108 |
$this->set(compact('page', 'title_for_layout', 'description', 'deals', 'likedDeals','disLikedDeals','sort','direction','notification','liveScore'));
|
| 108 |
$this->render('/Pages/home');
|
109 |
$this->render('/Pages/home');
|
| 109 |
}
|
110 |
}
|
| 110 |
|
111 |
|
| 111 |
public function getdeals() {
|
112 |
public function getdeals() {
|
| 112 |
$likedDeals = $disLikedDeals = array();
|
113 |
$likedDeals = $disLikedDeals = array();
|