Subversion Repositories SmartDukaan

Rev

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

Rev 15036 Rev 15093
Line 15... Line 15...
15
 */
15
 */
16
	public $components = array('Paginator');
16
	public $components = array('Paginator');
17
 
17
 
18
	public function beforeFilter() {		
18
	public function beforeFilter() {		
19
		parent::beforeFilter();
19
		parent::beforeFilter();
20
		$this->Auth->allow('add','mine','pendingcashbacks');
20
		$this->Auth->allow('add','mine','pendingcashbacks','all');
21
		$this->apihost = Configure::read('pythonapihost');
21
		$this->apihost = Configure::read('pythonapihost');
22
	}
22
	}
23
	
23
	
24
	public function mine() {
24
	public function mine() {
25
		$page = $this->request->query('page');
25
		$page = $this->request->query('page');
Line 168... Line 168...
168
			}
168
			}
169
			$this->log(print_r($this->request->data,1),'orders');
169
			$this->log(print_r($this->request->data,1),'orders');
170
			if(empty($this->request->data['id'])) {
170
			if(empty($this->request->data['id'])) {
171
				$this->Order->create();
171
				$this->Order->create();
172
			}
172
			}
-
 
173
			$this->request->data['ip'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
173
			if ($this->Order->save($this->request->data)) {
174
			if ($this->Order->save($this->request->data)) {
174
				//$this->loadModel('PythonApi');	
175
				//$this->loadModel('PythonApi');	
175
				if(empty($this->request->data['id'])) {
176
				if(empty($this->request->data['id'])) {
176
					$id = $this->Order->getLastInsertID();
177
					$id = $this->Order->getLastInsertID();
177
				}else{
178
				}else{