Subversion Repositories SmartDukaan

Rev

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

Rev 17892 Rev 17893
Line 252... Line 252...
252
		$url = Configure::read ( 'saholicapihost' ) . 'cart!validateCart?isLoggedIn=true&privateDealUser=true&userId=' . $suserId . '&id=' . $scartId . '&email=' . $semailId;
252
		$url = Configure::read ( 'saholicapihost' ) . 'cart!validateCart?isLoggedIn=true&privateDealUser=true&userId=' . $suserId . '&id=' . $scartId . '&email=' . $semailId;
253
		// if($pin!='0'){
253
		// if($pin!='0'){
254
		$url = $url . '&pinCode=' . $data ['pin'];
254
		$url = $url . '&pinCode=' . $data ['pin'];
255
		// }
255
		// }
256
		$cartskus = $this->post_cartinfo_request ( $url, $params );
256
		$cartskus = $this->post_cartinfo_request ( $url, $params );
257
		$checkestimate = 'true';
257
		$checkestimate = $response ['defaultAddress'];
258
		if ($cartskus ['maxEstimate'] == - 1) {
258
		if ($cartskus ['maxEstimate'] == - 1) {
259
			$checkestimate = 'false';
259
			$checkestimate = '';
260
		} else {
260
		} else {
261
			for($i = 0; $i < count ( $cartskus ['cartItems'] ); $i ++) {
261
			for($i = 0; $i < count ( $cartskus ['cartItems'] ); $i ++) {
262
				if ($cartskus ['cartItems'] [$i] ['estimate'] == - 1) {
262
				if ($cartskus ['cartItems'] [$i] ['estimate'] == - 1) {
263
					$checkestimate = 'false';
263
					$checkestimate = '';
264
					break;
264
					break;
265
				}
265
				}
266
			}
266
			}
267
		}
267
		}
268
		
268
		
269
		if ($checkestimate == 'false') {
-
 
270
			setcookie ( 'address_message', "Address is not Servicable", - 1, '/' );
-
 
271
		}
-
 
272
		
-
 
273
		return $checkestimate;
269
		return $checkestimate;
274
	}
270
	}
275
	public function getstate($pin_val) {
271
	public function getstate($pin_val) {
276
		$this->autoRender = false;
272
		$this->autoRender = false;
277
		$this->request->onlyAllow ( 'ajax' );
273
		$this->request->onlyAllow ( 'ajax' );