Subversion Repositories SmartDukaan

Rev

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

Rev 17904 Rev 17947
Line 76... Line 76...
76
			$url = Configure::read ( 'saholicapihost' ) . 'address?isLoggedIn=true&privateDealUser=true&userId=' . $suserId;
76
			$url = Configure::read ( 'saholicapihost' ) . 'address?isLoggedIn=true&privateDealUser=true&userId=' . $suserId;
77
			$response = $this->make_request ( $url, null );
77
			$response = $this->make_request ( $url, null );
78
			$user_name = "";
78
			$user_name = "";
79
			$user_contact = "";
79
			$user_contact = "";
80
			
80
			
-
 
81
			$codAvailable = $cartskus['cod'];
-
 
82
			$this->Session->write('cod', $codAvailable);
-
 
83
			
81
			if(empty($response ['addresses'])){
84
			if(empty($response ['addresses'])){
82
				$this->redirect ( array (
85
				$this->redirect ( array (
83
						'action' => 'add' 
86
						'action' => 'add' 
84
				));
87
				));
85
			}
88
			}
Line 141... Line 144...
141
				array_push ( $firstshowaddress, $moreshowaddress [$i] );
144
				array_push ( $firstshowaddress, $moreshowaddress [$i] );
142
			}
145
			}
143
			
146
			
144
			$this->set ( 'address', $response );
147
			$this->set ( 'address', $response );
145
			
148
			
146
			$this->set ( compact ( 'firstshowaddress', 'totalPayable', 'user_name', 'user_contact', 'pincode', 'defaultselectedaddress', 'message' ) );
149
			$this->set ( compact ( 'firstshowaddress', 'totalPayable', 'user_name', 'user_contact', 'pincode', 'defaultselectedaddress', 'message', 'codAvailable') );
147
		}
150
		}
148
	}
151
	}
149
	public function add($user_name = null, $user_contact = null) {
152
	public function add($user_name = null, $user_contact = null) {
150
		$this->layout = 'cartinnerpages';
153
		$this->layout = 'cartinnerpages';
151
		
154
		
152
		$totalPayable = $_SESSION ['totalPayable'];
155
		$totalPayable = $_SESSION ['totalPayable'];
-
 
156
		$codAvailable = $_SESSION ['cod'];
153
		$pinval = base64_decode ( $_COOKIE ['s_pincode'] );
157
		$pinval = base64_decode ( $_COOKIE ['s_pincode'] );
154
		;
-
 
155
		$suserId = base64_decode ( $_COOKIE ['s_id'] );
158
		$suserId = base64_decode ( $_COOKIE ['s_id'] );
156
		$scart = base64_decode ( $_COOKIE ['s_cart'] );
159
		$scart = base64_decode ( $_COOKIE ['s_cart'] );
157
		
160
		
158
		if ($this->request->is ( 'post' )) {
161
		if ($this->request->is ( 'post' )) {
159
			$data = $this->request->data;
162
			$data = $this->request->data;
Line 220... Line 223...
220
		// debug($getstate);
223
		// debug($getstate);
221
		$getstateval = "";
224
		$getstateval = "";
222
		if ($getstate != "{}") {
225
		if ($getstate != "{}") {
223
			$getstateval = ucwords ( strtolower ( $getstate ['state'] ) );
226
			$getstateval = ucwords ( strtolower ( $getstate ['state'] ) );
224
		}
227
		}
225
		$this->set ( compact ( 'getstateval', 'user_name', 'user_contact', 'pinval', 'totalPayable' ) );
228
		$this->set(compact('getstateval', 'user_name', 'user_contact', 'pinval', 'totalPayable', 'codAvailable'));
226
	}
229
	}
227
	public function submitcheck() {
230
	public function submitcheck() {
228
		$this->autoRender = false;
231
		$this->autoRender = false;
229
		$this->request->onlyAllow ( 'ajax' );
232
		$this->request->onlyAllow ( 'ajax' );
230
		
233