Subversion Repositories SmartDukaan

Rev

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

Rev 14099 Rev 14225
Line 63... Line 63...
63
 * @return void
63
 * @return void
64
 */
64
 */
65
	public function admin_add() {
65
	public function admin_add() {
66
		if ($this->request->is('post')) {
66
		if ($this->request->is('post')) {
67
			$data = $this->request->data['Skuscheme'];
67
			$data = $this->request->data['Skuscheme'];
68
			$data['startDate'] = 1000*strtotime($data['startDate']);
68
			//$data['startDate'] = 1000*strtotime($data['startDate']);
69
			$data['endDate'] = 1000*strtotime($data['endDate']);
69
			//$data['endDate'] = 1000*strtotime($data['endDate']);
70
			$url = $this->apihost."discountInfo/addSkuSchemeDetails";
70
			$url = $this->apihost."discountInfo/addSkuSchemeDetails";
71
			$jsonVar = json_encode($data, JSON_NUMERIC_CHECK );
71
			$jsonVar = json_encode($data, JSON_NUMERIC_CHECK );
72
			$response = $this->make_request($url,$jsonVar);
72
			$response = $this->make_request($url,$jsonVar);
73
			if (key($response)) {
73
			if (key($response)) {
74
				$this->Session->setFlash(current($response));
74
				$this->Session->setFlash(current($response));