| Line 60... |
Line 60... |
| 60 |
$dbuser = $this->User->findById($userId);
|
60 |
$dbuser = $this->User->findById($userId);
|
| 61 |
$this->Auth->login($dbuser['User']);
|
61 |
$this->Auth->login($dbuser['User']);
|
| 62 |
}
|
62 |
}
|
| 63 |
//Get all categories
|
63 |
//Get all categories
|
| 64 |
$this->Category->Behaviors->attach('Containable');
|
64 |
$this->Category->Behaviors->attach('Containable');
|
| 65 |
$options = array('conditions'=>array('parent_id !='=>0),'contain'=>('Brand.name'));
|
65 |
$options = array('conditions'=>array('parent_id !='=>0),'contain'=>(array('Brand.name','Brand.displayed_in_preference_page')));
|
| 66 |
$categories = $this->Category->find('all',$options);
|
66 |
$categories = $this->Category->find('all',$options);
|
| 67 |
$this->User->Behaviors->attach('Containable');
|
67 |
$this->User->Behaviors->attach('Containable');
|
| 68 |
$options = array('conditions'=>array('User.id'=>$this->request->query('user_id')),'fields'=>array('User.id'),'contain'=>array('PricePreference','BrandPreference'=>array('conditions'=>array('BrandPreference.status'=>'show'))));
|
68 |
$options = array('conditions'=>array('User.id'=>$this->request->query('user_id')),'fields'=>array('User.id'),'contain'=>array('PricePreference','BrandPreference'=>array('conditions'=>array('BrandPreference.status'=>'show'))));
|
| 69 |
$user = $this->User->find('first',$options);
|
69 |
$user = $this->User->find('first',$options);
|
| 70 |
$preferredBrands = $preferredPrices = array();
|
70 |
$preferredBrands = $preferredPrices = array();
|