| Line 24... |
Line 24... |
| 24 |
parent::beforeFilter();
|
24 |
parent::beforeFilter();
|
| 25 |
// $this->Auth->allow('bycategory','category','mine','getdeals','getliveprice','search','filter','skus');
|
25 |
// $this->Auth->allow('bycategory','category','mine','getdeals','getliveprice','search','filter','skus');
|
| 26 |
$this->Auth->allow('bycategory','category','getdeals','getliveprice');
|
26 |
$this->Auth->allow('bycategory','category','getdeals','getliveprice');
|
| 27 |
$callback = $this->request->query('callback');
|
27 |
$callback = $this->request->query('callback');
|
| 28 |
$this->livepriceurl = Configure::read('livepriceurl');
|
28 |
$this->livepriceurl = Configure::read('livepriceurl');
|
| - |
|
29 |
$this->pythonapihost = Configure::read('pythonapihost');
|
| 29 |
}
|
30 |
}
|
| 30 |
|
31 |
|
| 31 |
public function filter($type='brand',$categoryId=3){
|
32 |
public function filter($type='brand',$categoryId=3){
|
| 32 |
$url = $this->apihost.'deals/brands/?category_id='.$categoryId;
|
33 |
$url = $this->apihost.'deals/brands/?category_id='.$categoryId;
|
| 33 |
$brands = $this->make_request($url,null);
|
34 |
$brands = $this->make_request($url,null);
|
| Line 554... |
Line 555... |
| 554 |
$this->layout = 'innerpages';
|
555 |
$this->layout = 'innerpages';
|
| 555 |
$page =2;
|
556 |
$page =2;
|
| 556 |
// $noti='[{"title": "Riviera Series J Battery For Micromax A240","id": "28750"}]';
|
557 |
// $noti='[{"title": "Riviera Series J Battery For Micromax A240","id": "28750"}]';
|
| 557 |
// $result = json_decode($noti,1);
|
558 |
// $result = json_decode($noti,1);
|
| 558 |
|
559 |
|
| 559 |
$url = "http://shop2020.in:8080/dtr/solr-search!getSearchResults?search_text=".urlencode($q)."&offset=0";
|
560 |
$url = $this->pythonapihost."dtr/solr-search!getSearchResults?search_text=".urlencode($q)."&offset=0";
|
| 560 |
$result = $this->make_request($url, null);
|
561 |
$result = $this->make_request($url, null);
|
| 561 |
$nexturl = "/store_products/nextsearch?page=".$page."&search_text=".urlencode($q);
|
562 |
$nexturl = "/store_products/nextsearch?page=".$page."&search_text=".urlencode($q);
|
| 562 |
$this->set(compact('result','nexturl','q'));
|
563 |
$this->set(compact('result','nexturl','q'));
|
| 563 |
}
|
564 |
}
|
| 564 |
|
565 |
|
| Line 571... |
Line 572... |
| 571 |
}
|
572 |
}
|
| 572 |
$offset = ($page - 1)*20;
|
573 |
$offset = ($page - 1)*20;
|
| 573 |
// $noti='[{"title": "Riviera Series J Battery For Micromax A240","id": "28750"}]';
|
574 |
// $noti='[{"title": "Riviera Series J Battery For Micromax A240","id": "28750"}]';
|
| 574 |
// $result = json_decode($noti,1);
|
575 |
// $result = json_decode($noti,1);
|
| 575 |
|
576 |
|
| 576 |
$url = "http://shop2020.in:8080/dtr/solr-search!getSearchResults?search_text=".urlencode($ser)."&offset=".$offset;
|
577 |
$url = $this->pythonapihost."dtr/solr-search!getSearchResults?search_text=".urlencode($ser)."&offset=".$offset;
|
| 577 |
$result = $this->make_request($url, null);
|
578 |
$result = $this->make_request($url, null);
|
| 578 |
|
579 |
|
| 579 |
$nexturl = "/store_products/nextsearch?page=".($page+1)."&search_text=".urlencode($ser);
|
580 |
$nexturl = "/store_products/nextsearch?page=".($page+1)."&search_text=".urlencode($ser);
|
| 580 |
$this->set(compact('result','nexturl'));
|
581 |
$this->set(compact('result','nexturl'));
|
| 581 |
$this->render('/Elements/newsearchresult');
|
582 |
$this->render('/Elements/newsearchresult');
|