Subversion Repositories SmartDukaan

Rev

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

Rev 16363 Rev 16368
Line 451... Line 451...
451
		}
451
		}
452
		return $this->redirect(array('action' => 'index'));
452
		return $this->redirect(array('action' => 'index'));
453
	}
453
	}
454
 
454
 
455
	public function admin_genurl() {
455
	public function admin_genurl() {
-
 
456
 
-
 
457
	}
-
 
458
 
-
 
459
	public function skus($bundleIds) {
-
 
460
		$userId = $this->request->query('user_id');
-
 
461
		if(isset($userId) && !empty($userId)) {
-
 
462
			$this->loadModel('User');
-
 
463
			$dbuser = $this->User->findById($userId);
-
 
464
			$this->Auth->login($dbuser['User']);
456
		
465
		}
-
 
466
		//Fetch list of bundleIds from api
-
 
467
		$url = $this->apihost.'getDealsForNotification/'.$bundleIds;
-
 
468
		$response = $this->make_request($url,null);
-
 
469
		$deals = array();
-
 
470
		if(!empty($response)){
-
 
471
			foreach ($response as $key => $value) {
-
 
472
				if(!empty($value)){
-
 
473
					$deals[] = $value;
-
 
474
				}
-
 
475
			}
-
 
476
		}
-
 
477
		$noscrolling = true;
-
 
478
		$this->set(compact('deals','id','noscrolling'));
457
	}
479
	}
458
}
480
}