Subversion Repositories SmartDukaan

Rev

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

Rev 14098 Rev 14509
Line 55... Line 55...
55
		if (empty($this->data)) {
55
		if (empty($this->data)) {
56
			$this->data = $this->MasterData->read(null, $id);
56
			$this->data = $this->MasterData->read(null, $id);
57
			debug($this->data);
57
			debug($this->data);
58
		}
58
		}
59
	}
59
	}
-
 
60
 
-
 
61
	public function admin_search(){
-
 
62
		$page = $this->request->query('page');
-
 
63
		if(!isset($page)){
-
 
64
			$page = 1;
-
 
65
		}
-
 
66
		$limit = Configure::read('admindashboardlimit');
-
 
67
		$offset = ($page - 1)*$limit;
-
 
68
		$search = urlencode($this->request->query('search'));
-
 
69
		$url = $this->apihost."Catalog/searchMaster/?search=$search&limit=$limit&offset=$offset";
-
 
70
		$response = $this->make_request($url,null);
-
 
71
		// debug($response);
-
 
72
		$this->set('masterdata', $response);
-
 
73
		$this->set(compact('page','search'));
-
 
74
	}
60
}
75
}
61
76