Subversion Repositories SmartDukaan

Rev

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

Rev 14600 Rev 15039
Line 51... Line 51...
51
		$storemapping = Configure::read('storemapping');
51
		$storemapping = Configure::read('storemapping');
52
		$this->set('masterdata', $response);
52
		$this->set('masterdata', $response);
53
		$this->set(compact('page','search','storemapping'));
53
		$this->set(compact('page','search','storemapping'));
54
	}
54
	}
55
 
55
 
-
 
56
	public function admin_show($id=null){
-
 
57
		$limit = 10;
-
 
58
		$page = 1;
-
 
59
		$params = array(
-
 
60
			'fields' => array('_id','brand','source_product_name', 'available_price', 'thumbnail','category','category_id','in_stock','marketPlaceUrl','mrp','rank','source_id','source_product_name','url'),
-
 
61
			'conditions' => array('source_id' => array('$ne' => 0)),
-
 
62
			'order' => array('_id' => -1),
-
 
63
			'limit' => $limit,
-
 
64
			'page' => $page,
-
 
65
		);
-
 
66
		$masterdata = $this->MasterData->find('all', $params);
-
 
67
		$this->set(compact('masterdata'));
-
 
68
	}
56
	public function admin_edit($id = null) {
69
	public function admin_edit($id = null) {
57
		$id = (integer) $id;
70
		$id = (integer) $id;
58
		if (!$id && empty($this->data)) {
71
		if (!$id && empty($this->data)) {
59
			$this->flash(__('Invalid Post', true), array('action' => 'index'));
72
			$this->flash(__('Invalid Post', true), array('action' => 'index'));
60
		}
73
		}