Subversion Repositories SmartDukaan

Rev

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

Rev 14517 Rev 14539
Line 20... Line 20...
20
//		Configure::load('live');
20
//		Configure::load('live');
21
		$this->apihost = Configure::read('pythonapihost');
21
		$this->apihost = Configure::read('pythonapihost');
22
	}
22
	}
23
 
23
 
24
	public function admin_index() {
24
	public function admin_index() {
25
		$page = $this->request->query('page');
25
		/*$page = $this->request->query('page');
26
		if(!isset($page)){
26
		if(!isset($page)){
27
			$page = 1;
27
			$page = 1;
28
		}
28
		}
29
		$limit = Configure::read('admindashboardlimit');
29
		$limit = Configure::read('admindashboardlimit');
30
		$params = array(
30
		$params = array(
Line 36... Line 36...
36
		);
36
		);
37
		$masterdata = $this->MasterData->find('all', $params);
37
		$masterdata = $this->MasterData->find('all', $params);
38
		$this->loadModel('Category');
38
		$this->loadModel('Category');
39
		$categories = $this->Category->find('list');
39
		$categories = $this->Category->find('list');
40
		$storemapping = Configure::read('storemapping');
40
		$storemapping = Configure::read('storemapping');
41
		$this->set(compact('masterdata','categories','page','storemapping'));
41
		$this->set(compact('masterdata','categories','page','storemapping'));*/
-
 
42
		$page = $this->request->query('page');
-
 
43
		if(!isset($page)){
-
 
44
			$page = 1;
-
 
45
		}
-
 
46
		$limit = Configure::read('admindashboardlimit');
-
 
47
		$offset = ($page - 1)*$limit;
-
 
48
		$search = '';
-
 
49
		$url = $this->apihost."Catalog/searchMaster/?search=$search&limit=$limit&offset=$offset";
-
 
50
		$response = $this->make_request($url,null);
-
 
51
		$storemapping = Configure::read('storemapping');
-
 
52
		$this->set('masterdata', $response);
-
 
53
		$this->set(compact('page','search','storemapping'));
42
	}
54
	}
43
 
55
 
44
	public function admin_edit($id = null) {
56
	public function admin_edit($id = null) {
45
		$id = (integer) $id;
57
		$id = (integer) $id;
46
		if (!$id && empty($this->data)) {
58
		if (!$id && empty($this->data)) {