Subversion Repositories SmartDukaan

Rev

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

Rev 14517 Rev 14561
Line 62... Line 62...
62
 *
62
 *
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['Exceptionalskudiscount'];
67
			$url = $this->apihost."discountInfo/addExceptionalSkuDiscount";
68
			$url = $this->apihost."discountInfo/addExceptionalSkuDiscount";			
-
 
69
			$url = $this->generateMultiUrl($url,$data);
68
			$jsonVar = json_encode($this->request->data['Exceptionalskudiscount'], JSON_NUMERIC_CHECK );
70
			$jsonVar = json_encode($data, JSON_NUMERIC_CHECK );
69
			$response = $this->make_request($url,$jsonVar);
71
			$response = $this->make_request($url,$jsonVar);
70
			if (key($response)) {
72
			if (key($response)) {
71
				$this->Session->setFlash(current($response));
73
				$this->Session->setFlash(current($response));
72
				return $this->redirect(array('action' => 'index'));
74
				return $this->redirect(array('action' => 'index'));
73
			} else {
75
			} else {