Subversion Repositories SmartDukaan

Rev

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

Rev 17804 Rev 17885
Line 118... Line 118...
118
			}
118
			}
119
			Cache::write($cachekey,$acls,'month');
119
			Cache::write($cachekey,$acls,'month');
120
		}
120
		}
121
		$this->acls = $acls;
121
		$this->acls = $acls;
122
		$this->set('acls',$acls);
122
		$this->set('acls',$acls);
-
 
123
		
-
 
124
		if(isset($_COOKIE['txn_comp']) && $_COOKIE['txn_comp']=='no'){
-
 
125
			$suserId = base64_decode($_COOKIE['s_id']);
-
 
126
			$scartId = base64_decode($_COOKIE['s_cart']);
-
 
127
			$semailId = base64_decode($_COOKIE['s_email']);
-
 
128
			
-
 
129
			$pincode = 0;
-
 
130
			
-
 
131
			if($pincode==0 && isset($_COOKIE['s_pincode'])){
-
 
132
				$pincode = base64_decode($_COOKIE['s_pincode']);
-
 
133
			}
-
 
134
			$cartItems = array();
-
 
135
			$postData = array(
-
 
136
					'cartItems'	=>	$cartItems
-
 
137
					);
-
 
138
					
-
 
139
			$params = array(
-
 
140
					'cartMap' => urlencode(json_encode($postData)));
-
 
141
			
-
 
142
			$url = Configure::read('saholicapihost').'cart!validateCart?isLoggedIn=true&privateDealUser=true&userId='.$suserId.'&id='.$scartId.'&email='.$semailId;
-
 
143
			if($pincode!='0'){
-
 
144
				$url = $url.'&pinCode='.$pincode;
-
 
145
			}
-
 
146
			$localCartHistory = $this->post_cartinfo_request($url,$params);
-
 
147
			if(isset($localCartHistory['response']) && $localCartHistory['response']=='error'){
-
 
148
				setcookie('txn_comp', 'no', -1, '/');
-
 
149
			}elseif(isset($localCartHistory['cartItems'])&& count($localCartHistory['cartItems'])==0) {
-
 
150
				setcookie('txn_comp', 'yes', -1, '/');
-
 
151
			}else{
-
 
152
				$this->set('localCartHistory',$localCartHistory);
-
 
153
			}
-
 
154
		}
123
 
155
 
124
    }
156
    }
125
	
157
	
126
	function checkAcl() {		
158
	function checkAcl() {		
127
    	if(!in_array($this->here,$this->acls[$this->Session->read('Auth.User.group_id')]['allowed'])){
159
    	if(!in_array($this->here,$this->acls[$this->Session->read('Auth.User.group_id')]['allowed'])){